正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | </el-form-item> | 26 | </el-form-item> |
| 27 | </el-form> | 27 | </el-form> |
| 28 | <el-row> | 28 | <el-row> |
| 29 | - <el-table :data="dbTableList" @selection-change="handleSelectionChange" height="260px"> | 29 | + <el-table @row-click="clickRow" ref="table" :data="dbTableList" @selection-change="handleSelectionChange" height="260px"> |
| 30 | <el-table-column type="selection" width="55"></el-table-column> | 30 | <el-table-column type="selection" width="55"></el-table-column> |
| 31 | <el-table-column prop="tableName" label="表名称"></el-table-column> | 31 | <el-table-column prop="tableName" label="表名称"></el-table-column> |
| 32 | <el-table-column prop="tableComment" label="表描述"></el-table-column> | 32 | <el-table-column prop="tableComment" label="表描述"></el-table-column> |
| @@ -76,6 +76,9 @@ export default { | @@ -76,6 +76,9 @@ export default { | ||
| 76 | this.getList(); | 76 | this.getList(); |
| 77 | this.visible = true; | 77 | this.visible = true; |
| 78 | }, | 78 | }, |
| 79 | + clickRow(row) { | ||
| 80 | + this.$refs.table.toggleRowSelection(row); | ||
| 81 | + }, | ||
| 79 | // 多选框选中数据 | 82 | // 多选框选中数据 |
| 80 | handleSelectionChange(selection) { | 83 | handleSelectionChange(selection) { |
| 81 | this.tables = selection.map(item => item.tableName); | 84 | this.tables = selection.map(item => item.tableName); |
-
请 注册 或 登录 后发表评论