Commit 61909b64 authored by zhengke's avatar zhengke

no message

parent 1662c4f6
......@@ -135,7 +135,7 @@
}
const selectData = (row: any, column: any, event: Event) =>{
multipleTableRef.value!.toggleRowSelection(row)
if(multipleTableRef.value) multipleTableRef.value!.toggleRowSelection(row)
}
const handleSelectionChange = (val: []) =>{
multipleSelection.value = val.map(x=>{return x})
......@@ -180,13 +180,15 @@
}
const toggleSelection = (rows:any,state:undefined) => {
if (rows) {
rows.forEach((row) => {
multipleTableRef.value!.toggleRowSelection(row, state)
})
} else {
if(state) multipleTableRef.value.toggleAllSelection(state)
else multipleTableRef.value!.clearSelection()
if(multipleTableRef.value){
if (rows) {
rows.forEach((row) => {
multipleTableRef.value!.toggleRowSelection(row, state)
})
} else {
if(state) multipleTableRef.value.toggleAllSelection(state)
else multipleTableRef.value!.clearSelection()
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment