fix: update

This commit is contained in:
btea 2025-01-01 10:49:08 +08:00
parent b75a07892e
commit 957dda6b12

View File

@ -217,18 +217,12 @@ function useWatcher<T>() {
)
selection.value = newSelection
instance.emit('selection-change', newSelection.slice())
} else {
const hasSortChanged = selection.value.some(
(item, index) => item !== data.value[index]
)
if (hasSortChanged) {
selection.value = data.value.slice()
}
}
}
const getSelectionRows = () => {
return (selection.value || []).slice()
const selectionList = (selection.value || []).slice()
return data.value.filter((item) => selectionList.includes(item))
}
const toggleRowSelection = (