Skip to content

Commit

Permalink
fix(Table): 修复初始化 checkedKeys 被清空逻辑异常问题 (#802)
Browse files Browse the repository at this point in the history
* fix: 修复初始化checkedKeys被清空逻辑异常问题

* feat: pr问题修改

---------

Co-authored-by: blankzhang <blankzhang@blankzhangdeMac-mini.local>
  • Loading branch information
zym19960704 and blankzhang committed May 10, 2024
1 parent d7dc939 commit 3d9c653
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions components/table/useTableSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default ({

// 是否单选模式
const isSingleSelect = computed(() => {
return selectionColumn.value && !selectionColumn.value.props.multiple;
return Boolean(selectionColumn.value && !selectionColumn.value.props.multiple);
});

const isSelectDisabled = ({ row }: { row: RowType }) => {
Expand Down Expand Up @@ -185,12 +185,8 @@ export default ({
watch(
isSingleSelect,
() => {
// 切换后,清空当前选择
clearSelect();
},
{
immediate: true,
},
);

return {
Expand Down

0 comments on commit 3d9c653

Please sign in to comment.