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 @@
- 列设置
+ 列设置
= ({ checked }) => {
const records = (tableRef.value as VxeTableInstance).getCheckboxRecords()
tableStore.onTableAction('selection-change', records)
}
+let customColumnVisibleOnPress = false
+const onCustomColumnMousedown = () => {
+ const table = tableRef.value as any
+ if (!table) return
+ customColumnVisibleOnPress = table.getCustomVisible?.() ?? !!table.reactData?.customStore?.visible
+ if (table.reactData?.customStore) {
+ table.reactData.customStore.activeBtn = true
+ }
+}
const openCustomColumn = () => {
- tableRef.value?.openCustom?.()
+ const table = tableRef.value as any
+ if (!table) return
+ if (table.reactData?.customStore) {
+ table.reactData.customStore.activeBtn = false
+ }
+ if (customColumnVisibleOnPress) {
+ table.closeCustom?.()
+ } else {
+ table.openCustom?.()
+ }
}
const getRef = () => {
return tableRef.value
diff --git a/src/views/pqs/business/terminal/userLedger/index.vue b/src/views/pqs/business/terminal/userLedger/index.vue
index 7a9d1aaf..a244a78d 100644
--- a/src/views/pqs/business/terminal/userLedger/index.vue
+++ b/src/views/pqs/business/terminal/userLedger/index.vue
@@ -24,8 +24,8 @@
- 新增
- 删除
+ 新增
+ 删除