import { Ref } from 'vue'; import type { BaseTableOptions, BaseOptions, BaseTableApi, TableApiProps, TablePagerProps } from './config'; import type { VxeGridPropTypes } from 'vxe-table'; /** * 基础查询表格 */ export declare class BaseTable { _options: BaseTableOptions; _loading: Ref; _toggleLoading: (value: boolean | undefined) => boolean; _filters: Ref; _api: BaseTableApi; /** * 基础表格构造器 * @param {object} options 表格默认配置项 */ constructor(options?: BaseTableOptions); /** * 设置表格数据 */ setData(data: T[]): this; /** * 获取表格数据 */ getData(): import("vxe-table").VxeTablePropTypes.Data | undefined; /** * 设置表格列配置 */ setColumns(columns: VxeGridPropTypes.Columns): this; /** * 初始化分页器事件 */ _initPagerEvents(): void; /** * 设置分页器 * 此处配置的别名优先级更高 */ setPager(pager: TablePagerProps): this; /** * 获取分页器状态 */ getPager(): (VxeGridPropTypes.PagerConfig & { pageKey?: string | undefined; pageSizeKey?: string | undefined; }) | undefined; /** * 设置表格查询参数 */ setFilters(filters: Ref): this; /** * 设置表格接口 * @param params 查询接口函数或查询接口的配置对象 */ setApi(params: TableApiProps): void; /** * 表格数据加载方法 * @param data 接口额外传递的参数(最高优先级, 将覆盖filters和pager中的同名参数) */ fetchData: (data?: Record) => void; use: () => { tableOptions: BaseTableOptions; tableLoading: Ref; fetchData: (data?: Record) => void; }; }