Skip to content

Commit 7971896

Browse files
committedAug 14, 2021
fix(table): size not worked in editComponentProps
修复无法设置basicTable编辑组件的size属性的问题 fixed: #1074
1 parent a8b18c2 commit 7971896

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
 

‎CHANGELOG.zh_CN.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- 修复 selection-change 事件在取消勾选时未能正确触发的问题
1515
- 修复浅色主题下的全屏状态背景颜色不正确的问题
1616
- 修复`getSelectRows`不支持远程数据跨页选择时获取完整数据的问题
17+
- 修复在`editComponentProps`中为编辑组件提供的`size`属性无效的问题
1718
- **Qrcode** 修复二维码组件在创建时未能及时绘制的问题
1819
- **BasicModal** 修复`helpMessage`属性不起作用的问题
1920

‎src/components/Table/src/components/editable/EditableCell.vue

+7-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@
2020
:rule="getRule"
2121
:ruleMessage="ruleMessage"
2222
:class="getWrapperClass"
23-
size="small"
2423
ref="elRef"
2524
@change="handleChange"
2625
@options-change="handleOptionsChange"
2726
@pressEnter="handleEnter"
2827
/>
2928
<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" />
3130
<CloseOutlined :class="`${prefixCls}__icon `" @click="handleCancel" />
3231
</div>
3332
</div>
@@ -112,6 +111,7 @@
112111
const value = isCheckValue ? (isNumber(val) && isBoolean(val) ? val : !!val) : val;
113112
114113
return {
114+
size: 'small',
115115
getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body,
116116
getCalendarContainer: () => unref(table?.wrapRef.value) ?? document.body,
117117
placeholder: createPlaceholderMessage(unref(getComponent)),
@@ -259,6 +259,10 @@
259259
handleSubmit();
260260
}
261261
262+
function handleSubmitClick() {
263+
handleSubmit();
264+
}
265+
262266
function handleCancel() {
263267
isEdit.value = false;
264268
currentValueRef.value = defaultValueRef.value;
@@ -363,7 +367,7 @@
363367
getRowEditable,
364368
getValues,
365369
handleEnter,
366-
// getSize,
370+
handleSubmitClick,
367371
};
368372
},
369373
});

0 commit comments

Comments
 (0)