diff --git a/src/views/archivesConfig/dict/dictDetail.vue b/src/views/archivesConfig/dict/dictDetail.vue index 8d95a9c..6af6bb1 100644 --- a/src/views/archivesConfig/dict/dictDetail.vue +++ b/src/views/archivesConfig/dict/dictDetail.vue @@ -28,7 +28,7 @@ - + @@ -110,6 +110,24 @@ export default { [CRUD.HOOK.beforeRefresh]() { this.crud.query.id = this.dicPid return true + }, + clickRowHandler(row) { + this.$refs.table.clearSelection() + this.$refs.table.toggleRowSelection(row) + }, + selectionChangeHandler(val) { + let finalVal + if (val.length > 1) { + // 取出最后val的最后一个返回出来 + finalVal = val.pop() + // 清除所有选中 + this.$refs.table.clearSelection() + // 给最后一个加上选中 + this.$refs.table.toggleRowSelection(finalVal) + } else { + finalVal = val + } + this.crud.selectionChangeHandler(finalVal) } } } @@ -119,4 +137,7 @@ export default { ::v-deep .el-input-number .el-input__inner { text-align: left; } +::v-deep thead .el-table-column--selection .cell { + display: none; +} diff --git a/src/views/archivesConfig/dict/index.vue b/src/views/archivesConfig/dict/index.vue index 3834c30..0d6d2ca 100644 --- a/src/views/archivesConfig/dict/index.vue +++ b/src/views/archivesConfig/dict/index.vue @@ -24,13 +24,13 @@ - + - +