|
|
@@ -3,34 +3,34 @@ import request from '@/utils/request';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- // newColumns: []
|
|
|
+ newColumns: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
//从服务器获取缓存列表配置
|
|
|
- // this.getTabColumns();
|
|
|
+ this.getTabColumns();
|
|
|
// 创建防抖函数并绑定this
|
|
|
- // this.debouncedHandleColumnChange = this.debounce(
|
|
|
- // this.handleColumnChangeImpl,
|
|
|
- // 1000
|
|
|
- // );
|
|
|
+ this.debouncedHandleColumnChange = this.debounce(
|
|
|
+ this.handleColumnChangeImpl,
|
|
|
+ 1000
|
|
|
+ );
|
|
|
},
|
|
|
methods: {
|
|
|
// 实际的列变更处理逻辑
|
|
|
handleColumnChangeImpl() {
|
|
|
- // try {
|
|
|
- // const list = this.getStorage(this.cacheKeyUrl + 'Cols');
|
|
|
- // if (list) {
|
|
|
- // this.saveColumns(list);
|
|
|
- // }
|
|
|
- // } catch (error) {
|
|
|
- // console.error('处理列配置出错:', error);
|
|
|
- // }
|
|
|
+ try {
|
|
|
+ const list = this.getStorage(this.cacheKeyUrl + 'Cols');
|
|
|
+ if (list) {
|
|
|
+ this.saveColumns(list);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('处理列配置出错:', error);
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 列表变化回调
|
|
|
handleColumnChange() {
|
|
|
- // this.debouncedHandleColumnChange();
|
|
|
+ this.debouncedHandleColumnChange();
|
|
|
},
|
|
|
|
|
|
// 获取table-column配置
|