feat(Table): add custom @select:all event (#2581)

This commit is contained in:
kyyy
2024-11-10 00:48:52 +07:00
committed by GitHub
parent d4e408cfd8
commit ac323c4ccc
2 changed files with 38 additions and 1 deletions

View File

@@ -269,7 +269,7 @@ export default defineComponent({
default: false
}
},
emits: ['update:modelValue', 'update:sort', 'update:expand'],
emits: ['update:modelValue', 'update:sort', 'update:expand', 'select:all'],
setup(props, { emit, attrs: $attrs }) {
const { ui, attrs } = useUI('table', toRef(props, 'ui'), config, toRef(props, 'class'))
@@ -407,6 +407,7 @@ export default defineComponent({
} else {
selected.value = []
}
emit('select:all', checked)
}
function onChangeCheckbox(checked: boolean, row: TableRow) {