diff --git a/src/components/table/header/index.vue b/src/components/table/header/index.vue index 474633d0..a12f1402 100644 --- a/src/components/table/header/index.vue +++ b/src/components/table/header/index.vue @@ -70,7 +70,15 @@ - 列设置 + + 列设置 + { + const table = tableStore?.table?.ref as any + if (!table) return + customColumnVisibleOnPress = table.getCustomVisible?.() ?? !!table.reactData?.customStore?.visible + if (table.reactData?.customStore) { + table.reactData.customStore.activeBtn = true + } +} const openCustomColumn = () => { - tableStore?.table?.ref?.openCustom?.() + const table = tableStore?.table?.ref as any + if (!table) return + if (table.reactData?.customStore) { + table.reactData.customStore.activeBtn = false + } + if (customColumnVisibleOnPress) { + table.closeCustom?.() + } else { + table.openCustom?.() + } } onMounted(() => { if (props.showCustomColumn && tableStore?.table) { diff --git a/src/components/table/index.vue b/src/components/table/index.vue index a0ec80ff..72054ffc 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -1,7 +1,7 @@