소스 검색

fix(BasicTable): index still show when set showIndexColumn false (#3455)

xachary 1 년 전
부모
커밋
75f5b7ac4d
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/components/Table/src/components/settings/ColumnSetting.vue

+ 1 - 2
src/components/Table/src/components/settings/ColumnSetting.vue

@@ -445,12 +445,11 @@
   const restore = () => {
     // 设置过才恢复
     if (typeof tableSettingStore.getShowIndexColumn === 'boolean') {
-      isIndexColumnShow.value = tableSettingStore.getShowIndexColumn;
+      isIndexColumnShow.value = defaultIsIndexColumnShow && tableSettingStore.getShowIndexColumn;
     }
     if (typeof tableSettingStore.getShowRowSelection === 'boolean') {
       isRowSelectionShow.value = defaultIsRowSelectionShow && tableSettingStore.getShowRowSelection;
     }
-
     // 序号列更新
     onIndexColumnShowChange({
       target: { checked: isIndexColumnShow.value },