diff --git a/src/apps/machine/list.vue b/src/apps/machine/list.vue index 658dc2d..49d5be5 100644 --- a/src/apps/machine/list.vue +++ b/src/apps/machine/list.vue @@ -64,9 +64,22 @@ export default class MachineList extends Vue { }) } + // 选择主机 + + public selectedRow: MachineItem[] = [] + + public tableRowChange(ids: (string | number)[]) { + this.selectedRow = [] + for (let id of ids) { + const m = this.machineList.find(item => item.Id === id) + m && this.selectedRow.push(m) + } + } + // 表格定义 public tableColumns = [ + { colKey: 'row-select', type: 'multiple', width: "30px" }, { colKey: 'HostName', title: '主机名', ellipsis: true }, { colKey: 'IpAddress', title: '公网 IP', ellipsis: true }, { colKey: 'Region', title: '地域', ellipsis: true }, @@ -94,7 +107,15 @@ export default class MachineList extends Vue { - + +