feat: 通用的表格复选框是否选中事件
This commit is contained in:
parent
162b3207fd
commit
c6984c164c
@ -1,6 +1,10 @@
|
||||
import { h } from 'vue';
|
||||
import { h, type Ref } from 'vue';
|
||||
|
||||
import { setupVbenVxeTable, useVbenVxeGrid } from '@vben/plugins/vxe-table';
|
||||
import {
|
||||
setupVbenVxeTable,
|
||||
useVbenVxeGrid,
|
||||
type VxeGridDefines,
|
||||
} from '@vben/plugins/vxe-table';
|
||||
|
||||
import { Button, Image } from 'ant-design-vue';
|
||||
|
||||
@ -94,3 +98,18 @@ setupVbenVxeTable({
|
||||
export { useVbenVxeGrid };
|
||||
|
||||
export type * from '@vben/plugins/vxe-table';
|
||||
|
||||
/**
|
||||
* 暂时没用上,先保留
|
||||
* 通用的表格复选框是否选中事件
|
||||
* @param checked 是否选中
|
||||
* @returns function
|
||||
*/
|
||||
export function tableCheckboxEvent(checked: Ref<boolean>) {
|
||||
const event: (params: VxeGridDefines.CheckboxChangeEventParams) => void = (
|
||||
params,
|
||||
) => {
|
||||
checked.value = params.$table.getCheckboxRecords().length > 0;
|
||||
};
|
||||
return event;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
export { setupVbenVxeTable } from './init';
|
||||
export * from './use-vxe-grid';
|
||||
export { default as VbenVxeGrid } from './use-vxe-grid.vue';
|
||||
export type { VxeGridListeners, VxeGridProps } from 'vxe-table';
|
||||
export type { VxeGridDefines, VxeGridListeners, VxeGridProps } from 'vxe-table';
|
||||
|
Loading…
Reference in New Issue
Block a user