diff --git a/src/components/Crud/CRUD.operation.vue b/src/components/Crud/CRUD.operation.vue index c4e6dc7..cf36583 100644 --- a/src/components/Crud/CRUD.operation.vue +++ b/src/components/Crud/CRUD.operation.vue @@ -203,17 +203,20 @@ export default { }, showcolumn() { 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) - } + if(this.hiddenColumns!== undefined && this.hiddenColumns!=null){ + 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) + } + + }) + this.updateTableColumns(); + } - }) - this.updateTableColumns(); }, //列拖拽 columnDrop() { diff --git a/src/views/base-data/item/index.vue b/src/views/base-data/item/index.vue index 8f4ffd5..2f4921b 100644 --- a/src/views/base-data/item/index.vue +++ b/src/views/base-data/item/index.vue @@ -12,9 +12,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +