feat: 添加批量删除功能

This commit is contained in:
xingyu
2023-01-17 12:10:20 +08:00
parent 28ea779f83
commit f4a8dd4d7d
3 changed files with 51 additions and 4 deletions

View File

@ -4,7 +4,8 @@ import { XTableProps } from '@/components/XTable/src/type'
export interface tableMethod {
reload: () => void // 刷新表格
setProps: (props: XTableProps) => void
deleteData: (ids: string | number) => void // 删除数据
deleteData: (id: string | number) => void // 删除数据
deleteList: () => void // 批量删除
exportList: (fileName?: string) => void // 导出列表
getCurrentColumn: () => void // 获取当前列
getRadioRecord: () => void // 获取当前选中列redio
@ -28,7 +29,8 @@ export const useXTable = (props: XTableProps): [Function, tableMethod] => {
const methods: tableMethod = {
reload: () => getInstance().reload(),
setProps: (props) => getInstance().setProps(props),
deleteData: (ids: string | number) => getInstance().deleteData(ids),
deleteData: (id: string | number) => getInstance().deleteData(id),
deleteList: () => getInstance().deleteList(),
exportList: (fileName?: string) => getInstance().exportList(fileName),
getCurrentColumn: () => getInstance().getCheckboxRecords(),
getRadioRecord: () => getInstance().getRadioRecord(),