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