UNPKG

element-plus

Version:

A Component Library for Vue 3

437 lines (436 loc) 26.3 kB
import type { Table, TableProps } from '../table/defaults'; export declare function createStore<T>(table: Table<T>, props: TableProps<T>): { mutations: { setData(states: { _currentRowKey: import("vue").Ref<string>; currentRow: import("vue").Ref<T>; expandRowKeys: import("vue").Ref<string[]>; treeData: import("vue").Ref<unknown>; indent: import("vue").Ref<number>; lazy: import("vue").Ref<boolean>; lazyTreeNodeMap: import("vue").Ref<{}>; lazyColumnIdentifier: import("vue").Ref<string>; childrenColumnName: import("vue").Ref<string>; checkStrictly: import("vue").Ref<boolean>; expandRows: import("vue").Ref<T[]>; defaultExpandAll: import("vue").Ref<boolean>; tableSize: import("vue").Ref<any>; rowKey: import("vue").Ref<string>; data: import("vue").Ref<T[]>; _data: import("vue").Ref<T[]>; isComplex: import("vue").Ref<boolean>; _columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; updateOrderFns: (() => void)[]; leafColumnsLength: import("vue").Ref<number>; fixedLeafColumnsLength: import("vue").Ref<number>; rightFixedLeafColumnsLength: import("vue").Ref<number>; isAllSelected: import("vue").Ref<boolean>; selection: import("vue").Ref<T[]>; reserveSelection: import("vue").Ref<boolean>; selectOnIndeterminate: import("vue").Ref<boolean>; selectable: import("vue").Ref<(row: T, index: number) => boolean>; filters: import("vue").Ref<import(".").StoreFilter>; filteredData: import("vue").Ref<null>; sortingColumn: import("vue").Ref<null>; sortProp: import("vue").Ref<null>; sortOrder: import("vue").Ref<null>; hoverRow: import("vue").Ref<null>; }, data: T[]): void; insertColumn(states: { _currentRowKey: import("vue").Ref<string>; currentRow: import("vue").Ref<T>; expandRowKeys: import("vue").Ref<string[]>; treeData: import("vue").Ref<unknown>; indent: import("vue").Ref<number>; lazy: import("vue").Ref<boolean>; lazyTreeNodeMap: import("vue").Ref<{}>; lazyColumnIdentifier: import("vue").Ref<string>; childrenColumnName: import("vue").Ref<string>; checkStrictly: import("vue").Ref<boolean>; expandRows: import("vue").Ref<T[]>; defaultExpandAll: import("vue").Ref<boolean>; tableSize: import("vue").Ref<any>; rowKey: import("vue").Ref<string>; data: import("vue").Ref<T[]>; _data: import("vue").Ref<T[]>; isComplex: import("vue").Ref<boolean>; _columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; updateOrderFns: (() => void)[]; leafColumnsLength: import("vue").Ref<number>; fixedLeafColumnsLength: import("vue").Ref<number>; rightFixedLeafColumnsLength: import("vue").Ref<number>; isAllSelected: import("vue").Ref<boolean>; selection: import("vue").Ref<T[]>; reserveSelection: import("vue").Ref<boolean>; selectOnIndeterminate: import("vue").Ref<boolean>; selectable: import("vue").Ref<(row: T, index: number) => boolean>; filters: import("vue").Ref<import(".").StoreFilter>; filteredData: import("vue").Ref<null>; sortingColumn: import("vue").Ref<null>; sortProp: import("vue").Ref<null>; sortOrder: import("vue").Ref<null>; hoverRow: import("vue").Ref<null>; }, column: import("../table-column/defaults").TableColumnCtx<T>, parent: import("../table-column/defaults").TableColumnCtx<T>, updateColumnOrder: () => void): void; updateColumnOrder(states: { _currentRowKey: import("vue").Ref<string>; currentRow: import("vue").Ref<T>; expandRowKeys: import("vue").Ref<string[]>; treeData: import("vue").Ref<unknown>; indent: import("vue").Ref<number>; lazy: import("vue").Ref<boolean>; lazyTreeNodeMap: import("vue").Ref<{}>; lazyColumnIdentifier: import("vue").Ref<string>; childrenColumnName: import("vue").Ref<string>; checkStrictly: import("vue").Ref<boolean>; expandRows: import("vue").Ref<T[]>; defaultExpandAll: import("vue").Ref<boolean>; tableSize: import("vue").Ref<any>; rowKey: import("vue").Ref<string>; data: import("vue").Ref<T[]>; _data: import("vue").Ref<T[]>; isComplex: import("vue").Ref<boolean>; _columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; updateOrderFns: (() => void)[]; leafColumnsLength: import("vue").Ref<number>; fixedLeafColumnsLength: import("vue").Ref<number>; rightFixedLeafColumnsLength: import("vue").Ref<number>; isAllSelected: import("vue").Ref<boolean>; selection: import("vue").Ref<T[]>; reserveSelection: import("vue").Ref<boolean>; selectOnIndeterminate: import("vue").Ref<boolean>; selectable: import("vue").Ref<(row: T, index: number) => boolean>; filters: import("vue").Ref<import(".").StoreFilter>; filteredData: import("vue").Ref<null>; sortingColumn: import("vue").Ref<null>; sortProp: import("vue").Ref<null>; sortOrder: import("vue").Ref<null>; hoverRow: import("vue").Ref<null>; }, column: import("../table-column/defaults").TableColumnCtx<T>): void; removeColumn(states: { _currentRowKey: import("vue").Ref<string>; currentRow: import("vue").Ref<T>; expandRowKeys: import("vue").Ref<string[]>; treeData: import("vue").Ref<unknown>; indent: import("vue").Ref<number>; lazy: import("vue").Ref<boolean>; lazyTreeNodeMap: import("vue").Ref<{}>; lazyColumnIdentifier: import("vue").Ref<string>; childrenColumnName: import("vue").Ref<string>; checkStrictly: import("vue").Ref<boolean>; expandRows: import("vue").Ref<T[]>; defaultExpandAll: import("vue").Ref<boolean>; tableSize: import("vue").Ref<any>; rowKey: import("vue").Ref<string>; data: import("vue").Ref<T[]>; _data: import("vue").Ref<T[]>; isComplex: import("vue").Ref<boolean>; _columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; updateOrderFns: (() => void)[]; leafColumnsLength: import("vue").Ref<number>; fixedLeafColumnsLength: import("vue").Ref<number>; rightFixedLeafColumnsLength: import("vue").Ref<number>; isAllSelected: import("vue").Ref<boolean>; selection: import("vue").Ref<T[]>; reserveSelection: import("vue").Ref<boolean>; selectOnIndeterminate: import("vue").Ref<boolean>; selectable: import("vue").Ref<(row: T, index: number) => boolean>; filters: import("vue").Ref<import(".").StoreFilter>; filteredData: import("vue").Ref<null>; sortingColumn: import("vue").Ref<null>; sortProp: import("vue").Ref<null>; sortOrder: import("vue").Ref<null>; hoverRow: import("vue").Ref<null>; }, column: import("../table-column/defaults").TableColumnCtx<T>, parent: import("../table-column/defaults").TableColumnCtx<T>, updateColumnOrder: () => void): void; sort(states: { _currentRowKey: import("vue").Ref<string>; currentRow: import("vue").Ref<T>; expandRowKeys: import("vue").Ref<string[]>; treeData: import("vue").Ref<unknown>; indent: import("vue").Ref<number>; lazy: import("vue").Ref<boolean>; lazyTreeNodeMap: import("vue").Ref<{}>; lazyColumnIdentifier: import("vue").Ref<string>; childrenColumnName: import("vue").Ref<string>; checkStrictly: import("vue").Ref<boolean>; expandRows: import("vue").Ref<T[]>; defaultExpandAll: import("vue").Ref<boolean>; tableSize: import("vue").Ref<any>; rowKey: import("vue").Ref<string>; data: import("vue").Ref<T[]>; _data: import("vue").Ref<T[]>; isComplex: import("vue").Ref<boolean>; _columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; updateOrderFns: (() => void)[]; leafColumnsLength: import("vue").Ref<number>; fixedLeafColumnsLength: import("vue").Ref<number>; rightFixedLeafColumnsLength: import("vue").Ref<number>; isAllSelected: import("vue").Ref<boolean>; selection: import("vue").Ref<T[]>; reserveSelection: import("vue").Ref<boolean>; selectOnIndeterminate: import("vue").Ref<boolean>; selectable: import("vue").Ref<(row: T, index: number) => boolean>; filters: import("vue").Ref<import(".").StoreFilter>; filteredData: import("vue").Ref<null>; sortingColumn: import("vue").Ref<null>; sortProp: import("vue").Ref<null>; sortOrder: import("vue").Ref<null>; hoverRow: import("vue").Ref<null>; }, options: import("../table/defaults").Sort): void; changeSortCondition(states: { _currentRowKey: import("vue").Ref<string>; currentRow: import("vue").Ref<T>; expandRowKeys: import("vue").Ref<string[]>; treeData: import("vue").Ref<unknown>; indent: import("vue").Ref<number>; lazy: import("vue").Ref<boolean>; lazyTreeNodeMap: import("vue").Ref<{}>; lazyColumnIdentifier: import("vue").Ref<string>; childrenColumnName: import("vue").Ref<string>; checkStrictly: import("vue").Ref<boolean>; expandRows: import("vue").Ref<T[]>; defaultExpandAll: import("vue").Ref<boolean>; tableSize: import("vue").Ref<any>; rowKey: import("vue").Ref<string>; data: import("vue").Ref<T[]>; _data: import("vue").Ref<T[]>; isComplex: import("vue").Ref<boolean>; _columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; updateOrderFns: (() => void)[]; leafColumnsLength: import("vue").Ref<number>; fixedLeafColumnsLength: import("vue").Ref<number>; rightFixedLeafColumnsLength: import("vue").Ref<number>; isAllSelected: import("vue").Ref<boolean>; selection: import("vue").Ref<T[]>; reserveSelection: import("vue").Ref<boolean>; selectOnIndeterminate: import("vue").Ref<boolean>; selectable: import("vue").Ref<(row: T, index: number) => boolean>; filters: import("vue").Ref<import(".").StoreFilter>; filteredData: import("vue").Ref<null>; sortingColumn: import("vue").Ref<null>; sortProp: import("vue").Ref<null>; sortOrder: import("vue").Ref<null>; hoverRow: import("vue").Ref<null>; }, options: import("../table/defaults").Sort): void; filterChange(_states: { _currentRowKey: import("vue").Ref<string>; currentRow: import("vue").Ref<T>; expandRowKeys: import("vue").Ref<string[]>; treeData: import("vue").Ref<unknown>; indent: import("vue").Ref<number>; lazy: import("vue").Ref<boolean>; lazyTreeNodeMap: import("vue").Ref<{}>; lazyColumnIdentifier: import("vue").Ref<string>; childrenColumnName: import("vue").Ref<string>; checkStrictly: import("vue").Ref<boolean>; expandRows: import("vue").Ref<T[]>; defaultExpandAll: import("vue").Ref<boolean>; tableSize: import("vue").Ref<any>; rowKey: import("vue").Ref<string>; data: import("vue").Ref<T[]>; _data: import("vue").Ref<T[]>; isComplex: import("vue").Ref<boolean>; _columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; updateOrderFns: (() => void)[]; leafColumnsLength: import("vue").Ref<number>; fixedLeafColumnsLength: import("vue").Ref<number>; rightFixedLeafColumnsLength: import("vue").Ref<number>; isAllSelected: import("vue").Ref<boolean>; selection: import("vue").Ref<T[]>; reserveSelection: import("vue").Ref<boolean>; selectOnIndeterminate: import("vue").Ref<boolean>; selectable: import("vue").Ref<(row: T, index: number) => boolean>; filters: import("vue").Ref<import(".").StoreFilter>; filteredData: import("vue").Ref<null>; sortingColumn: import("vue").Ref<null>; sortProp: import("vue").Ref<null>; sortOrder: import("vue").Ref<null>; hoverRow: import("vue").Ref<null>; }, options: import("../table/defaults").Filter<T>): void; toggleAllSelection(): void; rowSelectedChanged(_states: any, row: T): void; setHoverRow(states: { _currentRowKey: import("vue").Ref<string>; currentRow: import("vue").Ref<T>; expandRowKeys: import("vue").Ref<string[]>; treeData: import("vue").Ref<unknown>; indent: import("vue").Ref<number>; lazy: import("vue").Ref<boolean>; lazyTreeNodeMap: import("vue").Ref<{}>; lazyColumnIdentifier: import("vue").Ref<string>; childrenColumnName: import("vue").Ref<string>; checkStrictly: import("vue").Ref<boolean>; expandRows: import("vue").Ref<T[]>; defaultExpandAll: import("vue").Ref<boolean>; tableSize: import("vue").Ref<any>; rowKey: import("vue").Ref<string>; data: import("vue").Ref<T[]>; _data: import("vue").Ref<T[]>; isComplex: import("vue").Ref<boolean>; _columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; updateOrderFns: (() => void)[]; leafColumnsLength: import("vue").Ref<number>; fixedLeafColumnsLength: import("vue").Ref<number>; rightFixedLeafColumnsLength: import("vue").Ref<number>; isAllSelected: import("vue").Ref<boolean>; selection: import("vue").Ref<T[]>; reserveSelection: import("vue").Ref<boolean>; selectOnIndeterminate: import("vue").Ref<boolean>; selectable: import("vue").Ref<(row: T, index: number) => boolean>; filters: import("vue").Ref<import(".").StoreFilter>; filteredData: import("vue").Ref<null>; sortingColumn: import("vue").Ref<null>; sortProp: import("vue").Ref<null>; sortOrder: import("vue").Ref<null>; hoverRow: import("vue").Ref<null>; }, row: T): void; setCurrentRow(_states: any, row: T): void; }; commit: (name: "sort" | "setData" | "insertColumn" | "updateColumnOrder" | "removeColumn" | "changeSortCondition" | "filterChange" | "toggleAllSelection" | "rowSelectedChanged" | "setHoverRow" | "setCurrentRow", ...args: any[]) => void; updateTableScrollY: () => void; assertRowKey: () => void; updateColumns: () => void; scheduleLayout: (needUpdateColumns?: boolean, immediate?: boolean) => void; isSelected: (row: import("../table/defaults").DefaultRow) => boolean; clearSelection: () => void; cleanSelection: () => void; getSelectionRows: () => T[]; toggleRowSelection: (row: T, selected?: boolean, emitChange?: boolean, ignoreSelectable?: boolean) => void; _toggleAllSelection: () => void; toggleAllSelection: null; updateSelectionByRowKey: () => void; updateAllSelected: () => void; updateFilters: (columns: any, values: any) => {}; updateCurrentRow: (_currentRow: T) => void; updateSort: (column: any, prop: any, order: any) => void; execFilter: () => void; execSort: () => void; execQuery: (ignore?: undefined) => void; clearFilter: (columnKeys: any) => void; clearSort: () => void; toggleRowExpansion: (row: T, expanded?: boolean) => void; setExpandRowKeysAdapter: (val: string[]) => void; setCurrentRowKey: (key: string) => void; toggleRowExpansionAdapter: (row: T, expanded?: boolean) => void; isRowExpanded: (row: T) => boolean; updateExpandRows: () => void; updateCurrentRowData: () => void; loadOrToggle: (row: any) => void; updateTreeData: (ifChangeExpandRowKeys?: boolean) => void; updateKeyChildren: (key: string, data: T[]) => void; states: { _currentRowKey: import("vue").Ref<string>; currentRow: import("vue").Ref<T>; expandRowKeys: import("vue").Ref<string[]>; treeData: import("vue").Ref<unknown>; indent: import("vue").Ref<number>; lazy: import("vue").Ref<boolean>; lazyTreeNodeMap: import("vue").Ref<{}>; lazyColumnIdentifier: import("vue").Ref<string>; childrenColumnName: import("vue").Ref<string>; checkStrictly: import("vue").Ref<boolean>; expandRows: import("vue").Ref<T[]>; defaultExpandAll: import("vue").Ref<boolean>; tableSize: import("vue").Ref<any>; rowKey: import("vue").Ref<string>; data: import("vue").Ref<T[]>; _data: import("vue").Ref<T[]>; isComplex: import("vue").Ref<boolean>; _columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<T>[]>; updateOrderFns: (() => void)[]; leafColumnsLength: import("vue").Ref<number>; fixedLeafColumnsLength: import("vue").Ref<number>; rightFixedLeafColumnsLength: import("vue").Ref<number>; isAllSelected: import("vue").Ref<boolean>; selection: import("vue").Ref<T[]>; reserveSelection: import("vue").Ref<boolean>; selectOnIndeterminate: import("vue").Ref<boolean>; selectable: import("vue").Ref<(row: T, index: number) => boolean>; filters: import("vue").Ref<import(".").StoreFilter>; filteredData: import("vue").Ref<null>; sortingColumn: import("vue").Ref<null>; sortProp: import("vue").Ref<null>; sortOrder: import("vue").Ref<null>; hoverRow: import("vue").Ref<null>; }; ns: { namespace: import("vue").ComputedRef<string>; b: (blockSuffix?: string) => string; e: (element?: string) => string; m: (modifier?: string) => string; be: (blockSuffix?: string, element?: string) => string; em: (element?: string, modifier?: string) => string; bm: (blockSuffix?: string, modifier?: string) => string; bem: (blockSuffix?: string, element?: string, modifier?: string) => string; is: { (name: string, state: boolean | undefined): string; (name: string): string; }; cssVar: (object: Record<string, string>) => Record<string, string>; cssVarName: (name: string) => string; cssVarBlock: (object: Record<string, string>) => Record<string, string>; cssVarBlockName: (name: string) => string; }; };