fix(BasicTable): avoid select when edit cell (#3484)

This commit is contained in:
xachary 2023-12-29 11:50:25 +08:00 committed by GitHub
parent 816553bfcd
commit 2f921cfb88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -179,7 +179,8 @@
} }
}); });
function handleEdit() { function handleEdit(e) {
e.stopPropagation();
if (unref(getRowEditable) || unref(props.column?.editRow) || unref(getDisable)) return; if (unref(getRowEditable) || unref(props.column?.editRow) || unref(getDisable)) return;
ruleMessage.value = ''; ruleMessage.value = '';
isEdit.value = true; isEdit.value = true;
@ -430,8 +431,12 @@
)} )}
</div> </div>
{this.isEdit && ( {this.isEdit && (
<Spin spinning={this.spinning}> <Spin spinning={this.spinning} onClick={(e) => e.stopPropagation()}>
<div class={`${this.prefixCls}__wrapper`} v-click-outside={this.onClickOutside}> <div
class={`${this.prefixCls}__wrapper`}
v-click-outside={this.onClickOutside}
onClick={(e) => e.stopPropagation()}
>
<CellComponent <CellComponent
{...this.getComponentProps} {...this.getComponentProps}
component={this.getComponent} component={this.getComponent}