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