From 2a763cbfd0e4fdc65aee5cd9b831618aa366a3ae Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Tue, 10 Dec 2024 22:32:30 +0800 Subject: [PATCH] releases 4.3.25 --- package.json | 4 ++-- types/components/table-module/filter.d.ts | 6 +++--- types/components/table.d.ts | 10 +++++++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3c0c00f4..45661b3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-pc-ui", - "version": "4.3.24", + "version": "4.3.25", "description": "A vue based PC component library", "scripts": { "update": "npm install --legacy-peer-deps", @@ -25,7 +25,7 @@ "style": "lib/style.css", "typings": "types/index.d.ts", "dependencies": { - "@vxe-ui/core": "^4.0.20" + "@vxe-ui/core": "^4.0.22" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.21.0", diff --git a/types/components/table-module/filter.d.ts b/types/components/table-module/filter.d.ts index 1ab0f985..012098b0 100644 --- a/types/components/table-module/filter.d.ts +++ b/types/components/table-module/filter.d.ts @@ -35,10 +35,9 @@ export interface TableFilterMethods { openFilter(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo):Promise /** * 用于 filters,修改筛选列表 - * 在筛选条件更新之后可以调用 updateData 函数处理表格数据 * @param columnOrField 列对象或字段名 * @param options 选项列表 - * @param update 是否同时更新数据 + * @param update 是否同时更新数据,如果不传,则可以手动调用 updateData() 更新数据 */ setFilter(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo, options: VxeColumnPropTypes.FilterItem[], update?: boolean): Promise /** @@ -46,7 +45,7 @@ export interface TableFilterMethods { * 如果不传 column 则清空所有筛选条件,数据会恢复成未筛选的状态 * @param column 字段名 */ - clearFilter(column?: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo | null): Promise + clearFilter(fieldOrColumn?: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo | null): Promise /** * 用于在自定义面板中使用,手动确认筛选 */ @@ -69,6 +68,7 @@ export interface TableFilterPrivateMethods { checkFilterOptions(): void handleClearFilter(column: any): void triggerFilterEvent(evnt: any, column: any, params: any): void + handleColumnConfirmFilter(column: VxeTableDefines.ColumnInfo, evnt: Event | null): Promise confirmFilterEvent(evnt: Event | null): void handleFilterChangeRadioOption (evnt: Event, checked: boolean, item: any): void handleFilterChangeMultipleOption (evnt: Event, checked: boolean, item: any): void diff --git a/types/components/table.d.ts b/types/components/table.d.ts index 605ecfbd..b1eacea8 100644 --- a/types/components/table.d.ts +++ b/types/components/table.d.ts @@ -3308,13 +3308,20 @@ export interface TableMethods
{ */ clearCurrentColumn(): Promise /** - * 手动对表格进行排序 + * 手动对表格进行排序,建议使用 setSort 方法 * @param sortConfs 字段名、多列排序 * @param order 排序方式 */ sort(field: string, order?: VxeTablePropTypes.SortOrder): Promise sort(sortConfs: VxeTableDefines.SortConfs, order?: VxeTablePropTypes.SortOrder): Promise sort(sortConfs: VxeTableDefines.SortConfs[], order?: VxeTablePropTypes.SortOrder): Promise + + /** + * 手动对表格进行排序 + * @param sortConfs + * @param update 是否同时更新数据,如果不传,则可以手动调用 updateData() 更新数据 + */ + setSort(sortConfs: VxeTableDefines.SortConfs | VxeTableDefines.SortConfs[], update?: boolean) /** * 手动清空排序条件,数据会恢复成未排序的状态 * @param columnOrField 列对象或字段名 @@ -3584,6 +3591,7 @@ export interface TablePrivateMethods { }): void triggerRowExpandEvent(evnt: Event, params: VxeTableDefines.CellRenderBodyParams): void triggerTreeExpandEvent(evnt: Event, params: VxeTableDefines.CellRenderBodyParams): void + handleColumnSortEvent(evnt: Event, column: VxeTableDefines.ColumnInfo): void triggerSortEvent(evnt: Event, column: VxeTableDefines.ColumnInfo, order: VxeTablePropTypes.SortOrder): void handleRowDragDragstartEvent (evnt: DragEvent): void handleRowDragDragendEvent(evnt: DragEvent): void