UNPKG

@zhsz/cool-design-crud

Version:

56 lines (55 loc) 2.14 kB
import { Ref } from 'vue'; import type { VxeGridDefines, VxeGridPropTypes, VxeTableDataRow, VxeTableDefines, VxeTablePropTypes, VxeGridProps, VxeGrid } from 'vxe-table'; declare type Emit = (name: 'selection-change' | 'sort-change', ...args: any[]) => void; declare type Table = Vue.Ref<any>; declare type Config = ClTable.Config; export declare function useSort({ config, emit, Table }: { config: Config; emit: Emit; Table: Table; }): { defaultSort: VxeTablePropTypes.SortConfigDefaultSort; onSortChange: (params: VxeTableDefines.SortChangeEventParams) => void; changeSort: (prop: string, order: string) => void; }; export declare function useRow({ Table, config, emit }: { Table: Table; config: Config; emit: Emit; }): { menuConfig: VxeTablePropTypes.MenuConfig<VxeTableDataRow>; onRowContextMenu: ({ row, column, $event, menu, $table }: VxeTableDefines.MenuClickEventParams) => Promise<void>; }; export declare function useHeight({ config, Table }: { Table: Table; config: Config; }): { isAuto: import("vue").ComputedRef<boolean | undefined>; maxHeight: Ref<number>; calcMaxHeight: (this: any, ...args: any[]) => any; }; export declare function useSelection({ emit, Table }: { emit: Emit; Table: Table; }): { selection: obj[]; onRadioChange: ({ row }: VxeTableDefines.RadioChangeEventParams) => Promise<void>; onCheckboxAll: ({ $table }: VxeGridDefines.CheckboxAllEventParams) => void; onCheckboxChange: ({ $table }: VxeTableDefines.CheckboxChangeEventParams) => Promise<void>; clearCheckbox: () => Promise<void>; }; export declare function useData({ Table, config }: { config: Config; Table: Table; }): { data: Ref<any[]>; setData: (list: any[]) => void; }; export declare function useRender(): { renderEmpty: (emptyText: string) => import("vue/jsx-runtime").JSX.Element; renderAppend: () => import("vue/jsx-runtime").JSX.Element; }; export declare function useTransformColumns(columns: ClTable.ClColumns[], config?: VxeGridProps, Table?: Ref<typeof VxeGrid & { $slots: any; }>): VxeGridPropTypes.Columns; export {};