解决无法多选bug

main
liujun 2023-12-23 10:50:36 +08:00
parent 735338ed11
commit b1d32efa49
1 changed files with 12 additions and 3 deletions

View File

@ -30,11 +30,13 @@
ref="multipleTable" ref="multipleTable"
:data="varList" :data="varList"
:header-cell-style="{'font-weight': 'bold','color': '#000'}" :header-cell-style="{'font-weight': 'bold','color': '#000'}"
:row-key="getRowKeys"
tooltip-effect="dark" tooltip-effect="dark"
border border
fit fit
highlight-current-row> highlight-current-row
<el-table-column type="selection" width="55" align="center"/> @selection-change="handleSelectionChange">
<el-table-column :reserve-selection="true" type="selection" width="55" align="center"/>
<el-table-column type="index" label="序号" width="50" align="center"/> <el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="USERNAME" label="用户名" align="center"/> <el-table-column prop="USERNAME" label="用户名" align="center"/>
<el-table-column prop="NAME" label="姓名" align="center"/> <el-table-column prop="NAME" label="姓名" align="center"/>
@ -108,7 +110,8 @@ export default {
STATUS: '', STATUS: '',
add: false, // add: false, //
del: false, // del: false, //
edit: false // edit: false, //
multipleSelection: []
} }
}, },
created() { created() {
@ -222,6 +225,12 @@ export default {
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
},
getRowKeys(row) {
return row.XGF_USER_ID
},
handleSelectionChange(val) {
console.log(val)
} }
} }
} }