diff --git a/src/views/mnt/database/index.vue b/src/views/mnt/database/index.vue index fb31149..b61d08b 100644 --- a/src/views/mnt/database/index.vue +++ b/src/views/mnt/database/index.vue @@ -56,7 +56,7 @@ - + @@ -142,9 +142,16 @@ export default { execute() { this.$refs.execute.dialog = true }, - handleCurrentChange(row) { - this.currentRow = row - this.selectIndex = !row ? null : row.id + handleCurrentChange(selection) { + this.crud.selections = selection + if (selection.length === 1) { + const row = selection[0] + this.selectIndex = row.id + this.currentRow = row + } else { + this.currentRow = {} + this.selectIndex = '' + } } } } diff --git a/src/views/mnt/deploy/index.vue b/src/views/mnt/deploy/index.vue index c57a0e8..ff1cd69 100644 --- a/src/views/mnt/deploy/index.vue +++ b/src/views/mnt/deploy/index.vue @@ -96,7 +96,7 @@ - + @@ -187,13 +187,20 @@ export default { sysRestore() { this.$refs.sysRestore.dialog = true }, - handleCurrentChange(row) { - this.currentRow = row - this.selectIndex = !row ? null : row.id - this.appName = !row ? null : row.app.name - this.times = this.times + !row ? 0 : 1 - this.appId = !row ? null : row.appId - this.deployId = !row ? null : row.id + handleCurrentChange(selection) { + this.crud.selections = selection + if (selection.length === 1) { + const row = selection[0] + this.selectIndex = row.id + this.currentRow = row + this.appName = row.app.name + this.times = this.times + 1 + this.appId = row.appId + this.deployId = row.id + } else { + this.currentRow = {} + this.selectIndex = '' + } }, startServer() { crudDeploy.startServer(JSON.stringify(this.currentRow))