Commit 6094d271ad312f5ac9d0f0017258d325c4d2b010
1 parent
521c8bd7
feat: 重置列逻辑更新
Showing
1 changed file
with
3 additions
and
8 deletions
src/components/Table/src/components/settings/ColumnSetting.vue
... | ... | @@ -391,15 +391,10 @@ |
391 | 391 | let sortableOrder: string[] = []; |
392 | 392 | // reset columns |
393 | 393 | function reset() { |
394 | - setColumns(cachePlainOptions.value); | |
394 | + const checkList = plainOptions.value.map((item) => item.value); | |
395 | + | |
396 | + setColumns(checkList); | |
395 | 397 | updateColumns(true); |
396 | - checkIndex.value = !!cacheTableProps.showIndexColumn; | |
397 | - checkSelect.value = !!cacheTableProps.rowSelection; | |
398 | - table.setProps({ | |
399 | - showIndexColumn: checkIndex.value, | |
400 | - rowSelection: checkSelect.value ? defaultRowSelection : undefined, | |
401 | - }); | |
402 | - sortable.sort(sortableOrder); | |
403 | 398 | } |
404 | 399 | |
405 | 400 | // Open the pop-up window for drag and drop initialization | ... | ... |