mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-08 08:05:07 +08:00
feat: 完善xtable组件
This commit is contained in:
@ -4,6 +4,8 @@ import { XTableProps } from '@/components/XTable/src/type'
|
||||
export interface tableMethod {
|
||||
reload: () => void
|
||||
setProps: (props: XTableProps) => void
|
||||
deleteData: (ids: string | number) => void
|
||||
exportList: (fileName?: string) => void
|
||||
}
|
||||
|
||||
export function useXTable(props: XTableProps): [Function, tableMethod] {
|
||||
@ -22,7 +24,9 @@ export function useXTable(props: XTableProps): [Function, tableMethod] {
|
||||
}
|
||||
const methods: tableMethod = {
|
||||
reload: () => getInstance().reload(),
|
||||
setProps: (props) => getInstance().setProps(props)
|
||||
setProps: (props) => getInstance().setProps(props),
|
||||
deleteData: (ids: string | number) => getInstance().deleteData(ids),
|
||||
exportList: (fileName?: string) => getInstance().exportList(fileName)
|
||||
}
|
||||
return [register, methods]
|
||||
}
|
||||
|
Reference in New Issue
Block a user