@arco-vue-pro-components/pro-components
Version:
基于@arco-design/web-vue组件的高级组件,包括pro-table
1,295 lines (1,294 loc) • 40 kB
TypeScript
import { PropType, Ref } from 'vue';
import type { TableColumnData } from '@arco-design/web-vue';
import { PaginationProps, TableChangeExtra, TableBorder, TableRowSelection, TableExpandable, TableDraggable, ScrollbarProps } from '@arco-design/web-vue';
import type { ActionType, ColumnEmptyText, LightSearchConfig, ProColumns, ProTableTypes, ToolBarProps, RequestData, SearchConfig, TableOperationColumn, TableComponents, VirtualListProps, TableData, ColumnStateType, AlertRenderType } from './interface';
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* @zh 表格的列描述信息
* @en Column info of the table
*/
columns: {
type: PropType<ProColumns[]>;
default: () => never[];
};
/**
* @zh 表格行 `key` 的取值字段
* @en Value field of table row `key`
* @defaultValue 'id'
*/
rowKey: {
type: StringConstructor;
default: string;
};
/**
* @zh request 的参数,修改之后会触发更新
* @en Additional parameters used for `request` query, once changed will trigger reloading
* @example pathname 修改重新触发 request
*/
params: ObjectConstructor;
/**
* @zh 获取 `data` 的方法 | `(params?: {pageSize,current},sort,filter) => {data,success,total}`
* @en How to get `data` | `(params?: {pageSize,current},sort,filter) => {data,success,total}`
*/
request: {
type: PropType<(params: {
[key: string]: any;
pageSize?: number | undefined;
current?: number | undefined;
}, sort: {
[key: string]: "ascend" | "descend";
}, filter: {
[key: string]: any;
}) => Promise<RequestData<any>>>;
};
/**
* @zh 默认的数据
* @en Default data
*/
defaultData: ArrayConstructor;
/**
* @zh 格式化搜索表单提交数据
* @en Make some changes before searching
*/
beforeSearchSubmit: {
type: PropType<(searchParams: any) => any>;
default: (searchParams: any) => any;
};
/**
* @zh 是否显示搜索表单,传入对象时为搜索表单的配置
* @en Configuration column search related, false is hidden
* @type SearchConfig | boolean
* @defaultValue true
*/
search: {
type: PropType<boolean | SearchConfig>;
default: boolean;
};
/**
* @zh pro-table 类型
* @en pro-table type
* @type ProTableTypes
* @defaultValue 'table'
*/
type: {
type: PropType<ProTableTypes>;
default: string;
};
/**
* @zh 渲染工具栏右侧操作按钮,支持返回一个 dom 数组,会自动增加 margin-right,为false则不显示工具栏
* @en Render toolbar, support returning a dom array, will automatically increase margin-right
* @defaultValue undefined
*/
toolBarRender: {
type: PropType<false | ((data: import("./interface").ToolBarData<any>) => import("vue").VNodeTypes[]) | undefined>;
default: undefined;
};
/**
* @zh 自定义工具栏右侧表格操作按钮,为false则显示默认:reload(刷新)|density(表格密度)|setting(列设置)|fullScreen(全屏 默认不显示)
* @en Custom action bar
*/
optionsRender: {
type: PropType<false | ((props: ToolBarProps<any>, defaultDom: Element[]) => import("vue").VNodeTypes[]) | undefined>;
default: boolean;
};
/**
* @zh table 工具栏,设为 false 时不显示,传入 function 会点击时触发
* @en table toolbar, not displayed when set to false
* @defaultValue false
*/
options: {
type: PropType<boolean | import("./interface").OptionConfig | undefined>;
default: boolean;
};
/**
* @zh 表格标题
* @en table tilte
*/
headerTitle: {
type: PropType<string | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | ((data: import("./interface").ToolBarData<any>) => import("vue").VNodeTypes) | undefined>;
default: string;
};
/**
* @zh 表单初始化数据
* @en form init data
*/
defaultFormData: {
type: ObjectConstructor;
};
/**
* @zh 搜索表单类型
* @en search from type
* @defaultValue 'query'
*/
searchType: {
type: PropType<"query" | "light" | undefined>;
default: string;
};
/**
* @zh 高级搜索表单配置
* @en advanced search form setting
* @type LightSearchConfig
*/
lightSearchConfig: {
type: PropType<LightSearchConfig>;
};
/**
* @zh 可以获取到查询表单的 form 实例,用于一些灵活的配置
* @en The form instance of the query form can be obtained for some flexible configuration
*/
formRef: {
type: PropType<(formRef: Ref) => void>;
};
/**
* @zh Table action 的引用,便于自定义触发
* @en Reference to Table action for custom triggering
*/
actionRef: {
type: PropType<(actionRef: ActionType) => void>;
};
/**
* @zh 空值时的显示,不设置时显示 `-`, false 可以关闭此功能
* @en Display when it is empty, display `-` when it is not set, false can turn off this function
* @defaultValue '-'
*/
columnEmptyText: {
type: PropType<ColumnEmptyText>;
default: string;
};
/**
* @zh 表格选中
* @en table selected
*/
selected: {
type: ArrayConstructor;
};
/**
* @zh 表格默认选中
* @en table defaule selected
*/
defaultSelected: {
type: ArrayConstructor;
};
/**
* @zh 表格加载中
* @en table loading
*/
loading: {
type: BooleanConstructor;
default: undefined;
};
/**
* @zh 表格的数据
* @en Table data
*/
data: {
type: PropType<TableData[]>;
default: () => never[];
};
/**
* @zh 是否显示边框
* @en Whether to show the border
* @defaultValue true
*/
bordered: {
type: PropType<boolean | TableBorder>;
default: boolean;
};
/**
* @zh 是否显示选中效果
* @en Whether to show the hover effect
* @defaultValue true
*/
hoverable: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否开启斑马纹效果
* @en Whether to enable the stripe effect
* @defaultValue false
*/
stripe: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 表格的 table-layout 属性设置为 fixed,设置为 fixed 后,表格的宽度不会被内容撑开超出 100%。
* @en The table-layout property of the table is set to fixed. After it is set to fixed, the width of the table will not be stretched beyond 100% by the content.
*/
tableLayoutFixed: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 表格的行选择器配置
* @en Table row selector configuration
*/
rowSelection: {
type: PropType<TableRowSelection>;
};
/**
* @zh 表格的展开行配置
* @en Expand row configuration of the table
*/
expandable: {
type: PropType<TableExpandable>;
};
/**
* @zh 表格的滚动属性配置。`2.13.0` 版本增加字符型值的支持。`2.20.0` 版本增加 `minWidth`,`maxHeight` 的支持。
* @en Scrolling attribute configuration of the table. The `2.13.0` version adds support for character values. `2.20.0` version adds support for `minWidth`, `maxHeight`.
*/
scroll: {
type: PropType<{
x?: string | number | undefined;
y?: string | number | undefined;
minWidth?: string | number | undefined;
maxHeight?: string | number | undefined;
}>;
};
/**
* @zh 分页的属性配置
* @en Pagination properties configuration
* @defaultValue true
*/
pagination: {
type: PropType<boolean | PaginationProps>;
default: boolean;
};
/**
* @zh 分页选择器的位置
* @en The position of the page selector
* @values 'tl','top',tr','bl','bottom','br'
* @defaultValue 'br'
*/
pagePosition: {
type: PropType<"top" | "tl" | "tr" | "bottom" | "bl" | "br">;
default: string;
};
/**
* @zh 树形表格的缩进距离
* @en The indentation distance of the tree table
* @defaultValue 16
*/
indentSize: {
type: NumberConstructor;
default: number;
};
/**
* @zh 是否显示表头
* @en Whether to show the header
* @defaultValue true
*/
showHeader: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动 [VirtualListProps](#VirtualListProps)
* @en Pass the virtual list attribute, pass in this parameter to turn on virtual scrolling [VirtualListProps](#VirtualListProps)
* @type VirtualListProps
*/
virtualListProps: {
type: PropType<VirtualListProps>;
};
/**
* @zh 单元格合并方法(索引从数据项开始计数)
* @en Cell merge method (The index starts counting from the data item)
*/
spanMethod: {
type: PropType<(data: {
record: TableData;
column: TableColumnData | TableOperationColumn;
rowIndex: number;
columnIndex: number;
}) => {
rowspan?: number;
colspan?: number;
} | void>;
};
/**
* @zh 是否让合并方法的索引包含所有
* @en Whether to make the index of the span method contain all
*/
spanAll: {
type: BooleanConstructor;
default: boolean;
};
components: {
type: PropType<TableComponents>;
};
/**
* @zh 数据懒加载函数,传入时开启懒加载功能
* @en Data lazy loading function, open the lazy loading function when it is passed in
*/
loadMore: {
type: PropType<(record: TableData, done: (children?: TableData[] | undefined) => void) => void>;
};
/**
* @zh 筛选图标是否左对齐
* @en Whether the filter icon is aligned to the left
*/
filterIconAlignLeft: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否在子树为空时隐藏展开按钮
* @en Whether to hide expand button when subtree is empty
*/
hideExpandButtonOnEmpty: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 表格行元素的类名
* @en The class name of the table row element
*/
rowClass: {
type: PropType<string | any[] | Record<string, any> | ((record: TableData, rowIndex: number) => any)>;
};
/**
* @zh 表格拖拽排序的配置
* @en Table drag and drop sorting configuration
*/
draggable: {
type: PropType<TableDraggable>;
};
rowNumber: {
type: (ObjectConstructor | BooleanConstructor)[];
};
/**
* @zh 是否允许调整列宽
* @en Whether to allow the column width to be adjusted
*/
columnResizable: {
type: BooleanConstructor;
};
/**
* @zh 显示表尾总结行
* @en Show footer summary row
*/
summary: {
type: PropType<boolean | ((params: {
columns: TableColumnData[];
data: TableData[];
}) => TableData[])>;
};
/**
* @zh 总结行的首列文字
* @en The first column of text in the summary line
*/
summaryText: {
type: StringConstructor;
default: string;
};
/**
* @zh 总结行的单元格合并方法
* @en Cell Merge Method for Summarizing Rows
*/
summarySpanMethod: {
type: PropType<(data: {
record: TableData;
column: TableColumnData | TableOperationColumn;
rowIndex: number;
columnIndex: number;
}) => {
rowspan?: number;
colspan?: number;
} | void>;
};
/**
* @zh 已选择的行(受控模式)优先于 `rowSelection`
* @en Selected row (controlled mode) takes precedence over `rowSelection`
*/
selectedKeys: {
type: PropType<(string | number)[]>;
};
/**
* @zh 默认已选择的行(非受控模式)优先于 `rowSelection`
* @en The selected row by default (uncontrolled mode) takes precedence over `rowSelection`
*/
defaultSelectedKeys: {
type: PropType<(string | number)[]>;
};
/**
* @zh 显示的展开行、子树(受控模式)优先于 `expandable`
* @en Displayed Expanded Row, Subtree (Controlled Mode) takes precedence over `expandable`
*/
expandedKeys: {
type: PropType<(string | number)[]>;
};
/**
* @zh 默认显示的展开行、子树(非受控模式)优先于 `expandable`
* @en Expand row, Subtree displayed by default (Uncontrolled mode) takes precedence over `expandable`
*/
defaultExpandedKeys: {
type: PropType<(string | number)[]>;
};
/**
* @zh 是否默认展开所有的行
* @en Whether to expand all rows by default
*/
defaultExpandAllRows: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否开启表头吸顶
* @en Whether to open the sticky header
*/
stickyHeader: {
type: (BooleanConstructor | NumberConstructor)[];
default: boolean;
};
/**
* @zh 是否开启虚拟滚动条
* @en Whether to enable virtual scroll bar
*/
scrollbar: {
type: PropType<boolean | ScrollbarProps>;
default: boolean;
};
/**
* @zh 输入框大小
* @en Input size
* @values 'mini','small','medium','large'
* @defaultValue 'large'
*/
size: {
type: PropType<"mini" | "small" | "medium" | "large">;
default: () => "mini" | "small" | "medium" | "large";
};
/**
* @zh 表格数据发生变化时触发
* @en Triggered when table data changes
* @param {TableData[]} data
* @param {TableChangeExtra} extra
* @param {TableData[]} currentData
*/
onChange: {
type: PropType<(data: TableData[], extra: TableChangeExtra, currentData: TableData[]) => void>;
};
/**
* @zh 搜索表单提交时触发
* @en Triggered when search form submit
* @param {any} formData
*/
onSubmit: {
type: PropType<(formData: any) => void>;
};
/**
* @zh 搜索表单重置时触发
* @en Triggered when search form reset
*/
onReset: {
type: PropType<() => void>;
};
/**
* @zh 表格数据加载完后触发
* @en Triggered when table data load
* @param {any[]} data
* @param {number} total
* @param {any} extra
*/
onLoad: {
type: PropType<(data: any[], total: number, extra: any) => void>;
};
/**
* @zh 表格分页发生改变时触发
* @en Triggered when the table pagination changes
* @param {number} page
*/
onPageChange: {
type: PropType<(page: number) => void>;
};
/**
* @zh 表格每页数据数量发生改变时触发
* @en Triggered when the number of data per page of the table changes
* @param {number} pageSize
*/
onPageSizeChange: {
type: PropType<(pageSize: number) => void>;
};
/**
* @zh 点击展开行时触发
* @en Triggered when a row is clicked to expand
* @param {string | number} rowKey
* @param {TableData} record
*/
onExpand: {
type: PropType<(rowKey: string | number, record: TableData) => void>;
};
/**
* @zh 已展开的数据行发生改变时触发
* @en Triggered when the expanded data row changes
* @param {(string | number)[]} rowKeys
*/
onExpandedChange: {
type: PropType<(rowKeys: (string | number)[]) => void>;
};
/**
* @zh 点击行选择器时触发
* @en Triggered when the row selector is clicked
* @param {string | number[]} rowKeys
* @param {string | number} rowKey
* @param {TableData} record
*/
onSelect: {
type: PropType<(rowKeys: (string | number)[], rowKey: string | number, record: TableData) => void>;
};
/**
* @zh 点击全选选择器时触发
* @en Triggered when the select all selector is clicked
* @param {boolean} checked
*/
onSelectAll: {
type: PropType<(checked: boolean) => void>;
};
/**
* @zh 已选择的数据行发生改变时触发
* @en Triggered when the selected data row changes
* @param {(string | number)[]} rowKeys
*/
onSelectionChange: {
type: PropType<(rowKeys: (string | number)[]) => void>;
};
/**
* @zh 排序规则发生改变时触发
* @en Triggered when the collation changes
* @param {string} dataIndex
* @param {string} direction
*/
onSorterChange: {
type: PropType<(dataIndex: string, direction: string) => void>;
};
/**
* @zh 过滤选项发生改变时触发
* @en Triggered when the filter options are changed
* @param {string} dataIndex
* @param {string[]} filteredValues
*/
onFilterChange: {
type: PropType<(dataIndex: string, filteredValues: string[]) => void>;
};
/**
* @zh 点击单元格时触发
* @en Triggered when a cell is clicked
* @param {TableData} record
* @param {TableColumnData} column
* @param {Event} ev
*/
onCellClick: {
type: PropType<(record: TableData, column: TableColumnData, ev: Event) => void>;
};
/**
* @zh 点击行数据时触发
* @en Triggered when row data is clicked
* @param {TableData} record
* @param {Event} ev
*/
onRowClick: {
type: PropType<(record: TableData, ev: Event) => void>;
};
/**
* @zh 点击表头数据时触发
* @en Triggered when the header data is clicked
* @param {TableColumnData} column
* @param {Event} ev
*/
onHeaderClick: {
type: PropType<(column: TableColumnData, ev: Event) => void>;
};
/**
* @zh 调整列宽时触发
* @en Triggered when column width is adjusted
* @param {string} dataIndex
* @param {number} width
*/
onColumnResize: {
type: PropType<(dataIndex: string, width: number) => void>;
};
/**
* @zh 列状态的配置,可以用来操作列功能
* @en Column state configuration, which can be used to operate column functions
*/
columnsState: {
type: PropType<ColumnStateType>;
};
/**
* @zh 自定义 table 的 alert 的操作
* @en Custom table alert operation
*/
alertRender: {
type: PropType<AlertRenderType>;
default: undefined;
};
}>, {
render: () => any;
selectedRowKeys: Ref<import("./interface").BaseType[], import("./interface").BaseType[]>;
selectedRows: Ref<any[], any[]>;
getSelected: () => {
selectedKeys: import("./interface").BaseType[];
selectedRows: any[];
};
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* @zh 表格的列描述信息
* @en Column info of the table
*/
columns: {
type: PropType<ProColumns[]>;
default: () => never[];
};
/**
* @zh 表格行 `key` 的取值字段
* @en Value field of table row `key`
* @defaultValue 'id'
*/
rowKey: {
type: StringConstructor;
default: string;
};
/**
* @zh request 的参数,修改之后会触发更新
* @en Additional parameters used for `request` query, once changed will trigger reloading
* @example pathname 修改重新触发 request
*/
params: ObjectConstructor;
/**
* @zh 获取 `data` 的方法 | `(params?: {pageSize,current},sort,filter) => {data,success,total}`
* @en How to get `data` | `(params?: {pageSize,current},sort,filter) => {data,success,total}`
*/
request: {
type: PropType<(params: {
[key: string]: any;
pageSize?: number | undefined;
current?: number | undefined;
}, sort: {
[key: string]: "ascend" | "descend";
}, filter: {
[key: string]: any;
}) => Promise<RequestData<any>>>;
};
/**
* @zh 默认的数据
* @en Default data
*/
defaultData: ArrayConstructor;
/**
* @zh 格式化搜索表单提交数据
* @en Make some changes before searching
*/
beforeSearchSubmit: {
type: PropType<(searchParams: any) => any>;
default: (searchParams: any) => any;
};
/**
* @zh 是否显示搜索表单,传入对象时为搜索表单的配置
* @en Configuration column search related, false is hidden
* @type SearchConfig | boolean
* @defaultValue true
*/
search: {
type: PropType<boolean | SearchConfig>;
default: boolean;
};
/**
* @zh pro-table 类型
* @en pro-table type
* @type ProTableTypes
* @defaultValue 'table'
*/
type: {
type: PropType<ProTableTypes>;
default: string;
};
/**
* @zh 渲染工具栏右侧操作按钮,支持返回一个 dom 数组,会自动增加 margin-right,为false则不显示工具栏
* @en Render toolbar, support returning a dom array, will automatically increase margin-right
* @defaultValue undefined
*/
toolBarRender: {
type: PropType<false | ((data: import("./interface").ToolBarData<any>) => import("vue").VNodeTypes[]) | undefined>;
default: undefined;
};
/**
* @zh 自定义工具栏右侧表格操作按钮,为false则显示默认:reload(刷新)|density(表格密度)|setting(列设置)|fullScreen(全屏 默认不显示)
* @en Custom action bar
*/
optionsRender: {
type: PropType<false | ((props: ToolBarProps<any>, defaultDom: Element[]) => import("vue").VNodeTypes[]) | undefined>;
default: boolean;
};
/**
* @zh table 工具栏,设为 false 时不显示,传入 function 会点击时触发
* @en table toolbar, not displayed when set to false
* @defaultValue false
*/
options: {
type: PropType<boolean | import("./interface").OptionConfig | undefined>;
default: boolean;
};
/**
* @zh 表格标题
* @en table tilte
*/
headerTitle: {
type: PropType<string | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | ((data: import("./interface").ToolBarData<any>) => import("vue").VNodeTypes) | undefined>;
default: string;
};
/**
* @zh 表单初始化数据
* @en form init data
*/
defaultFormData: {
type: ObjectConstructor;
};
/**
* @zh 搜索表单类型
* @en search from type
* @defaultValue 'query'
*/
searchType: {
type: PropType<"query" | "light" | undefined>;
default: string;
};
/**
* @zh 高级搜索表单配置
* @en advanced search form setting
* @type LightSearchConfig
*/
lightSearchConfig: {
type: PropType<LightSearchConfig>;
};
/**
* @zh 可以获取到查询表单的 form 实例,用于一些灵活的配置
* @en The form instance of the query form can be obtained for some flexible configuration
*/
formRef: {
type: PropType<(formRef: Ref) => void>;
};
/**
* @zh Table action 的引用,便于自定义触发
* @en Reference to Table action for custom triggering
*/
actionRef: {
type: PropType<(actionRef: ActionType) => void>;
};
/**
* @zh 空值时的显示,不设置时显示 `-`, false 可以关闭此功能
* @en Display when it is empty, display `-` when it is not set, false can turn off this function
* @defaultValue '-'
*/
columnEmptyText: {
type: PropType<ColumnEmptyText>;
default: string;
};
/**
* @zh 表格选中
* @en table selected
*/
selected: {
type: ArrayConstructor;
};
/**
* @zh 表格默认选中
* @en table defaule selected
*/
defaultSelected: {
type: ArrayConstructor;
};
/**
* @zh 表格加载中
* @en table loading
*/
loading: {
type: BooleanConstructor;
default: undefined;
};
/**
* @zh 表格的数据
* @en Table data
*/
data: {
type: PropType<TableData[]>;
default: () => never[];
};
/**
* @zh 是否显示边框
* @en Whether to show the border
* @defaultValue true
*/
bordered: {
type: PropType<boolean | TableBorder>;
default: boolean;
};
/**
* @zh 是否显示选中效果
* @en Whether to show the hover effect
* @defaultValue true
*/
hoverable: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否开启斑马纹效果
* @en Whether to enable the stripe effect
* @defaultValue false
*/
stripe: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 表格的 table-layout 属性设置为 fixed,设置为 fixed 后,表格的宽度不会被内容撑开超出 100%。
* @en The table-layout property of the table is set to fixed. After it is set to fixed, the width of the table will not be stretched beyond 100% by the content.
*/
tableLayoutFixed: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 表格的行选择器配置
* @en Table row selector configuration
*/
rowSelection: {
type: PropType<TableRowSelection>;
};
/**
* @zh 表格的展开行配置
* @en Expand row configuration of the table
*/
expandable: {
type: PropType<TableExpandable>;
};
/**
* @zh 表格的滚动属性配置。`2.13.0` 版本增加字符型值的支持。`2.20.0` 版本增加 `minWidth`,`maxHeight` 的支持。
* @en Scrolling attribute configuration of the table. The `2.13.0` version adds support for character values. `2.20.0` version adds support for `minWidth`, `maxHeight`.
*/
scroll: {
type: PropType<{
x?: string | number | undefined;
y?: string | number | undefined;
minWidth?: string | number | undefined;
maxHeight?: string | number | undefined;
}>;
};
/**
* @zh 分页的属性配置
* @en Pagination properties configuration
* @defaultValue true
*/
pagination: {
type: PropType<boolean | PaginationProps>;
default: boolean;
};
/**
* @zh 分页选择器的位置
* @en The position of the page selector
* @values 'tl','top',tr','bl','bottom','br'
* @defaultValue 'br'
*/
pagePosition: {
type: PropType<"top" | "tl" | "tr" | "bottom" | "bl" | "br">;
default: string;
};
/**
* @zh 树形表格的缩进距离
* @en The indentation distance of the tree table
* @defaultValue 16
*/
indentSize: {
type: NumberConstructor;
default: number;
};
/**
* @zh 是否显示表头
* @en Whether to show the header
* @defaultValue true
*/
showHeader: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动 [VirtualListProps](#VirtualListProps)
* @en Pass the virtual list attribute, pass in this parameter to turn on virtual scrolling [VirtualListProps](#VirtualListProps)
* @type VirtualListProps
*/
virtualListProps: {
type: PropType<VirtualListProps>;
};
/**
* @zh 单元格合并方法(索引从数据项开始计数)
* @en Cell merge method (The index starts counting from the data item)
*/
spanMethod: {
type: PropType<(data: {
record: TableData;
column: TableColumnData | TableOperationColumn;
rowIndex: number;
columnIndex: number;
}) => {
rowspan?: number;
colspan?: number;
} | void>;
};
/**
* @zh 是否让合并方法的索引包含所有
* @en Whether to make the index of the span method contain all
*/
spanAll: {
type: BooleanConstructor;
default: boolean;
};
components: {
type: PropType<TableComponents>;
};
/**
* @zh 数据懒加载函数,传入时开启懒加载功能
* @en Data lazy loading function, open the lazy loading function when it is passed in
*/
loadMore: {
type: PropType<(record: TableData, done: (children?: TableData[] | undefined) => void) => void>;
};
/**
* @zh 筛选图标是否左对齐
* @en Whether the filter icon is aligned to the left
*/
filterIconAlignLeft: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否在子树为空时隐藏展开按钮
* @en Whether to hide expand button when subtree is empty
*/
hideExpandButtonOnEmpty: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 表格行元素的类名
* @en The class name of the table row element
*/
rowClass: {
type: PropType<string | any[] | Record<string, any> | ((record: TableData, rowIndex: number) => any)>;
};
/**
* @zh 表格拖拽排序的配置
* @en Table drag and drop sorting configuration
*/
draggable: {
type: PropType<TableDraggable>;
};
rowNumber: {
type: (ObjectConstructor | BooleanConstructor)[];
};
/**
* @zh 是否允许调整列宽
* @en Whether to allow the column width to be adjusted
*/
columnResizable: {
type: BooleanConstructor;
};
/**
* @zh 显示表尾总结行
* @en Show footer summary row
*/
summary: {
type: PropType<boolean | ((params: {
columns: TableColumnData[];
data: TableData[];
}) => TableData[])>;
};
/**
* @zh 总结行的首列文字
* @en The first column of text in the summary line
*/
summaryText: {
type: StringConstructor;
default: string;
};
/**
* @zh 总结行的单元格合并方法
* @en Cell Merge Method for Summarizing Rows
*/
summarySpanMethod: {
type: PropType<(data: {
record: TableData;
column: TableColumnData | TableOperationColumn;
rowIndex: number;
columnIndex: number;
}) => {
rowspan?: number;
colspan?: number;
} | void>;
};
/**
* @zh 已选择的行(受控模式)优先于 `rowSelection`
* @en Selected row (controlled mode) takes precedence over `rowSelection`
*/
selectedKeys: {
type: PropType<(string | number)[]>;
};
/**
* @zh 默认已选择的行(非受控模式)优先于 `rowSelection`
* @en The selected row by default (uncontrolled mode) takes precedence over `rowSelection`
*/
defaultSelectedKeys: {
type: PropType<(string | number)[]>;
};
/**
* @zh 显示的展开行、子树(受控模式)优先于 `expandable`
* @en Displayed Expanded Row, Subtree (Controlled Mode) takes precedence over `expandable`
*/
expandedKeys: {
type: PropType<(string | number)[]>;
};
/**
* @zh 默认显示的展开行、子树(非受控模式)优先于 `expandable`
* @en Expand row, Subtree displayed by default (Uncontrolled mode) takes precedence over `expandable`
*/
defaultExpandedKeys: {
type: PropType<(string | number)[]>;
};
/**
* @zh 是否默认展开所有的行
* @en Whether to expand all rows by default
*/
defaultExpandAllRows: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否开启表头吸顶
* @en Whether to open the sticky header
*/
stickyHeader: {
type: (BooleanConstructor | NumberConstructor)[];
default: boolean;
};
/**
* @zh 是否开启虚拟滚动条
* @en Whether to enable virtual scroll bar
*/
scrollbar: {
type: PropType<boolean | ScrollbarProps>;
default: boolean;
};
/**
* @zh 输入框大小
* @en Input size
* @values 'mini','small','medium','large'
* @defaultValue 'large'
*/
size: {
type: PropType<"mini" | "small" | "medium" | "large">;
default: () => "mini" | "small" | "medium" | "large";
};
/**
* @zh 表格数据发生变化时触发
* @en Triggered when table data changes
* @param {TableData[]} data
* @param {TableChangeExtra} extra
* @param {TableData[]} currentData
*/
onChange: {
type: PropType<(data: TableData[], extra: TableChangeExtra, currentData: TableData[]) => void>;
};
/**
* @zh 搜索表单提交时触发
* @en Triggered when search form submit
* @param {any} formData
*/
onSubmit: {
type: PropType<(formData: any) => void>;
};
/**
* @zh 搜索表单重置时触发
* @en Triggered when search form reset
*/
onReset: {
type: PropType<() => void>;
};
/**
* @zh 表格数据加载完后触发
* @en Triggered when table data load
* @param {any[]} data
* @param {number} total
* @param {any} extra
*/
onLoad: {
type: PropType<(data: any[], total: number, extra: any) => void>;
};
/**
* @zh 表格分页发生改变时触发
* @en Triggered when the table pagination changes
* @param {number} page
*/
onPageChange: {
type: PropType<(page: number) => void>;
};
/**
* @zh 表格每页数据数量发生改变时触发
* @en Triggered when the number of data per page of the table changes
* @param {number} pageSize
*/
onPageSizeChange: {
type: PropType<(pageSize: number) => void>;
};
/**
* @zh 点击展开行时触发
* @en Triggered when a row is clicked to expand
* @param {string | number} rowKey
* @param {TableData} record
*/
onExpand: {
type: PropType<(rowKey: string | number, record: TableData) => void>;
};
/**
* @zh 已展开的数据行发生改变时触发
* @en Triggered when the expanded data row changes
* @param {(string | number)[]} rowKeys
*/
onExpandedChange: {
type: PropType<(rowKeys: (string | number)[]) => void>;
};
/**
* @zh 点击行选择器时触发
* @en Triggered when the row selector is clicked
* @param {string | number[]} rowKeys
* @param {string | number} rowKey
* @param {TableData} record
*/
onSelect: {
type: PropType<(rowKeys: (string | number)[], rowKey: string | number, record: TableData) => void>;
};
/**
* @zh 点击全选选择器时触发
* @en Triggered when the select all selector is clicked
* @param {boolean} checked
*/
onSelectAll: {
type: PropType<(checked: boolean) => void>;
};
/**
* @zh 已选择的数据行发生改变时触发
* @en Triggered when the selected data row changes
* @param {(string | number)[]} rowKeys
*/
onSelectionChange: {
type: PropType<(rowKeys: (string | number)[]) => void>;
};
/**
* @zh 排序规则发生改变时触发
* @en Triggered when the collation changes
* @param {string} dataIndex
* @param {string} direction
*/
onSorterChange: {
type: PropType<(dataIndex: string, direction: string) => void>;
};
/**
* @zh 过滤选项发生改变时触发
* @en Triggered when the filter options are changed
* @param {string} dataIndex
* @param {string[]} filteredValues
*/
onFilterChange: {
type: PropType<(dataIndex: string, filteredValues: string[]) => void>;
};
/**
* @zh 点击单元格时触发
* @en Triggered when a cell is clicked
* @param {TableData} record
* @param {TableColumnData} column
* @param {Event} ev
*/
onCellClick: {
type: PropType<(record: TableData, column: TableColumnData, ev: Event) => void>;
};
/**
* @zh 点击行数据时触发
* @en Triggered when row data is clicked
* @param {TableData} record
* @param {Event} ev
*/
onRowClick: {
type: PropType<(record: TableData, ev: Event) => void>;
};
/**
* @zh 点击表头数据时触发
* @en Triggered when the header data is clicked
* @param {TableColumnData} column
* @param {Event} ev
*/
onHeaderClick: {
type: PropType<(column: TableColumnData, ev: Event) => void>;
};
/**
* @zh 调整列宽时触发
* @en Triggered when column width is adjusted
* @param {string} dataIndex
* @param {number} width
*/
onColumnResize: {
type: PropType<(dataIndex: string, width: number) => void>;
};
/**
* @zh 列状态的配置,可以用来操作列功能
* @en Column state configuration, which can be used to operate column functions
*/
columnsState: {
type: PropType<ColumnStateType>;
};
/**
* @zh 自定义 table 的 alert 的操作
* @en Custom table alert operation
*/
alertRender: {
type: PropType<AlertRenderType>;
default: undefined;
};
}>> & Readonly<{}>, {
size: "mini" | "small" | "medium" | "large";
search: boolean | SearchConfig;
bordered: boolean | TableBorder;
options: boolean | import("./interface").OptionConfig | undefined;
type: ProTableTypes;
toolBarRender: false | ((data: import("./interface").ToolBarData<any>) => import("vue").VNodeTypes[]) | undefined;
optionsRender: false | ((props: ToolBarProps<any>, defaultDom: Element[]) => import("vue").VNodeTypes[]) | undefined;
headerTitle: string | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | ((data: import("./interface").ToolBarData<any>) => import("vue").VNodeTypes) | undefined;
searchType: "query" | "light" | undefined;
columns: ProColumns[];
data: TableData[];
pagination: boolean | PaginationProps;
pagePosition: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
rowKey: string;
beforeSearchSubmit: (searchParams: any) => any;
columnEmptyText: ColumnEmptyText;
loading: boolean;
hoverable: boolean;
stripe: boolean;
tableLayoutFixed: boolean;
indentSize: number;
showHeader: boolean;
spanAll: boolean;
filterIconAlignLeft: boolean;
hideExpandButtonOnEmpty: boolean;
columnResizable: boolean;
summaryText: string;
defaultExpandAllRows: boolean;
stickyHeader: number | boolean;
scrollbar: boolean | ScrollbarProps;
alertRender: AlertRenderType;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;