@aplus-frontend/ui 0.3.8 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-action/item/index.vue.d.ts +2 -1
- package/es/src/ap-action/item-dropdown/index.vue.d.ts +2 -1
- package/es/src/ap-action/item-modal/index.vue.d.ts +2 -1
- package/es/src/ap-action/item-popconfirm/index.vue.d.ts +2 -1
- package/es/src/ap-button/ap-action-button.vue.d.ts +4 -3
- package/es/src/ap-button/ap-action-button.vue.mjs +11 -11
- package/es/src/ap-button/ap-button.vue.d.ts +4 -3
- package/es/src/ap-button/ap-button.vue.mjs +36 -36
- package/es/src/ap-button/interface.d.ts +4 -0
- package/es/src/ap-descriptions/ap-descriptions.vue.d.ts +3 -2
- package/es/src/ap-descriptions/help-message/index.vue.d.ts +3 -5
- package/es/src/ap-download/ap-download.vue.d.ts +5 -3
- package/es/src/ap-field/date/index.vue.d.ts +2 -1
- package/es/src/ap-field/date-range/index.vue.d.ts +2 -1
- package/es/src/ap-field/number/index.vue.d.ts +2 -1
- package/es/src/ap-field/rate/index.vue.d.ts +2 -1
- package/es/src/ap-field/segmented/index.vue.d.ts +2 -1
- package/es/src/ap-field/select/index.vue.d.ts +2 -1
- package/es/src/ap-field/slider/index.vue.d.ts +2 -1
- package/es/src/ap-field/switch/index.vue.d.ts +2 -1
- package/es/src/ap-field/text/index.vue.d.ts +2 -1
- package/es/src/ap-field/text/password.vue.d.ts +2 -1
- package/es/src/ap-form/ap-form.vue.d.ts +6 -4
- package/es/src/ap-form/dependency/index.vue.d.ts +2 -1
- package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -2
- package/es/src/ap-form/item/index.vue.d.ts +2 -1
- package/es/src/ap-form/item-group/index.vue.d.ts +2 -1
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +2 -1
- package/es/src/ap-form/items/date/index.vue.d.ts +2 -1
- package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -1
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -1
- package/es/src/ap-form/items/radio/index.vue.d.ts +2 -1
- package/es/src/ap-form/items/select/index.vue.d.ts +2 -1
- package/es/src/ap-form/items/switch/index.vue.d.ts +2 -1
- package/es/src/ap-form/items/text/group.vue.d.ts +2 -1
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -1
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -1
- package/es/src/ap-form/items/text-area/index.vue.d.ts +2 -1
- package/es/src/ap-form/list/index.vue.d.ts +2 -1
- package/es/src/ap-form/modal-form/index.vue.d.ts +3 -2
- package/es/src/ap-form/modal-form/index.vue.mjs +61 -57
- package/es/src/ap-form/render/control.vue.d.ts +2 -1
- package/es/src/ap-form/render/item.vue.d.ts +2 -1
- package/es/src/ap-form/search-form/index.vue.d.ts +3 -2
- package/es/src/ap-form/set/index.vue.d.ts +2 -1
- package/es/src/ap-info-layout/ApInfoLayout.vue.d.ts +3 -2
- package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +3 -2
- package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +3 -2
- package/es/src/ap-list/index.vue.d.ts +3 -5
- package/es/src/ap-list/index.vue.mjs +37 -39
- package/es/src/ap-list/interface.d.ts +3 -3
- package/es/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +1 -1
- package/es/src/ap-scroll-bar/index.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue.d.ts +3 -5
- package/es/src/ap-table/ap-table.vue2.mjs +75 -78
- package/es/src/ap-table/components/index/index.vue.d.ts +1 -1
- package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -1
- package/es/src/ap-table/components/setting/modal/index.vue.d.ts +2 -1
- package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +1 -1
- package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +1 -1
- package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +1 -1
- package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +1 -1
- package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
- package/es/src/ap-table/constants.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +87 -0
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +209 -0
- package/es/src/ap-table/hooks/use-table-paging.d.ts +13 -3
- package/es/src/ap-table/hooks/use-table-paging.mjs +131 -126
- package/es/src/ap-table/interface.d.ts +4 -3
- package/es/src/ap-table/utils.d.ts +1 -0
- package/es/src/ap-table/utils.mjs +10 -5
- package/es/src/ap-tag/ap-tag-group.vue.d.ts +2 -1
- package/es/src/ap-tag/ap-tag.vue.d.ts +1 -1
- package/es/src/ap-upload/apUpload.vue.d.ts +3 -2
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/es/src/ap-upload/components/Picture.vue.d.ts +5 -9
- package/es/src/ap-upload/components/SingleFile.vue.d.ts +1 -1
- package/es/src/business/ap-appendix/ap-appendix.vue.d.ts +5 -3
- package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +1 -1
- package/es/src/business/ap-appendix/index.d.ts +1 -1
- package/es/src/business/ap-batch-action/ApBatchAction.vue.d.ts +3 -2
- package/es/src/business/ap-batch-action/index.d.ts +1 -1
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +2 -1
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +3 -4
- package/es/src/business/ap-batch-action-group/index.d.ts +887 -5
- package/es/src/business/ap-card/ApCard.vue.d.ts +3 -2
- package/es/src/business/ap-card/index.d.ts +1 -1
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -5
- package/es/src/business/ap-expand-alert/index.d.ts +4 -6
- package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +3 -2
- package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +8 -346
- package/es/src/business/ap-group-search/images/icon-down.vue.d.ts +1 -1
- package/es/src/business/ap-group-search/images/icon-line-select.vue.d.ts +1 -1
- package/es/src/business/ap-group-search/index.d.ts +3 -3
- package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +8 -346
- package/es/src/business/ap-image/ApImage.vue.d.ts +2 -1
- package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +1 -1
- package/es/src/business/ap-input-radio/index.d.ts +1 -1
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +3 -2
- package/es/src/business/ap-ladder/index.d.ts +1 -1
- package/es/src/business/ap-select-layout/index.d.ts +3 -4
- package/es/src/business/ap-select-layout/interface.d.ts +1 -0
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +3 -5
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +58 -56
- package/es/src/business/ap-table-modal/modal-title.vue.d.ts +3 -2
- package/es/src/business/ap-table-modal/table-layout/index.vue.d.ts +8 -8
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +3 -2
- package/es/src/business/ap-title/ApTitle.vue.d.ts +3 -2
- package/es/src/business/ap-title/index.d.ts +1 -1
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -3
- package/es/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +1 -1
- package/es/src/business/ap-upload-file/icon/file-icon.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +1 -1
- package/es/src/check-card/group.vue.d.ts +2 -1
- package/es/src/check-card/index.vue.d.ts +3 -2
- package/es/src/editable-table/form-item.vue.d.ts +3 -5
- package/es/src/editable-table/index.vue.d.ts +3 -5
- package/es/src/tests/wrapper.d.ts +4 -4
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/lib/src/ap-action/item/index.vue.d.ts +2 -1
- package/lib/src/ap-action/item-dropdown/index.vue.d.ts +2 -1
- package/lib/src/ap-action/item-modal/index.vue.d.ts +2 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +2 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +4 -3
- package/lib/src/ap-button/ap-action-button.vue.js +1 -1
- package/lib/src/ap-button/ap-button.vue.d.ts +4 -3
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-button/interface.d.ts +4 -0
- package/lib/src/ap-descriptions/ap-descriptions.vue.d.ts +3 -2
- package/lib/src/ap-descriptions/help-message/index.vue.d.ts +3 -5
- package/lib/src/ap-download/ap-download.vue.d.ts +5 -3
- package/lib/src/ap-field/date/index.vue.d.ts +2 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +2 -1
- package/lib/src/ap-field/number/index.vue.d.ts +2 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +2 -1
- package/lib/src/ap-field/segmented/index.vue.d.ts +2 -1
- package/lib/src/ap-field/select/index.vue.d.ts +2 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +2 -1
- package/lib/src/ap-field/switch/index.vue.d.ts +2 -1
- package/lib/src/ap-field/text/index.vue.d.ts +2 -1
- package/lib/src/ap-field/text/password.vue.d.ts +2 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +6 -4
- package/lib/src/ap-form/dependency/index.vue.d.ts +2 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -2
- package/lib/src/ap-form/item/index.vue.d.ts +2 -1
- package/lib/src/ap-form/item-group/index.vue.d.ts +2 -1
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +2 -1
- package/lib/src/ap-form/items/date/index.vue.d.ts +2 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -1
- package/lib/src/ap-form/items/radio/index.vue.d.ts +2 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +2 -1
- package/lib/src/ap-form/items/switch/index.vue.d.ts +2 -1
- package/lib/src/ap-form/items/text/group.vue.d.ts +2 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -1
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -1
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +2 -1
- package/lib/src/ap-form/list/index.vue.d.ts +2 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -2
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/render/control.vue.d.ts +2 -1
- package/lib/src/ap-form/render/item.vue.d.ts +2 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +3 -2
- package/lib/src/ap-form/set/index.vue.d.ts +2 -1
- package/lib/src/ap-info-layout/ApInfoLayout.vue.d.ts +3 -2
- package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +3 -2
- package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +3 -2
- package/lib/src/ap-list/index.vue.d.ts +3 -5
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +3 -3
- package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +1 -1
- package/lib/src/ap-scroll-bar/index.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +3 -5
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/index/index.vue.d.ts +1 -1
- package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +2 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +1 -1
- package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +1 -1
- package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +1 -1
- package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
- package/lib/src/ap-table/constants.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +87 -0
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +13 -3
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +4 -3
- package/lib/src/ap-table/utils.d.ts +1 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.d.ts +2 -1
- package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +3 -2
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/lib/src/ap-upload/components/Picture.vue.d.ts +5 -9
- package/lib/src/ap-upload/components/SingleFile.vue.d.ts +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue.d.ts +5 -3
- package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +1 -1
- package/lib/src/business/ap-appendix/index.d.ts +1 -1
- package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +3 -2
- package/lib/src/business/ap-batch-action/index.d.ts +1 -1
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +2 -1
- package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +3 -4
- package/lib/src/business/ap-batch-action-group/index.d.ts +887 -5
- package/lib/src/business/ap-card/ApCard.vue.d.ts +3 -2
- package/lib/src/business/ap-card/index.d.ts +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -5
- package/lib/src/business/ap-expand-alert/index.d.ts +4 -6
- package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +3 -2
- package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +8 -346
- package/lib/src/business/ap-group-search/images/icon-down.vue.d.ts +1 -1
- package/lib/src/business/ap-group-search/images/icon-line-select.vue.d.ts +1 -1
- package/lib/src/business/ap-group-search/index.d.ts +3 -3
- package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +8 -346
- package/lib/src/business/ap-image/ApImage.vue.d.ts +2 -1
- package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +1 -1
- package/lib/src/business/ap-input-radio/index.d.ts +1 -1
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +3 -2
- package/lib/src/business/ap-ladder/index.d.ts +1 -1
- package/lib/src/business/ap-select-layout/index.d.ts +3 -4
- package/lib/src/business/ap-select-layout/interface.d.ts +1 -0
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +3 -5
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/modal-title.vue.d.ts +3 -2
- package/lib/src/business/ap-table-modal/table-layout/index.vue.d.ts +8 -8
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +3 -2
- package/lib/src/business/ap-title/ApTitle.vue.d.ts +3 -2
- package/lib/src/business/ap-title/index.d.ts +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -3
- package/lib/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +1 -1
- package/lib/src/business/ap-upload-file/icon/file-icon.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +1 -1
- package/lib/src/check-card/group.vue.d.ts +2 -1
- package/lib/src/check-card/index.vue.d.ts +3 -2
- package/lib/src/editable-table/form-item.vue.d.ts +3 -5
- package/lib/src/editable-table/index.vue.d.ts +3 -5
- package/lib/src/tests/wrapper.d.ts +4 -4
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/package.json +1 -1
- package/index.ts +0 -19
|
@@ -4,18 +4,18 @@ export declare const useTableColumnState: (columnSetting: ApTableSettingType, in
|
|
|
4
4
|
columnState: Ref<{
|
|
5
5
|
key: string | number;
|
|
6
6
|
show?: boolean | undefined;
|
|
7
|
-
fixed?:
|
|
7
|
+
fixed?: "left" | "right" | undefined;
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
label?: any;
|
|
10
|
-
children?: any[] | undefined;
|
|
10
|
+
children?: /*elided*/ any[] | undefined;
|
|
11
11
|
order?: number | undefined;
|
|
12
12
|
}[], ApColumnState[] | {
|
|
13
13
|
key: string | number;
|
|
14
14
|
show?: boolean | undefined;
|
|
15
|
-
fixed?:
|
|
15
|
+
fixed?: "left" | "right" | undefined;
|
|
16
16
|
disabled?: boolean | undefined;
|
|
17
17
|
label?: any;
|
|
18
|
-
children?: any[] | undefined;
|
|
18
|
+
children?: /*elided*/ any[] | undefined;
|
|
19
19
|
order?: number | undefined;
|
|
20
20
|
}[]>;
|
|
21
21
|
selectAll: () => void;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { DataIndex } from '@aplus-frontend/antdv/es/vc-table/interface';
|
|
2
|
+
import { Ref, ComputedRef } from 'vue';
|
|
3
|
+
import { ApTablePaginationConfig, RequestData } from '../interface';
|
|
4
|
+
import { Recordable } from '../../type';
|
|
5
|
+
import { ApFormSearchFormExpose } from '../../ap-form';
|
|
6
|
+
import { TablePaginationConfig } from '@aplus-frontend/antdv';
|
|
7
|
+
import { FilterValue, SorterResult, TableCurrentDataSource } from '@aplus-frontend/antdv/es/table/interface';
|
|
8
|
+
import { ApColumnType } from '..';
|
|
9
|
+
export type UseTablePagingParams<DataType, ParamsType> = {
|
|
10
|
+
request: (params: any) => Promise<RequestData<DataType>>;
|
|
11
|
+
/**
|
|
12
|
+
* 是否手动执行,页面初始化后不执行网络请求,需要手动触发
|
|
13
|
+
* @param params
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
manual?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 额外的默认请求参数
|
|
19
|
+
* @description 如果传入响应式数据,将会在数据改变后重新请求
|
|
20
|
+
*/
|
|
21
|
+
defaultParams?: ParamsType | Ref<ParamsType>;
|
|
22
|
+
/**
|
|
23
|
+
* 默认的数据源(只生效一次)
|
|
24
|
+
*/
|
|
25
|
+
defaultData?: DataType[];
|
|
26
|
+
/**
|
|
27
|
+
* 数据请求前格式化请求参数
|
|
28
|
+
* @param values
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
formatParams?: (values: any) => any;
|
|
32
|
+
/**
|
|
33
|
+
* 特殊类型参数类型对照表(会根据该对照表运行默认的参数格式化)
|
|
34
|
+
*/
|
|
35
|
+
paramsValueTypeMap?: Record<string, any>;
|
|
36
|
+
/**
|
|
37
|
+
* 重设表单需要忽略的字段
|
|
38
|
+
*/
|
|
39
|
+
resetFieldsIgnores?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* 需要后端筛选的字段列表
|
|
42
|
+
*/
|
|
43
|
+
filterFields?: Ref<DataIndex[]>;
|
|
44
|
+
/**
|
|
45
|
+
* 需要后端筛选的排序字段列表
|
|
46
|
+
*/
|
|
47
|
+
sortFields?: Ref<DataIndex[]>;
|
|
48
|
+
/**
|
|
49
|
+
* 分页相关
|
|
50
|
+
*/
|
|
51
|
+
pagination?: boolean | ApTablePaginationConfig;
|
|
52
|
+
};
|
|
53
|
+
type InternalDataType<DataType = Recordable> = {
|
|
54
|
+
total: number;
|
|
55
|
+
records: DataType[];
|
|
56
|
+
loading: boolean;
|
|
57
|
+
};
|
|
58
|
+
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, pagination }: UseTablePagingParams<DataType, ParamsType>) => {
|
|
59
|
+
formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
|
|
60
|
+
submit: () => void;
|
|
61
|
+
reset: () => void;
|
|
62
|
+
refresh: () => void;
|
|
63
|
+
refreshByDelete: (n: number) => void;
|
|
64
|
+
data: InternalDataType<DataType>;
|
|
65
|
+
current: number | undefined;
|
|
66
|
+
pageSize: number | undefined;
|
|
67
|
+
handleTableChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
|
|
68
|
+
tableProps: ComputedRef<{
|
|
69
|
+
loading: boolean;
|
|
70
|
+
pagination: {
|
|
71
|
+
current: number;
|
|
72
|
+
pageSize: number;
|
|
73
|
+
total: number;
|
|
74
|
+
showSizeChanger: boolean;
|
|
75
|
+
showQuickJumper: boolean;
|
|
76
|
+
showLessItems: boolean | undefined;
|
|
77
|
+
size: string;
|
|
78
|
+
showTotal: ((total: number) => import("vue/jsx-runtime").JSX.Element) | undefined;
|
|
79
|
+
};
|
|
80
|
+
onChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
|
|
81
|
+
dataSource: DataType[];
|
|
82
|
+
}>;
|
|
83
|
+
dataSource: ComputedRef<DataType[]>;
|
|
84
|
+
setDataSource: (dataSource?: DataType[]) => void;
|
|
85
|
+
getColumnSFConfig: (column: ApColumnType) => Recordable;
|
|
86
|
+
};
|
|
87
|
+
export {};
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { ref as ee, reactive as q, unref as h, nextTick as te, onMounted as re, watch as oe, computed as A, createVNode as x } from "vue";
|
|
2
|
+
import { useTableSortedAndFiltered as ne } from "./use-sorted-filtered.mjs";
|
|
3
|
+
import "../../config-provider/index.mjs";
|
|
4
|
+
import { parseFieldValue as ae, dataIndexToStr as se, isEqualCustom as ce } from "../utils.mjs";
|
|
5
|
+
import { isArray as I, isEqualWith as ie } from "lodash-unified";
|
|
6
|
+
import { useLocale as le } from "../../config-provider/hooks/use-locale.mjs";
|
|
7
|
+
import { useNamespace as ue } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
const C = 1, N = 10;
|
|
9
|
+
function fe(g) {
|
|
10
|
+
const l = {};
|
|
11
|
+
return g && (g === !0 ? (l.current = C, l.pageSize = N) : (l.current = g.defaultCurrent || C, l.pageSize = g.defaultPageSize || N)), l;
|
|
12
|
+
}
|
|
13
|
+
const Te = ({
|
|
14
|
+
manual: g = !1,
|
|
15
|
+
request: l,
|
|
16
|
+
defaultParams: L = {},
|
|
17
|
+
defaultData: v = [],
|
|
18
|
+
formatParams: y,
|
|
19
|
+
paramsValueTypeMap: D,
|
|
20
|
+
resetFieldsIgnores: R,
|
|
21
|
+
filterFields: U,
|
|
22
|
+
sortFields: B,
|
|
23
|
+
pagination: p = {
|
|
24
|
+
defaultCurrent: 1,
|
|
25
|
+
defaultPageSize: 10,
|
|
26
|
+
showLessItems: !1,
|
|
27
|
+
showTotal: !0
|
|
28
|
+
}
|
|
29
|
+
}) => {
|
|
30
|
+
let b = 0, s = {};
|
|
31
|
+
const K = p ?? {}, M = (e) => y ? y(e) : e, S = ee(), c = q(fe(p)), {
|
|
32
|
+
getColumnSFConfig: $,
|
|
33
|
+
setSF: G,
|
|
34
|
+
clearAll: J
|
|
35
|
+
} = ne(), {
|
|
36
|
+
t: z
|
|
37
|
+
} = le(), {
|
|
38
|
+
b: T
|
|
39
|
+
} = ue("ap-table"), o = q({
|
|
40
|
+
total: v.length,
|
|
41
|
+
records: v,
|
|
42
|
+
loading: !1
|
|
43
|
+
}), P = () => {
|
|
44
|
+
var e, t;
|
|
45
|
+
return ((t = (e = S.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
|
|
46
|
+
}, V = async (e) => {
|
|
47
|
+
var n;
|
|
48
|
+
const t = M(e), r = Date.now();
|
|
49
|
+
b = r, o.loading = !0;
|
|
50
|
+
try {
|
|
51
|
+
const a = await l({
|
|
52
|
+
...h(L),
|
|
53
|
+
...t
|
|
54
|
+
});
|
|
55
|
+
b === r && (o.total = a.total || ((n = a.data) == null ? void 0 : n.length) || 0, o.records = [...a.data || []]);
|
|
56
|
+
} catch {
|
|
57
|
+
b === r && (o.records = [], o.total = 0);
|
|
58
|
+
} finally {
|
|
59
|
+
o.loading = !1;
|
|
60
|
+
}
|
|
61
|
+
}, O = (e) => {
|
|
62
|
+
const t = {};
|
|
63
|
+
return Object.entries(e).forEach(([r, n]) => {
|
|
64
|
+
if (t[r] = n, D && n) {
|
|
65
|
+
const a = D[r];
|
|
66
|
+
a && (t[r] = ae(a, n));
|
|
67
|
+
}
|
|
68
|
+
}), t;
|
|
69
|
+
}, Q = async (e) => {
|
|
70
|
+
var n, a, u, f, d;
|
|
71
|
+
const t = P(), r = {};
|
|
72
|
+
Object.entries(t).forEach(([m, w]) => {
|
|
73
|
+
R && R.indexOf(m) > -1 && (r[m] = w);
|
|
74
|
+
}), await ((a = (n = S.value) == null ? void 0 : n.apForm) == null ? void 0 : a.resetFields()), (d = (f = (u = S.value) == null ? void 0 : u.apForm) == null ? void 0 : f.setFieldsValue) == null || d.call(f, r), te(() => {
|
|
75
|
+
e == null || e();
|
|
76
|
+
});
|
|
77
|
+
}, F = (e) => {
|
|
78
|
+
s = e;
|
|
79
|
+
const t = O(e);
|
|
80
|
+
V(t);
|
|
81
|
+
}, W = (e) => {
|
|
82
|
+
F({
|
|
83
|
+
...s,
|
|
84
|
+
...e
|
|
85
|
+
});
|
|
86
|
+
}, E = () => {
|
|
87
|
+
const e = P();
|
|
88
|
+
p && (c.current = C), F({
|
|
89
|
+
...e,
|
|
90
|
+
filter: s.filter,
|
|
91
|
+
sort: s.sort,
|
|
92
|
+
current: p ? C : void 0,
|
|
93
|
+
pageSize: p ? s.pageSize || c.pageSize : void 0
|
|
94
|
+
});
|
|
95
|
+
}, Z = () => {
|
|
96
|
+
J(), s.sort = {}, s.filter = {}, Q(E);
|
|
97
|
+
}, _ = () => {
|
|
98
|
+
F(s);
|
|
99
|
+
}, H = (e) => {
|
|
100
|
+
if (!p)
|
|
101
|
+
_();
|
|
102
|
+
else {
|
|
103
|
+
const {
|
|
104
|
+
current: t,
|
|
105
|
+
pageSize: r
|
|
106
|
+
} = c, n = o.total - e, a = Math.ceil(n / r), u = t > a ? a : t;
|
|
107
|
+
W({
|
|
108
|
+
current: u > 0 ? u : 1
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}, j = (e, t, r) => {
|
|
112
|
+
var m, w;
|
|
113
|
+
const n = P();
|
|
114
|
+
c.current = e.current, c.pageSize = e.pageSize, G(t, r);
|
|
115
|
+
const a = I(r) ? [...r] : [r], u = {};
|
|
116
|
+
for (const i of a)
|
|
117
|
+
(m = h(B)) != null && m.includes(i.columnKey || i.field) && i.order && (u[se(i.columnKey || i.field)] = i.order);
|
|
118
|
+
const f = {};
|
|
119
|
+
for (const i of Object.keys(t))
|
|
120
|
+
(w = h(U)) != null && w.includes(i) && t[i] && (f[i] = t[i]);
|
|
121
|
+
const d = {
|
|
122
|
+
...n,
|
|
123
|
+
filter: f,
|
|
124
|
+
sort: u,
|
|
125
|
+
current: e.current,
|
|
126
|
+
pageSize: e.pageSize
|
|
127
|
+
};
|
|
128
|
+
ie(s, d, ce) || F(d);
|
|
129
|
+
};
|
|
130
|
+
re(() => {
|
|
131
|
+
const e = P(), {
|
|
132
|
+
current: t,
|
|
133
|
+
pageSize: r
|
|
134
|
+
} = c;
|
|
135
|
+
if (s = {
|
|
136
|
+
current: t,
|
|
137
|
+
pageSize: r,
|
|
138
|
+
filter: {},
|
|
139
|
+
sort: {},
|
|
140
|
+
...e
|
|
141
|
+
}, !g) {
|
|
142
|
+
const n = O(s);
|
|
143
|
+
V(n);
|
|
144
|
+
}
|
|
145
|
+
}), oe(() => h(L), () => {
|
|
146
|
+
E();
|
|
147
|
+
}, {
|
|
148
|
+
deep: !0
|
|
149
|
+
});
|
|
150
|
+
const X = A(() => {
|
|
151
|
+
if (o.total === 0)
|
|
152
|
+
return "-";
|
|
153
|
+
const {
|
|
154
|
+
current: e,
|
|
155
|
+
pageSize: t
|
|
156
|
+
} = c;
|
|
157
|
+
return `${e}/${Math.ceil(o.total / t)}`;
|
|
158
|
+
});
|
|
159
|
+
function Y(e) {
|
|
160
|
+
I(e) && (o.records = e, o.total = e.length);
|
|
161
|
+
}
|
|
162
|
+
const k = A(() => {
|
|
163
|
+
const {
|
|
164
|
+
showLessItems: e,
|
|
165
|
+
showTotal: t
|
|
166
|
+
} = K;
|
|
167
|
+
return {
|
|
168
|
+
loading: o.loading,
|
|
169
|
+
pagination: {
|
|
170
|
+
current: c.current,
|
|
171
|
+
pageSize: c.pageSize,
|
|
172
|
+
total: o.total,
|
|
173
|
+
showSizeChanger: !e,
|
|
174
|
+
showQuickJumper: !e,
|
|
175
|
+
showLessItems: e,
|
|
176
|
+
size: "default",
|
|
177
|
+
showTotal: t ? (r) => x("span", {
|
|
178
|
+
class: T("pagination-total-wrapper")
|
|
179
|
+
}, [z("ap.apTable.pagination.totalLeftPrefix"), " ", x("span", {
|
|
180
|
+
class: T("pagination-count-text")
|
|
181
|
+
}, [r]), " ", z("ap.apTable.pagination.totalLeftSuffix"), x("span", {
|
|
182
|
+
class: T("pagination--total-right")
|
|
183
|
+
}, [z("ap.apTable.pagination.totalRightPrefix"), " ", x("span", {
|
|
184
|
+
class: T("pagination-count-text")
|
|
185
|
+
}, [h(X)]), " ", z("ap.apTable.pagination.totalRightSuffix")])]) : void 0
|
|
186
|
+
},
|
|
187
|
+
onChange: j,
|
|
188
|
+
dataSource: o.records
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
return {
|
|
192
|
+
formRef: S,
|
|
193
|
+
submit: E,
|
|
194
|
+
reset: Z,
|
|
195
|
+
refresh: _,
|
|
196
|
+
refreshByDelete: H,
|
|
197
|
+
data: o,
|
|
198
|
+
current: c.current,
|
|
199
|
+
pageSize: c.pageSize,
|
|
200
|
+
handleTableChange: j,
|
|
201
|
+
tableProps: k,
|
|
202
|
+
dataSource: A(() => o.records),
|
|
203
|
+
setDataSource: Y,
|
|
204
|
+
getColumnSFConfig: $
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
export {
|
|
208
|
+
Te as useTablePaging
|
|
209
|
+
};
|
|
@@ -62,8 +62,18 @@ export type UseTablePagingParams<DataType, ParamsType> = {
|
|
|
62
62
|
* 用于显示数据总量和当前数据顺序
|
|
63
63
|
*/
|
|
64
64
|
showTotal?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 是否分页
|
|
67
|
+
*/
|
|
68
|
+
pagination?: boolean;
|
|
65
69
|
};
|
|
66
|
-
|
|
70
|
+
/**
|
|
71
|
+
* ApTable表格分页请求和管理数据实现
|
|
72
|
+
* @deprecated 已弃用,将在下一个次要版本移出,请自行实现
|
|
73
|
+
* @param param0
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, defaultCurrent, defaultPageSize, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, showLessItems, showTotal, pagination }: UseTablePagingParams<DataType, ParamsType>) => {
|
|
67
77
|
formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
|
|
68
78
|
submit: () => void;
|
|
69
79
|
reset: () => void;
|
|
@@ -78,8 +88,8 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
|
|
|
78
88
|
records: DataType[];
|
|
79
89
|
loading: boolean;
|
|
80
90
|
}>;
|
|
81
|
-
current: Ref<number, number>;
|
|
82
|
-
pageSize: Ref<number, number>;
|
|
91
|
+
current: Ref<number | undefined, number | undefined>;
|
|
92
|
+
pageSize: Ref<number | undefined, number | undefined>;
|
|
83
93
|
handleTableChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
|
|
84
94
|
tableProps: ComputedRef<{
|
|
85
95
|
loading: boolean;
|
|
@@ -1,171 +1,176 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { parseFieldValue as
|
|
3
|
-
import { isArray as
|
|
1
|
+
import { ref as b, nextTick as re, unref as r, onMounted as oe, computed as y, createVNode as z } from "vue";
|
|
2
|
+
import { parseFieldValue as ne, dataIndexToStr as se, isEqualCustom as ie } from "../utils.mjs";
|
|
3
|
+
import { isArray as K, isEqualWith as le } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { useTableSortedAndFiltered as
|
|
6
|
-
import { useLocale as
|
|
7
|
-
import { useNamespace as
|
|
5
|
+
import { useTableSortedAndFiltered as ce } from "./use-sorted-filtered.mjs";
|
|
6
|
+
import { useLocale as ue } from "../../config-provider/hooks/use-locale.mjs";
|
|
7
|
+
import { useNamespace as fe } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
8
|
const Te = ({
|
|
9
|
-
manual:
|
|
10
|
-
defaultCurrent:
|
|
11
|
-
defaultPageSize:
|
|
12
|
-
request:
|
|
13
|
-
defaultParams:
|
|
14
|
-
defaultData:
|
|
15
|
-
formatParams:
|
|
16
|
-
paramsValueTypeMap:
|
|
17
|
-
resetFieldsIgnores:
|
|
18
|
-
filterFields:
|
|
19
|
-
sortFields:
|
|
20
|
-
showLessItems:
|
|
21
|
-
showTotal:
|
|
9
|
+
manual: M = !1,
|
|
10
|
+
defaultCurrent: N = 1,
|
|
11
|
+
defaultPageSize: w = 10,
|
|
12
|
+
request: _,
|
|
13
|
+
defaultParams: $ = {},
|
|
14
|
+
defaultData: J = [],
|
|
15
|
+
formatParams: A,
|
|
16
|
+
paramsValueTypeMap: D,
|
|
17
|
+
resetFieldsIgnores: E,
|
|
18
|
+
filterFields: L,
|
|
19
|
+
sortFields: Q,
|
|
20
|
+
showLessItems: C = !1,
|
|
21
|
+
showTotal: W = !0,
|
|
22
|
+
pagination: p = !0
|
|
22
23
|
}) => {
|
|
23
|
-
let
|
|
24
|
-
const
|
|
25
|
-
getColumnSFConfig:
|
|
26
|
-
setSF:
|
|
27
|
-
clearAll:
|
|
28
|
-
} = le(), {
|
|
29
|
-
t: T
|
|
24
|
+
let V = 0, i = {};
|
|
25
|
+
const G = (e) => A ? A(e) : e, u = b(), f = b(p ? N : void 0), g = b(p ? w : void 0), {
|
|
26
|
+
getColumnSFConfig: H,
|
|
27
|
+
setSF: U,
|
|
28
|
+
clearAll: X
|
|
30
29
|
} = ce(), {
|
|
30
|
+
t: T
|
|
31
|
+
} = ue(), {
|
|
31
32
|
b: F
|
|
32
|
-
} =
|
|
33
|
+
} = fe("ap-table"), o = b({
|
|
33
34
|
total: 0,
|
|
34
|
-
records:
|
|
35
|
+
records: J,
|
|
35
36
|
loading: !1
|
|
36
|
-
}),
|
|
37
|
+
}), O = async (e) => {
|
|
37
38
|
var n;
|
|
38
|
-
const
|
|
39
|
-
|
|
39
|
+
const t = G(e), a = Date.now();
|
|
40
|
+
V = a, o.value.loading = !0;
|
|
40
41
|
try {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
...
|
|
42
|
+
const s = await _({
|
|
43
|
+
...$,
|
|
44
|
+
...t
|
|
44
45
|
});
|
|
45
|
-
|
|
46
|
+
V === a && (o.value.total = s.total || ((n = s.data) == null ? void 0 : n.length) || 0, o.value.records = [...s.data || []]);
|
|
46
47
|
} catch {
|
|
47
|
-
|
|
48
|
+
V === a && (o.value.records = [], o.value.total = 0);
|
|
48
49
|
} finally {
|
|
49
|
-
|
|
50
|
+
o.value.loading = !1;
|
|
50
51
|
}
|
|
51
|
-
},
|
|
52
|
-
const
|
|
53
|
-
return Object.entries(e).forEach(([
|
|
54
|
-
if (a
|
|
55
|
-
const
|
|
56
|
-
|
|
52
|
+
}, R = (e) => {
|
|
53
|
+
const t = {};
|
|
54
|
+
return Object.entries(e).forEach(([a, n]) => {
|
|
55
|
+
if (t[a] = n, D && n) {
|
|
56
|
+
const s = D[a];
|
|
57
|
+
s && (t[a] = ne(s, n));
|
|
57
58
|
}
|
|
58
|
-
}),
|
|
59
|
-
},
|
|
60
|
-
var n,
|
|
61
|
-
const
|
|
62
|
-
Object.entries(
|
|
63
|
-
|
|
64
|
-
}), await ((
|
|
59
|
+
}), t;
|
|
60
|
+
}, Y = async (e) => {
|
|
61
|
+
var n, s, c, m, h, d, v;
|
|
62
|
+
const t = ((s = (n = u.value) == null ? void 0 : n.apForm) == null ? void 0 : s.getFieldsValueTransformed(!0)) || {}, a = {};
|
|
63
|
+
Object.entries(t).forEach(([S, P]) => {
|
|
64
|
+
E && E.indexOf(S) > -1 && (a[S] = P);
|
|
65
|
+
}), await ((m = (c = u.value) == null ? void 0 : c.apForm) == null ? void 0 : m.resetFields()), (v = (d = (h = u.value) == null ? void 0 : h.apForm) == null ? void 0 : d.setFieldsValue) == null || v.call(d, a), re(() => {
|
|
65
66
|
e == null || e();
|
|
66
67
|
});
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
...
|
|
68
|
+
}, x = (e) => {
|
|
69
|
+
i = e;
|
|
70
|
+
const t = R(e);
|
|
71
|
+
O(t);
|
|
72
|
+
}, Z = (e) => {
|
|
73
|
+
x({
|
|
74
|
+
...i,
|
|
74
75
|
...e
|
|
75
76
|
});
|
|
76
|
-
},
|
|
77
|
-
var
|
|
78
|
-
const e = ((
|
|
79
|
-
|
|
77
|
+
}, j = () => {
|
|
78
|
+
var t, a;
|
|
79
|
+
const e = ((a = (t = u.value) == null ? void 0 : t.apForm) == null ? void 0 : a.getFieldsValueTransformed(!0)) || {};
|
|
80
|
+
p && (f.value = 1), x({
|
|
80
81
|
...e,
|
|
81
|
-
filter:
|
|
82
|
-
sort:
|
|
83
|
-
current: 1,
|
|
84
|
-
pageSize:
|
|
85
|
-
});
|
|
86
|
-
}, Z = () => {
|
|
87
|
-
U(), s.sort = {}, s.filter = {}, X(R);
|
|
88
|
-
}, _ = () => {
|
|
89
|
-
S(s);
|
|
90
|
-
}, I = (e) => {
|
|
91
|
-
const a = o(r).total - e, t = Math.ceil(a / o(p)), n = o(c) > t ? t : o(c);
|
|
92
|
-
Y({
|
|
93
|
-
current: n > 0 ? n : 1
|
|
82
|
+
filter: i.filter,
|
|
83
|
+
sort: i.sort,
|
|
84
|
+
current: p ? 1 : void 0,
|
|
85
|
+
pageSize: p ? i.pageSize || w : void 0
|
|
94
86
|
});
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
(
|
|
105
|
-
|
|
87
|
+
}, I = () => {
|
|
88
|
+
X(), i.sort = {}, i.filter = {}, Y(j);
|
|
89
|
+
}, q = () => {
|
|
90
|
+
x(i);
|
|
91
|
+
}, k = (e) => {
|
|
92
|
+
if (!p)
|
|
93
|
+
q();
|
|
94
|
+
else {
|
|
95
|
+
const t = r(f), a = r(g), n = r(o).total - e, s = Math.ceil(n / a), c = t > s ? s : t;
|
|
96
|
+
Z({
|
|
97
|
+
current: c > 0 ? c : 1
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}, B = (e, t, a) => {
|
|
101
|
+
var d, v, S, P;
|
|
102
|
+
const n = ((v = (d = u.value) == null ? void 0 : d.apForm) == null ? void 0 : v.getFieldsValueTransformed(!0)) || {};
|
|
103
|
+
f.value = e.current, g.value = e.pageSize, U(t, a);
|
|
104
|
+
const s = K(a) ? [...a] : [a], c = {};
|
|
105
|
+
for (const l of s)
|
|
106
|
+
(S = r(Q)) != null && S.includes(l.columnKey || l.field) && l.order && (c[se(l.columnKey || l.field)] = l.order);
|
|
107
|
+
const m = {};
|
|
108
|
+
for (const l of Object.keys(t))
|
|
109
|
+
(P = r(L)) != null && P.includes(l) && t[l] && (m[l] = t[l]);
|
|
110
|
+
const h = {
|
|
106
111
|
...n,
|
|
107
|
-
filter:
|
|
108
|
-
sort:
|
|
112
|
+
filter: m,
|
|
113
|
+
sort: c,
|
|
109
114
|
current: e.current,
|
|
110
115
|
pageSize: e.pageSize
|
|
111
116
|
};
|
|
112
|
-
|
|
117
|
+
le(i, h, ie) || x(h);
|
|
113
118
|
};
|
|
114
119
|
oe(() => {
|
|
115
|
-
var
|
|
116
|
-
const e = ((
|
|
117
|
-
if (
|
|
118
|
-
current:
|
|
119
|
-
pageSize:
|
|
120
|
+
var t, a;
|
|
121
|
+
const e = ((a = (t = u.value) == null ? void 0 : t.apForm) == null ? void 0 : a.getFieldsValueTransformed(!0)) || {};
|
|
122
|
+
if (i = {
|
|
123
|
+
current: r(f),
|
|
124
|
+
pageSize: r(g),
|
|
120
125
|
filter: {},
|
|
121
126
|
sort: {},
|
|
122
127
|
...e
|
|
123
|
-
}, !
|
|
124
|
-
const n =
|
|
125
|
-
|
|
128
|
+
}, !M) {
|
|
129
|
+
const n = R(i);
|
|
130
|
+
O(n);
|
|
126
131
|
}
|
|
127
132
|
});
|
|
128
|
-
const
|
|
129
|
-
function
|
|
130
|
-
|
|
133
|
+
const ee = y(() => r(o).total === 0 ? "-" : `${r(f.value)}/${Math.ceil(r(o).total / r(g))}`);
|
|
134
|
+
function te(e) {
|
|
135
|
+
K(e) && (o.value.records = e, o.value.total = e.length);
|
|
131
136
|
}
|
|
132
|
-
const
|
|
133
|
-
loading: o
|
|
137
|
+
const ae = y(() => ({
|
|
138
|
+
loading: r(o).loading,
|
|
134
139
|
pagination: {
|
|
135
|
-
current:
|
|
136
|
-
pageSize:
|
|
137
|
-
total: o
|
|
138
|
-
showSizeChanger: !
|
|
139
|
-
showQuickJumper: !
|
|
140
|
-
showLessItems:
|
|
140
|
+
current: r(f),
|
|
141
|
+
pageSize: r(g),
|
|
142
|
+
total: r(o).total,
|
|
143
|
+
showSizeChanger: !C,
|
|
144
|
+
showQuickJumper: !C,
|
|
145
|
+
showLessItems: C,
|
|
141
146
|
size: "default",
|
|
142
|
-
showTotal:
|
|
147
|
+
showTotal: W ? (e) => z("span", {
|
|
143
148
|
class: F("pagination-total-wrapper")
|
|
144
|
-
}, [T("ap.apTable.pagination.totalLeftPrefix"), " ",
|
|
149
|
+
}, [T("ap.apTable.pagination.totalLeftPrefix"), " ", z("span", {
|
|
145
150
|
class: F("pagination-count-text")
|
|
146
|
-
}, [e]), " ", T("ap.apTable.pagination.totalLeftSuffix"),
|
|
151
|
+
}, [e]), " ", T("ap.apTable.pagination.totalLeftSuffix"), z("span", {
|
|
147
152
|
class: F("pagination--total-right")
|
|
148
|
-
}, [T("ap.apTable.pagination.totalRightPrefix"), " ",
|
|
153
|
+
}, [T("ap.apTable.pagination.totalRightPrefix"), " ", z("span", {
|
|
149
154
|
class: F("pagination-count-text")
|
|
150
|
-
}, [
|
|
155
|
+
}, [r(ee)]), " ", T("ap.apTable.pagination.totalRightSuffix")])]) : void 0
|
|
151
156
|
},
|
|
152
|
-
onChange:
|
|
153
|
-
dataSource: o
|
|
157
|
+
onChange: B,
|
|
158
|
+
dataSource: r(o).records
|
|
154
159
|
}));
|
|
155
160
|
return {
|
|
156
161
|
formRef: u,
|
|
157
|
-
submit:
|
|
158
|
-
reset:
|
|
159
|
-
refresh:
|
|
160
|
-
refreshByDelete:
|
|
161
|
-
data:
|
|
162
|
-
current:
|
|
163
|
-
pageSize:
|
|
164
|
-
handleTableChange:
|
|
165
|
-
tableProps:
|
|
166
|
-
dataSource:
|
|
167
|
-
setDataSource:
|
|
168
|
-
getColumnSFConfig:
|
|
162
|
+
submit: j,
|
|
163
|
+
reset: I,
|
|
164
|
+
refresh: q,
|
|
165
|
+
refreshByDelete: k,
|
|
166
|
+
data: o,
|
|
167
|
+
current: f,
|
|
168
|
+
pageSize: g,
|
|
169
|
+
handleTableChange: B,
|
|
170
|
+
tableProps: ae,
|
|
171
|
+
dataSource: y(() => r(o).records),
|
|
172
|
+
setDataSource: te,
|
|
173
|
+
getColumnSFConfig: H
|
|
169
174
|
};
|
|
170
175
|
};
|
|
171
176
|
export {
|