no message

main
HUOJIN\92525 2025-09-30 16:31:12 +08:00
parent e830796e40
commit 0531a03026
1 changed files with 30 additions and 16 deletions

View File

@ -204,25 +204,39 @@ export default {
this.showcolumn();
}, 200)
}
//vm.owner.store.commit('insertColumn', columnConfig, newIndex+myindex + 1 , null)
},
showcolumn() {
const strHidden = sessionStorage.getItem(this.tableKey)
this.hiddenColumns = JSON.parse(strHidden);
const table = this.crud.props.table
this.hiddenColumns.forEach((column, index) => {
const vm = table.$children.find(e => e.prop === column.property)
const columnConfig = vm.columnConfig
if (column.visible) {
columnConfig.width = column.width
columnConfig.visible = column.visible
vm.owner.store.commit('insertColumn', columnConfig, index + 1, null)
try {
// sessionStoragehiddenColumns
const strHidden = sessionStorage.getItem(this.tableKey)
if (strHidden) {
this.hiddenColumns = JSON.parse(strHidden);
} else {
//
this.hiddenColumns = [];
}
})
this.updateTableColumns();
const table = this.crud.props.table
//
this.hiddenColumns.forEach((column, index) => {
const vm = table.$children.find(e => e && e.prop === column.property)
if (vm) {
const columnConfig = vm.columnConfig;
// columnConfig
if (columnConfig) {
if (column.visible) {
//
columnConfig.width = column.width;
columnConfig.visible = column.visible;
vm.owner.store.commit('insertColumn', columnConfig, index + 1, null);
}
}
}
});
this.updateTableColumns();
} catch (error) {
console.error("处理列配置时发生错误:", error);
}
},
//
columnDrop() {