Skip to content

Commit

Permalink
fix(table): size not worked in editComponentProps
Browse files Browse the repository at this point in the history
修复无法设置basicTable编辑组件的size属性的问题

fixed: #1074
  • Loading branch information
mynetfan committed Aug 14, 2021
1 parent a8b18c2 commit 7971896
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- 修复 selection-change 事件在取消勾选时未能正确触发的问题
- 修复浅色主题下的全屏状态背景颜色不正确的问题
- 修复`getSelectRows`不支持远程数据跨页选择时获取完整数据的问题
- 修复在`editComponentProps`中为编辑组件提供的`size`属性无效的问题
- **Qrcode** 修复二维码组件在创建时未能及时绘制的问题
- **BasicModal** 修复`helpMessage`属性不起作用的问题

Expand Down
10 changes: 7 additions & 3 deletions src/components/Table/src/components/editable/EditableCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
:rule="getRule"
:ruleMessage="ruleMessage"
:class="getWrapperClass"
size="small"
ref="elRef"
@change="handleChange"
@options-change="handleOptionsChange"
@pressEnter="handleEnter"
/>
<div :class="`${prefixCls}__action`" v-if="!getRowEditable">
<CheckOutlined :class="[`${prefixCls}__icon`, 'mx-2']" @click="handleSubmit" />
<CheckOutlined :class="[`${prefixCls}__icon`, 'mx-2']" @click="handleSubmitClick" />
<CloseOutlined :class="`${prefixCls}__icon `" @click="handleCancel" />
</div>
</div>
Expand Down Expand Up @@ -112,6 +111,7 @@
const value = isCheckValue ? (isNumber(val) && isBoolean(val) ? val : !!val) : val;
return {
size: 'small',
getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body,
getCalendarContainer: () => unref(table?.wrapRef.value) ?? document.body,
placeholder: createPlaceholderMessage(unref(getComponent)),
Expand Down Expand Up @@ -259,6 +259,10 @@
handleSubmit();
}
function handleSubmitClick() {
handleSubmit();
}
function handleCancel() {
isEdit.value = false;
currentValueRef.value = defaultValueRef.value;
Expand Down Expand Up @@ -363,7 +367,7 @@
getRowEditable,
getValues,
handleEnter,
// getSize,
handleSubmitClick,
};
},
});
Expand Down

0 comments on commit 7971896

Please sign in to comment.