展示列设置改变后表中数据刷新
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user