展示列设置改变后表中数据刷新

This commit is contained in:
付民康
2025-03-27 15:09:52 +08:00
parent 1f65abb5df
commit 6a64978dab
3 changed files with 24 additions and 4 deletions

View File

@@ -32,6 +32,7 @@
<TableSetting
:columns="columns"
@setDefult="setDefult"
@updateTableKey="updateTableKey"
:show-column-list="showColumnList"
@update:show-column-list="updateShowColumnList"
/>
@@ -341,13 +342,17 @@ const onSearch = (str: string) => {
const router = useRouter();
const updateTableKey = () => {
tableKey.value++; // 更新 tableKey强制刷新表格
};
// 定义 showColumnList 状态
const showColumnList = ref(false);
// 更新 showColumnList 的方法
const updateShowColumnList = (newValue) => {
showColumnList.value = newValue;
tableKey.value++; // 更新 tableKey强制刷新表格
// tableKey.value++; // 更新 tableKey强制刷新表格
};
const handleBatchImport = async () => {

View File

@@ -77,6 +77,7 @@
<TableSetting
:columns="columns"
@setDefult="setDefult"
@updateTableKey="updateTableKey"
:show-column-list="showColumnList"
@update:show-column-list="updateShowColumnList"
/>
@@ -372,10 +373,15 @@ const openOrgModal = () => {
orgModalRef.value.openModal(); // 调用子组件的方法
}
};
// 更新 showColumnList 的方法
const updateTableKey = () => {
tableKey.value++; // 更新 tableKey强制刷新表格
};
// 更新 showColumnList 的方法
const updateShowColumnList = (newValue) => {
showColumnList.value = newValue;
tableKey.value++; // 更新 tableKey强制刷新表格
// tableKey.value++; // 更新 tableKey强制刷新表格
};
// 更新 showColumnList 的方法
const openCountryChart = (row) => {