Commit 61909b64 authored by zhengke's avatar zhengke

no message

parent 1662c4f6
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
} }
const selectData = (row: any, column: any, event: Event) =>{ const selectData = (row: any, column: any, event: Event) =>{
multipleTableRef.value!.toggleRowSelection(row) if(multipleTableRef.value) multipleTableRef.value!.toggleRowSelection(row)
} }
const handleSelectionChange = (val: []) =>{ const handleSelectionChange = (val: []) =>{
multipleSelection.value = val.map(x=>{return x}) multipleSelection.value = val.map(x=>{return x})
...@@ -180,13 +180,15 @@ ...@@ -180,13 +180,15 @@
} }
const toggleSelection = (rows:any,state:undefined) => { const toggleSelection = (rows:any,state:undefined) => {
if (rows) { if(multipleTableRef.value){
rows.forEach((row) => { if (rows) {
multipleTableRef.value!.toggleRowSelection(row, state) rows.forEach((row) => {
}) multipleTableRef.value!.toggleRowSelection(row, state)
} else { })
if(state) multipleTableRef.value.toggleAllSelection(state) } else {
else multipleTableRef.value!.clearSelection() 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