mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 18:45:06 +08:00
feat: 调整分页样式,增加获取选中行方法
This commit is contained in:
@ -2,10 +2,13 @@ import { ref, unref } from 'vue'
|
||||
import { XTableProps } from '@/components/XTable/src/type'
|
||||
|
||||
export interface tableMethod {
|
||||
reload: () => void
|
||||
reload: () => void // 刷新表格
|
||||
setProps: (props: XTableProps) => void
|
||||
deleteData: (ids: string | number) => void
|
||||
exportList: (fileName?: string) => void
|
||||
deleteData: (ids: string | number) => void // 删除数据
|
||||
exportList: (fileName?: string) => void // 导出列表
|
||||
getCurrentColumn: () => void // 获取当前列
|
||||
getRadioRecord: () => void // 获取当前选中列,redio
|
||||
getCheckboxRecords: () => void //获取当前选中列, checkbox
|
||||
}
|
||||
|
||||
export const useXTable = (props: XTableProps): [Function, tableMethod] => {
|
||||
@ -26,7 +29,10 @@ export const useXTable = (props: XTableProps): [Function, tableMethod] => {
|
||||
reload: () => getInstance().reload(),
|
||||
setProps: (props) => getInstance().setProps(props),
|
||||
deleteData: (ids: string | number) => getInstance().deleteData(ids),
|
||||
exportList: (fileName?: string) => getInstance().exportList(fileName)
|
||||
exportList: (fileName?: string) => getInstance().exportList(fileName),
|
||||
getCurrentColumn: () => getInstance().getCheckboxRecords(),
|
||||
getRadioRecord: () => getInstance().getRadioRecord(),
|
||||
getCheckboxRecords: () => getInstance().getCheckboxRecords()
|
||||
}
|
||||
return [register, methods]
|
||||
}
|
||||
|
Reference in New Issue
Block a user