Commit 7971896383296c155b7ab16b5beb3544f34ee525
1 parent
a8b18c26
fix(table): `size` not worked in `editComponentProps`
修复无法设置basicTable编辑组件的size属性的问题 fixed: #1074
Showing
2 changed files
with
8 additions
and
3 deletions
CHANGELOG.zh_CN.md
@@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
14 | - 修复 selection-change 事件在取消勾选时未能正确触发的问题 | 14 | - 修复 selection-change 事件在取消勾选时未能正确触发的问题 |
15 | - 修复浅色主题下的全屏状态背景颜色不正确的问题 | 15 | - 修复浅色主题下的全屏状态背景颜色不正确的问题 |
16 | - 修复`getSelectRows`不支持远程数据跨页选择时获取完整数据的问题 | 16 | - 修复`getSelectRows`不支持远程数据跨页选择时获取完整数据的问题 |
17 | + - 修复在`editComponentProps`中为编辑组件提供的`size`属性无效的问题 | ||
17 | - **Qrcode** 修复二维码组件在创建时未能及时绘制的问题 | 18 | - **Qrcode** 修复二维码组件在创建时未能及时绘制的问题 |
18 | - **BasicModal** 修复`helpMessage`属性不起作用的问题 | 19 | - **BasicModal** 修复`helpMessage`属性不起作用的问题 |
19 | 20 |
src/components/Table/src/components/editable/EditableCell.vue
@@ -20,14 +20,13 @@ | @@ -20,14 +20,13 @@ | ||
20 | :rule="getRule" | 20 | :rule="getRule" |
21 | :ruleMessage="ruleMessage" | 21 | :ruleMessage="ruleMessage" |
22 | :class="getWrapperClass" | 22 | :class="getWrapperClass" |
23 | - size="small" | ||
24 | ref="elRef" | 23 | ref="elRef" |
25 | @change="handleChange" | 24 | @change="handleChange" |
26 | @options-change="handleOptionsChange" | 25 | @options-change="handleOptionsChange" |
27 | @pressEnter="handleEnter" | 26 | @pressEnter="handleEnter" |
28 | /> | 27 | /> |
29 | <div :class="`${prefixCls}__action`" v-if="!getRowEditable"> | 28 | <div :class="`${prefixCls}__action`" v-if="!getRowEditable"> |
30 | - <CheckOutlined :class="[`${prefixCls}__icon`, 'mx-2']" @click="handleSubmit" /> | 29 | + <CheckOutlined :class="[`${prefixCls}__icon`, 'mx-2']" @click="handleSubmitClick" /> |
31 | <CloseOutlined :class="`${prefixCls}__icon `" @click="handleCancel" /> | 30 | <CloseOutlined :class="`${prefixCls}__icon `" @click="handleCancel" /> |
32 | </div> | 31 | </div> |
33 | </div> | 32 | </div> |
@@ -112,6 +111,7 @@ | @@ -112,6 +111,7 @@ | ||
112 | const value = isCheckValue ? (isNumber(val) && isBoolean(val) ? val : !!val) : val; | 111 | const value = isCheckValue ? (isNumber(val) && isBoolean(val) ? val : !!val) : val; |
113 | 112 | ||
114 | return { | 113 | return { |
114 | + size: 'small', | ||
115 | getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body, | 115 | getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body, |
116 | getCalendarContainer: () => unref(table?.wrapRef.value) ?? document.body, | 116 | getCalendarContainer: () => unref(table?.wrapRef.value) ?? document.body, |
117 | placeholder: createPlaceholderMessage(unref(getComponent)), | 117 | placeholder: createPlaceholderMessage(unref(getComponent)), |
@@ -259,6 +259,10 @@ | @@ -259,6 +259,10 @@ | ||
259 | handleSubmit(); | 259 | handleSubmit(); |
260 | } | 260 | } |
261 | 261 | ||
262 | + function handleSubmitClick() { | ||
263 | + handleSubmit(); | ||
264 | + } | ||
265 | + | ||
262 | function handleCancel() { | 266 | function handleCancel() { |
263 | isEdit.value = false; | 267 | isEdit.value = false; |
264 | currentValueRef.value = defaultValueRef.value; | 268 | currentValueRef.value = defaultValueRef.value; |
@@ -363,7 +367,7 @@ | @@ -363,7 +367,7 @@ | ||
363 | getRowEditable, | 367 | getRowEditable, |
364 | getValues, | 368 | getValues, |
365 | handleEnter, | 369 | handleEnter, |
366 | - // getSize, | 370 | + handleSubmitClick, |
367 | }; | 371 | }; |
368 | }, | 372 | }, |
369 | }); | 373 | }); |