@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
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ApFormSetProps } from '../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
4
5
|
slots: Readonly<{
|
|
5
6
|
default: any;
|
|
6
7
|
}> & {
|
|
7
8
|
default: any;
|
|
8
9
|
};
|
|
9
10
|
refs: {};
|
|
10
|
-
|
|
11
|
+
rootEl: any;
|
|
11
12
|
};
|
|
12
13
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
14
|
declare const __VLS_component: DefineComponent<ApFormSetProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFormSetProps> & Readonly<{}>, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApInfoLayoutPropsMixed } from './interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
4
5
|
slots: Readonly<{
|
|
5
6
|
[key: string]: any;
|
|
6
7
|
/**
|
|
@@ -59,10 +60,10 @@ declare function __VLS_template(): {
|
|
|
59
60
|
content(): any;
|
|
60
61
|
};
|
|
61
62
|
refs: {};
|
|
62
|
-
|
|
63
|
+
rootEl: HTMLDivElement;
|
|
63
64
|
};
|
|
64
65
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
65
|
-
declare const __VLS_component: DefineComponent<ApInfoLayoutPropsMixed, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApInfoLayoutPropsMixed> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
66
|
+
declare const __VLS_component: DefineComponent<ApInfoLayoutPropsMixed, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApInfoLayoutPropsMixed> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
66
67
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
67
68
|
export default _default;
|
|
68
69
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
import { ApInfoLayoutAdminProps } from '../interface';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
4
5
|
slots: {
|
|
5
6
|
header?(_: {}): any;
|
|
6
7
|
default?(_: {}): any;
|
|
@@ -9,13 +10,13 @@ declare function __VLS_template(): {
|
|
|
9
10
|
containerRef: HTMLDivElement;
|
|
10
11
|
headerRef: HTMLDivElement;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
13
14
|
};
|
|
14
15
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
16
|
declare const __VLS_component: DefineComponent<ApInfoLayoutAdminProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApInfoLayoutAdminProps> & Readonly<{}>, {
|
|
16
17
|
bordered: boolean;
|
|
17
18
|
headerStyle: CSSProperties;
|
|
18
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
19
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
20
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
21
|
export default _default;
|
|
21
22
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApInfoLayoutAplusProps } from '../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
4
5
|
slots: {
|
|
5
6
|
header?(_: {}): any;
|
|
6
7
|
title?(_: {}): any;
|
|
@@ -9,7 +10,7 @@ declare function __VLS_template(): {
|
|
|
9
10
|
content?(_: {}): any;
|
|
10
11
|
};
|
|
11
12
|
refs: {};
|
|
12
|
-
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
13
14
|
};
|
|
14
15
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
16
|
declare const __VLS_component: DefineComponent<ApInfoLayoutAplusProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -19,7 +20,7 @@ declare const __VLS_component: DefineComponent<ApInfoLayoutAplusProps, {}, {}, {
|
|
|
19
20
|
}>, {
|
|
20
21
|
toEl: string | HTMLElement;
|
|
21
22
|
telDisabled: boolean;
|
|
22
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
23
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
24
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
25
|
export default _default;
|
|
25
26
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ApListProps } from './interface';
|
|
2
2
|
import { Recordable } from '../type';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode } from 'vue';
|
|
4
4
|
import { ApFormSearchFormExpose } from '..';
|
|
5
5
|
declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApListProps<RecordType>> & PublicProps;
|
|
6
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & Partial<{}> & ApListProps<RecordType>> & PublicProps;
|
|
7
7
|
expose(exposed: ShallowUnwrapRef<{
|
|
8
8
|
submit: () => void;
|
|
9
9
|
reset: () => void;
|
|
@@ -41,9 +41,7 @@ declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable
|
|
|
41
41
|
}): any;
|
|
42
42
|
};
|
|
43
43
|
emit: {};
|
|
44
|
-
}>) => VNode
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}> & {
|
|
44
|
+
}>) => VNode & {
|
|
47
45
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
48
46
|
};
|
|
49
47
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@aplus-frontend/antdv")
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@aplus-frontend/antdv"),R=require("../ap-table/hooks/use-table-paging-ng.js");require("../config-provider/index.js");const c=require("lodash-unified"),$=require("./hooks/use-offline-list.js");require("vue-virtual-scroller/dist/vue-virtual-scroller.css");const m=require("vue-virtual-scroller"),j=require("../config-provider/hooks/use-namespace.js"),A=e.defineComponent({__name:"index",props:{dataSource:{},loading:{type:Boolean,default:void 0},onItem:{},params:{},request:{},defaultData:{},onLoadingChange:{},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},manual:{type:Boolean},containerStyle:{type:[Boolean,null,String,Object,Array]},contentStyle:{type:[Boolean,null,String,Object,Array]},footerWarpperStyle:{type:[Boolean,null,String,Object,Array]},virtual:{default:void 0},rowKey:{}},setup(b,{expose:C}){const z=s.Empty.PRESENTED_IMAGE_SIMPLE,r=b,{b:i,e:w}=j.useNamespace("ap-list"),g=e.ref(),{formRef:p,submit:S,reset:y,handleTableChange:q,data:f,refresh:P,refreshByDelete:D,tableProps:h}=R.useTablePaging({async request(t){var a;const n=await((a=r.request)==null?void 0:a.call(r,t));return{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},defaultParams:r.params,defaultData:r.defaultData,manual:r.manual,pagination:r.pagination,formatParams:r.beforeSearchSubmit}),E={form:p},{pagination:v,dataSource:N,onChange:V}=$.useOfflineList(r);function I(t,n){if(e.unref(u)){V(t,n);return}q({current:t,pageSize:n},{},{},{currentDataSource:[],action:"paginate"})}const l=e.computed(()=>e.unref(u)?e.unref(N):e.unref(f).records),d=e.computed(()=>c.isUndefined(r.loading)?e.unref(f).loading:r.loading),O=e.computed(()=>{var t,n;return r.pagination===!1||r.virtual?!1:((t=r.pagination)==null?void 0:t.hideOnSinglePage)!==!0?!0:e.unref(u)?(((n=r.dataSource)==null?void 0:n.length)||0)>e.unref(v).pageSize:e.unref(f).total>e.unref(h).pagination.pageSize}),u=e.computed(()=>!c.isUndefined(r.dataSource));e.watch(()=>e.unref(d),t=>{var n;(n=r.onLoadingChange)==null||n.call(r,t)});function T(t){var n,a;(a=(n=g.value)==null?void 0:n.querySelector(t||":first-child"))==null||a.scrollIntoView({behavior:"smooth",block:"center"})}function F(t=!1){var o;const n=(o=p.value)==null?void 0:o.apForm,a=t?n==null?void 0:n.getFieldsValueTransformed:n==null?void 0:n.getFieldsValue;return(a==null?void 0:a())||{}}return C({submit:()=>S(),reset:()=>y(),refresh:()=>P(),refreshByDelete:t=>D(t),scrollToFirstRow:T,getSearchFormValuesIfSetted:F}),(t,n)=>(e.openBlock(),e.createBlock(e.unref(s.Spin),{spinning:d.value,class:e.normalizeClass(e.unref(i)("spin"))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)()),style:e.normalizeStyle(t.containerStyle)},[e.renderSlot(t.$slots,"header",{formIns:E,submit:e.unref(S),reset:e.unref(y)}),l.value.length===0?e.renderSlot(t.$slots,"empty",{key:0,loading:d.value},()=>[e.createVNode(e.unref(s.Empty),{image:e.unref(z)},null,8,["image"])]):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"contentRef",ref:g,style:e.normalizeStyle(t.contentStyle)},[t.virtual?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(c.isNumber)(t.virtual)?(e.openBlock(),e.createBlock(e.unref(m.RecycleScroller),{key:0,class:e.normalizeClass(e.unref(i)("scroll-wrapper")),items:l.value,"item-size":t.virtual,"key-field":r.rowKey||"id"},{default:e.withCtx(({item:a,index:o})=>[e.renderSlot(t.$slots,"renderItem",{item:a,index:o})]),_:3},8,["class","items","item-size","key-field"])):(e.openBlock(),e.createBlock(e.unref(m.DynamicScroller),{key:1,items:l.value,"min-item-size":t.virtual.minItemSize,class:e.normalizeClass(e.unref(i)("scroll-wrapper"))},{default:e.withCtx(({item:a,index:o,active:L})=>{var k,B;return[e.createVNode(e.unref(m.DynamicScrollerItem),{item:a,active:L,"data-index":o,"size-dependencies":(B=(k=t.virtual).sizeDependencies)==null?void 0:B.call(k,a)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"renderItem",{item:a,index:o})]),_:2},1032,["item","active","data-index","size-dependencies"])]}),_:3},8,["items","min-item-size","class"]))],64)):e.renderSlot(t.$slots,"renderContent",{key:1,dataSource:l.value},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(a,o)=>e.renderSlot(t.$slots,"renderItem",{item:a,index:o})),256))])],4)),O.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(w)("footer")),style:e.normalizeStyle(t.footerWarpperStyle)},[e.createVNode(e.unref(s.Pagination),e.mergeProps(u.value?e.unref(v):e.unref(c.omit)(e.unref(h).pagination,["showTotal"]),{onChange:I}),null,16)],6)):e.createCommentVNode("",!0)],6)]),_:3},8,["spinning","class"]))}});exports.default=A;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StyleValue } from 'vue';
|
|
1
|
+
import { Ref, StyleValue } from 'vue';
|
|
2
2
|
import { RequestData } from '../ap-table';
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
4
|
export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
@@ -16,9 +16,9 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
|
16
16
|
*/
|
|
17
17
|
onItem?: (record: RecordType, index: number) => void;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* 依赖的额外的参数,传入响应式参数会在变更后重新执行
|
|
20
20
|
*/
|
|
21
|
-
params?: ParamsType
|
|
21
|
+
params?: ParamsType | Ref<ParamsType>;
|
|
22
22
|
/**
|
|
23
23
|
* 请求数据
|
|
24
24
|
* @param params
|
|
@@ -2,5 +2,5 @@ import { ApScrollBarProps } from './interface';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare const _default: DefineComponent<ApScrollBarProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApScrollBarProps> & Readonly<{}>, {
|
|
4
4
|
type: "horizontal" | "vertical";
|
|
5
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
5
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
6
|
export default _default;
|
|
@@ -4,7 +4,7 @@ export * from './interface';
|
|
|
4
4
|
declare const ApScrollBar: {
|
|
5
5
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApScrollBarProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
6
6
|
type: "horizontal" | "vertical";
|
|
7
|
-
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {},
|
|
7
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
8
8
|
P: {};
|
|
9
9
|
B: {};
|
|
10
10
|
D: {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ApColumnType, ApTableProps } from './interface';
|
|
2
2
|
import { ColumnsType, ColumnType } from '@aplus-frontend/antdv/es/table';
|
|
3
3
|
import { RowSelectionReturnType } from './hooks/use-table-row-selection';
|
|
4
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, VNode
|
|
4
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, VNode } from 'vue';
|
|
5
5
|
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApTableProps<RecordType>> & PublicProps;
|
|
6
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & Partial<{}> & ApTableProps<RecordType>> & PublicProps;
|
|
7
7
|
expose(exposed: ShallowUnwrapRef<{
|
|
8
8
|
submit: () => void;
|
|
9
9
|
reset: () => void;
|
|
@@ -76,9 +76,7 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
76
76
|
}) => void;
|
|
77
77
|
};
|
|
78
78
|
emit: {};
|
|
79
|
-
}>) => VNode
|
|
80
|
-
[key: string]: any;
|
|
81
|
-
}> & {
|
|
79
|
+
}>) => VNode & {
|
|
82
80
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
83
81
|
};
|
|
84
82
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),O=require("@aplus-frontend/antdv"),le=require("@aplus-frontend/antdv/es/theme/internal"),se=require("../ap-form/index.js"),_=require("./constants.js");require("../config-provider/index.js");const ue=require("./hooks/use-table-paging-ng.js"),i=require("lodash-unified"),s=require("./utils.js"),de=require("./hooks/use-table-content-height.js"),ie=require("./hooks/use-table-row-selection.js"),ce=require("../utils/index.js");require("./components/setting/modal/index.vue.js");require("./components/paragraph-ellipsis/index.vue.js");const fe=require("./context.js"),pe=require("../config-provider/hooks/use-namespace.js"),me=require("../config-provider/hooks/use-global-config.js"),ge=require("./components/paragraph-ellipsis/index.vue2.js"),ye=require("./components/setting/modal/index.vue2.js"),Se=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},rowKey:{default:"key"},tableLayout:{},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},rowSelection:{type:[Boolean,Object]},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1},columnResizable:{type:Boolean,default:!1},settings:{type:[Boolean,Object],default:void 0}},setup(K,{expose:L}){const t=K;let R=0;const m=e.useSlots(),[,A]=le.useToken(),{e:w,b:c,be:B}=pe.useNamespace("ap-table"),x=me.useGlobalConfig("valueTypeMap"),{height:U,contentRef:D}=de.default(),b=e.ref(t.size),d=e.ref([]),T=e.ref([]);fe.useProvideApTable({columns:e.computed(()=>d.value),columnsBackup:e.computed(()=>T.value),size:e.computed(()=>b.value),updateColumns(r){d.value=r},updateSize(r){b.value=r}});const F=e.computed(()=>{var r,n,o;return R++,((o=(n=(r=t.columns)==null?void 0:r.filter(a=>!a.hideInSearch&&a.dataIndex&&(a.valueType||a.customRenderFormItem)&&!_.noRenderAsFormItemValueList.includes(a.valueType)))==null?void 0:n.sort((a,u)=>{let l=s.getColumnOrder(a.order);return s.getColumnOrder(u.order)-l}))==null?void 0:o.map(a=>{const u=s.updateFormProps(a,s.getFieldProps(a.fieldProps,{})),l={...a,fieldProps:{label:a.title,name:a.dataIndex,...u||{},_signal:R},renderNode:void 0};return l.renderNode=s.getSearchFormItemRenderNode(l,e.unref(x)),l}))||[]}),j=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.sorter===!0)return r.key||r.dataIndex}).filter(Boolean)),$=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.filters&&!r.onFilter)return r.key||r.dataIndex}).filter(Boolean)),W=e.computed(()=>i.isUndefined(t.dataSource)?h.records:t.dataSource),{rowSelection:g,selectedRows:y,...S}=ie.default({fixed:!0,...t.rowSelection===!0?{}:t.rowSelection,rowKey:t.rowKey,dataSource:W}),{formRef:C,submit:k,reset:z,tableProps:N,refresh:H,data:h,setDataSource:M,getColumnSFConfig:G}=ue.useTablePaging({async request(r){var o,a;if(!g.value.preserveSelectedRowKeys&&i.isUndefined(t.dataSource)&&S.clearAll(),!i.isUndefined(t.dataSource))return{data:t.dataSource||[],total:t.dataSource.length||0};const n=await((o=t.request)==null?void 0:o.call(t,r));return(a=t.onLoad)==null||a.call(t,(n==null?void 0:n.data)||[]),{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},filterFields:$,sortFields:j,defaultParams:t.params,defaultData:t.defaultData,manual:t.manual,formatParams:t.beforeSearchSubmit,pagination:t.pagination}),J=()=>{var o;let r=((o=t.columns)==null?void 0:o.filter(a=>!a.hideInTable))||[];function n(a,u){return a.map(l=>({resizable:ce.isDef(l.resizable)?l.resizable:t.columnResizable,...i.omit(s.apColumnToColumn(l),["ellipsis"]),...G(l),fixed:u?u.fixed:l.fixed,title:s.getTableTitle(l,B("table-header","title"),m.headerCell,e.unref(A).colorPrimary),customRender({value:f,...p}){var E,I;const q=s.getTableRenderType(l),oe=s.getTableRenderProps({...l,valueType:q},{value:f,...p}),ne=s.getTableCellRenderNode(q,oe,p.record,e.unref(x)),V=((E=l.renderText)==null?void 0:E.call(l,{value:f,...p}))||f,ae=l.renderText?e.createVNode(e.Fragment,null,[(I=l.renderText)==null?void 0:I.call(l,{value:f,...p})]):ne;let v=Z(l,V,ae);return l.customRender&&(v=l.customRender({value:f,...p,column:l,originalNode:v,originalText:V})),v},children:n(l.children||[],u||l)}))}return n(r)};e.watchEffect(()=>{const r=J();d.value=r,T.value=r});const Q=e.computed(()=>{var n,o;if(t.adaptive&&(h.total>0||((n=t.dataSource)==null?void 0:n.length)))return{y:e.unref(U),x:((o=t.scroll)==null?void 0:o.x)||"100%"};if(t.scroll)return t.scroll}),X=e.computed(()=>{var r;if(t.tableLayout)return t.tableLayout;if((r=t.columns)!=null&&r.some(n=>n.ellipsis))return"fixed"}),P=e.computed(()=>{var o;const r=e.unref(N),n=e.unref(g);return{...t,...r,rowSelection:t.rowSelection===!0||((o=t.rowSelection)==null?void 0:o.mode)==="internal"?{...n,preserveSelectedRowKeys:i.isUndefined(t.dataSource)?n.preserveSelectedRowKeys:!0}:s.falseToUndefined(t.rowSelection),loading:i.isUndefined(t.loading)?r.loading:t.loading,pagination:t.pagination===!1?!1:r.pagination,scroll:e.unref(Q)}}),Y=e.computed(()=>[c(),t.card?null:c("wrapper"),t.adaptive?c("adaptive"):null].filter(Boolean));function Z(r,n,o){return _.noRenderAsFormItemValueList.includes(r.valueType)?o:r.copyable||r.ellipsis?e.createVNode(ge.default,{copyable:r.copyable,ellipsis:r.ellipsis?i.isBoolean(r.ellipsis)?{tooltip:o,rows:1}:{...r.ellipsis,tooltip:o}:!1,content:o},null):o}e.watch(()=>e.unref(h).loading,r=>{var n;(n=t.onLoadingChange)==null||n.call(t,r)}),e.watch(()=>t.dataSource,r=>{M(r)},{immediate:!0});function ee(r){var n,o,a;(a=(o=(n=C.value)==null?void 0:n.apForm)==null?void 0:o.setFieldsValue)==null||a.call(o,r)}function re(r=!1){var o,a,u;const n=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(a=(o=C.value)==null?void 0:o.apForm)==null?void 0:a[n])==null?void 0:u.call(a,!0)}function te(){return e.unref(d)}return L({submit:()=>k(),reset:()=>z(),refresh:()=>H(),setSearchFormValues:ee,getSearchFormValues:re,getShownColumns:te,dataSource:e.computed(()=>e.unref(h).records),rowSelection:{selectedRows:e.computed(()=>e.unref(y)),...S}}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(Y.value)},[e.unref(i.isUndefined)(r.dataSource)&&r.searchForm!==!1&&F.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(w)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(se.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:C,"custom-reset":"","submit-loading":e.unref(N).loading,onSubmit:e.unref(k),onReset:e.unref(z)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,o=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.renderNode),e.mergeProps({key:o.dataIndex,ref_for:!0},o.fieldProps||{},{span:o.span}),null,16,["span"]))),128))]),_:2},[m.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:D,class:e.normalizeClass([e.unref(w)("table-wrapper"),r.card?e.unref(w)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(c)("header-wrapper"))},[r.settings?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c)("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(B)("header","title"))},[e.renderSlot(r.$slots,"title",e.mergeProps({selectedRows:e.unref(y),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},S))],2),m.title?(e.openBlock(),e.createBlock(e.unref(O.Divider),{key:0,type:"vertical"})):e.createCommentVNode("",!0),e.createVNode(ye.default,{config:r.settings===!0?{}:r.settings},null,8,["config"])],2)):e.renderSlot(r.$slots,"title",e.mergeProps({key:1,selectedRows:e.unref(y),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},S))],2),e.createVNode(e.unref(O.Table),e.mergeProps({class:e.unref(c)("table")},P.value,{size:b.value,"table-layout":X.value,columns:d.value,onResizeColumn:n[0]||(n[0]=(o,a)=>a.width=o)}),e.createSlots({summary:e.withCtx(()=>[e.renderSlot(r.$slots,"summary",{columns:d.value,records:P.value.dataSource,selectedRows:e.unref(y)})]),_:2},[e.renderList(e.unref(i.omit)(m,["title","searchFormExtra","headerCell","summary"]),(o,a)=>({name:a,fn:e.withCtx(u=>[e.renderSlot(r.$slots,a,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["class","size","table-layout","columns"])],6)],2))}});exports.default=Se;
|
|
@@ -2,5 +2,5 @@ import { ApTableIndexProps } from '../interface';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare const _default: DefineComponent<ApTableIndexProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableIndexProps> & Readonly<{}>, {
|
|
4
4
|
bordered: boolean;
|
|
5
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
5
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
6
|
export default _default;
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
tooltip?: VNodeChild;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
10
|
+
declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
11
|
export default _default;
|
|
@@ -5,9 +5,10 @@ type TableSettingModalSlots = {
|
|
|
5
5
|
trigger?: any;
|
|
6
6
|
};
|
|
7
7
|
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
8
9
|
slots: Readonly<TableSettingModalSlots> & TableSettingModalSlots;
|
|
9
10
|
refs: {};
|
|
10
|
-
|
|
11
|
+
rootEl: any;
|
|
11
12
|
};
|
|
12
13
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
14
|
declare const __VLS_component: DefineComponent<ApTableSettingModalProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingModalProps> & Readonly<{}>, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ApTableSettingSelectGroupProps } from '../../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
declare const _default: DefineComponent<ApTableSettingSelectGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingSelectGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
3
|
+
declare const _default: DefineComponent<ApTableSettingSelectGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingSelectGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SortableItemProps } from '../../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
declare const _default: DefineComponent<SortableItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SortableItemProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
3
|
+
declare const _default: DefineComponent<SortableItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SortableItemProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
4
4
|
export default _default;
|
|
@@ -7,5 +7,5 @@ declare const _default: DefineComponent<SortableItemMetaProps, {}, {}, {}, {}, C
|
|
|
7
7
|
}, string, PublicProps, Readonly<SortableItemMetaProps> & Readonly<{
|
|
8
8
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
9
9
|
"onUpdate:value"?: ((open: ApColumnState) => any) | undefined;
|
|
10
|
-
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
10
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
11
|
export default _default;
|
|
@@ -5,5 +5,5 @@ declare const _default: DefineComponent<ApTableSettingSorterProps, {}, {}, {}, {
|
|
|
5
5
|
"update:value": (value: ApColumnState[]) => any;
|
|
6
6
|
}, string, PublicProps, Readonly<ApTableSettingSorterProps> & Readonly<{
|
|
7
7
|
"onUpdate:value"?: ((value: ApColumnState[]) => any) | undefined;
|
|
8
|
-
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
8
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
9
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ApTableSettingTreeSelectProps } from '../../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
declare const _default: DefineComponent<ApTableSettingTreeSelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingTreeSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
3
|
+
declare const _default: DefineComponent<ApTableSettingTreeSelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingTreeSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
4
4
|
export default _default;
|
|
@@ -1290,7 +1290,7 @@ export declare const apTableRenderItemMap: {
|
|
|
1290
1290
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
1291
1291
|
index: DefineComponent<ApTableIndexProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApTableIndexProps> & Readonly<{}>, {
|
|
1292
1292
|
bordered: boolean;
|
|
1293
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
1293
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
1294
1294
|
status: DefineComponent<ApTableStatusProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApTableStatusProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
1295
1295
|
password: {
|
|
1296
1296
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApFieldTextPasswordProps> & Readonly<{
|
|
@@ -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 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),Y=require("./use-sorted-filtered.js");require("../../config-provider/index.js");const x=require("../utils.js"),v=require("lodash-unified"),k=require("../../config-provider/hooks/use-locale.js"),ee=require("../../config-provider/hooks/use-namespace.js"),w=1,j=10;function te(g){const l={};return g&&(g===!0?(l.current=w,l.pageSize=j):(l.current=g.defaultCurrent||w,l.pageSize=g.defaultPageSize||j)),l}const re=({manual:g=!1,request:l,defaultParams:y={},defaultData:E=[],formatParams:A,paramsValueTypeMap:L,resetFieldsIgnores:V,filterFields:U,sortFields:_,pagination:p={defaultCurrent:1,defaultPageSize:10,showLessItems:!1,showTotal:!0}})=>{let C=0,c={};const I=p??{},M=e=>A?A(e):e,m=n.ref(),i=n.reactive(te(p)),{getColumnSFConfig:B,setSF:K,clearAll:$}=Y.useTableSortedAndFiltered(),{t:T}=k.useLocale(),{b:z}=ee.useNamespace("ap-table"),a=n.reactive({total:E.length,records:E,loading:!1}),P=()=>{var e,t;return((t=(e=m.value)==null?void 0:e.apForm)==null?void 0:t.getFieldsValueTransformed(!0))||{}},N=async e=>{var o;const t=M(e),r=Date.now();C=r,a.loading=!0;try{const s=await l({...n.unref(y),...t});C===r&&(a.total=s.total||((o=s.data)==null?void 0:o.length)||0,a.records=[...s.data||[]])}catch{C===r&&(a.records=[],a.total=0)}finally{a.loading=!1}},D=e=>{const t={};return Object.entries(e).forEach(([r,o])=>{if(t[r]=o,L&&o){const s=L[r];s&&(t[r]=x.parseFieldValue(s,o))}}),t},G=async e=>{var o,s,f,d,S;const t=P(),r={};Object.entries(t).forEach(([h,b])=>{V&&V.indexOf(h)>-1&&(r[h]=b)}),await((s=(o=m.value)==null?void 0:o.apForm)==null?void 0:s.resetFields()),(S=(d=(f=m.value)==null?void 0:f.apForm)==null?void 0:d.setFieldsValue)==null||S.call(d,r),n.nextTick(()=>{e==null||e()})},F=e=>{c=e;const t=D(e);N(t)},J=e=>{F({...c,...e})},q=()=>{const e=P();p&&(i.current=w),F({...e,filter:c.filter,sort:c.sort,current:p?w:void 0,pageSize:p?c.pageSize||i.pageSize:void 0})},Q=()=>{$(),c.sort={},c.filter={},G(q)},R=()=>{F(c)},W=e=>{if(!p)R();else{const{current:t,pageSize:r}=i,o=a.total-e,s=Math.ceil(o/r),f=t>s?s:t;J({current:f>0?f:1})}},O=(e,t,r)=>{var h,b;const o=P();i.current=e.current,i.pageSize=e.pageSize,K(t,r);const s=v.isArray(r)?[...r]:[r],f={};for(const u of s)(h=n.unref(_))!=null&&h.includes(u.columnKey||u.field)&&u.order&&(f[x.dataIndexToStr(u.columnKey||u.field)]=u.order);const d={};for(const u of Object.keys(t))(b=n.unref(U))!=null&&b.includes(u)&&t[u]&&(d[u]=t[u]);const S={...o,filter:d,sort:f,current:e.current,pageSize:e.pageSize};v.isEqualWith(c,S,x.isEqualCustom)||F(S)};n.onMounted(()=>{const e=P(),{current:t,pageSize:r}=i;if(c={current:t,pageSize:r,filter:{},sort:{},...e},!g){const o=D(c);N(o)}}),n.watch(()=>n.unref(y),()=>{q()},{deep:!0});const Z=n.computed(()=>{if(a.total===0)return"-";const{current:e,pageSize:t}=i;return`${e}/${Math.ceil(a.total/t)}`});function H(e){v.isArray(e)&&(a.records=e,a.total=e.length)}const X=n.computed(()=>{const{showLessItems:e,showTotal:t}=I;return{loading:a.loading,pagination:{current:i.current,pageSize:i.pageSize,total:a.total,showSizeChanger:!e,showQuickJumper:!e,showLessItems:e,size:"default",showTotal:t?r=>n.createVNode("span",{class:z("pagination-total-wrapper")},[T("ap.apTable.pagination.totalLeftPrefix")," ",n.createVNode("span",{class:z("pagination-count-text")},[r])," ",T("ap.apTable.pagination.totalLeftSuffix"),n.createVNode("span",{class:z("pagination--total-right")},[T("ap.apTable.pagination.totalRightPrefix")," ",n.createVNode("span",{class:z("pagination-count-text")},[n.unref(Z)])," ",T("ap.apTable.pagination.totalRightSuffix")])]):void 0},onChange:O,dataSource:a.records}});return{formRef:m,submit:q,reset:Q,refresh:R,refreshByDelete:W,data:a,current:i.current,pageSize:i.pageSize,handleTableChange:O,tableProps:X,dataSource:n.computed(()=>a.records),setDataSource:H,getColumnSFConfig:B}};exports.useTablePaging=re;
|
|
@@ -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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),z=require("../utils.js"),V=require("lodash-unified");require("../../config-provider/index.js");const te=require("./use-sorted-filtered.js"),re=require("../../config-provider/hooks/use-locale.js"),ae=require("../../config-provider/hooks/use-namespace.js"),ne=({manual:R=!1,defaultCurrent:M=1,defaultPageSize:y=10,request:B,defaultParams:K={},defaultData:L=[],formatParams:C,paramsValueTypeMap:N,resetFieldsIgnores:w,filterFields:_,sortFields:$,showLessItems:q=!1,showTotal:J=!0,pagination:g=!0})=>{let x=0,u={};const Q=e=>C?C(e):e,c=t.ref(),f=t.ref(g?M:void 0),p=t.ref(g?y:void 0),{getColumnSFConfig:U,setSF:W,clearAll:G}=te.useTableSortedAndFiltered(),{t:T}=re.useLocale(),{b:F}=ae.useNamespace("ap-table"),n=t.ref({total:0,records:L,loading:!1}),A=async e=>{var o;const r=Q(e),a=Date.now();x=a,n.value.loading=!0;try{const s=await B({...K,...r});x===a&&(n.value.total=s.total||((o=s.data)==null?void 0:o.length)||0,n.value.records=[...s.data||[]])}catch{x===a&&(n.value.records=[],n.value.total=0)}finally{n.value.loading=!1}},O=e=>{const r={};return Object.entries(e).forEach(([a,o])=>{if(r[a]=o,N&&o){const s=N[a];s&&(r[a]=z.parseFieldValue(s,o))}}),r},H=async e=>{var o,s,l,m,h,d,v;const r=((s=(o=c.value)==null?void 0:o.apForm)==null?void 0:s.getFieldsValueTransformed(!0))||{},a={};Object.entries(r).forEach(([S,P])=>{w&&w.indexOf(S)>-1&&(a[S]=P)}),await((m=(l=c.value)==null?void 0:l.apForm)==null?void 0:m.resetFields()),(v=(d=(h=c.value)==null?void 0:h.apForm)==null?void 0:d.setFieldsValue)==null||v.call(d,a),t.nextTick(()=>{e==null||e()})},b=e=>{u=e;const r=O(e);A(r)},X=e=>{b({...u,...e})},j=()=>{var r,a;const e=((a=(r=c.value)==null?void 0:r.apForm)==null?void 0:a.getFieldsValueTransformed(!0))||{};g&&(f.value=1),b({...e,filter:u.filter,sort:u.sort,current:g?1:void 0,pageSize:g?u.pageSize||y:void 0})},Y=()=>{G(),u.sort={},u.filter={},H(j)},D=()=>{b(u)},Z=e=>{if(!g)D();else{const r=t.unref(f),a=t.unref(p),o=t.unref(n).total-e,s=Math.ceil(o/a),l=r>s?s:r;X({current:l>0?l:1})}},E=(e,r,a)=>{var d,v,S,P;const o=((v=(d=c.value)==null?void 0:d.apForm)==null?void 0:v.getFieldsValueTransformed(!0))||{};f.value=e.current,p.value=e.pageSize,W(r,a);const s=V.isArray(a)?[...a]:[a],l={};for(const i of s)(S=t.unref($))!=null&&S.includes(i.columnKey||i.field)&&i.order&&(l[z.dataIndexToStr(i.columnKey||i.field)]=i.order);const m={};for(const i of Object.keys(r))(P=t.unref(_))!=null&&P.includes(i)&&r[i]&&(m[i]=r[i]);const h={...o,filter:m,sort:l,current:e.current,pageSize:e.pageSize};V.isEqualWith(u,h,z.isEqualCustom)||b(h)};t.onMounted(()=>{var r,a;const e=((a=(r=c.value)==null?void 0:r.apForm)==null?void 0:a.getFieldsValueTransformed(!0))||{};if(u={current:t.unref(f),pageSize:t.unref(p),filter:{},sort:{},...e},!R){const o=O(u);A(o)}});const I=t.computed(()=>t.unref(n).total===0?"-":`${t.unref(f.value)}/${Math.ceil(t.unref(n).total/t.unref(p))}`);function k(e){V.isArray(e)&&(n.value.records=e,n.value.total=e.length)}const ee=t.computed(()=>({loading:t.unref(n).loading,pagination:{current:t.unref(f),pageSize:t.unref(p),total:t.unref(n).total,showSizeChanger:!q,showQuickJumper:!q,showLessItems:q,size:"default",showTotal:J?e=>t.createVNode("span",{class:F("pagination-total-wrapper")},[T("ap.apTable.pagination.totalLeftPrefix")," ",t.createVNode("span",{class:F("pagination-count-text")},[e])," ",T("ap.apTable.pagination.totalLeftSuffix"),t.createVNode("span",{class:F("pagination--total-right")},[T("ap.apTable.pagination.totalRightPrefix")," ",t.createVNode("span",{class:F("pagination-count-text")},[t.unref(I)])," ",T("ap.apTable.pagination.totalRightSuffix")])]):void 0},onChange:E,dataSource:t.unref(n).records}));return{formRef:c,submit:j,reset:Y,refresh:D,refreshByDelete:Z,data:n,current:f,pageSize:p,handleTableChange:E,tableProps:ee,dataSource:t.computed(()=>t.unref(n).records),setDataSource:k,getColumnSFConfig:U}};exports.useTablePaging=ne;
|
|
@@ -3,7 +3,7 @@ import { CompareFn, SortOrder, TableRowSelection } from '@aplus-frontend/antdv/e
|
|
|
3
3
|
import { ApFormItemProps, ApFormSearchFormProps } from '../ap-form';
|
|
4
4
|
import { ApFormItemCheckboxProps, ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextAreaProps, ApFormItemTextPasswordProps, ApFormItemTextProps } from '../ap-form/items/interface';
|
|
5
5
|
import { Recordable } from '../type';
|
|
6
|
-
import { ComputedRef, CSSProperties, VNode } from 'vue';
|
|
6
|
+
import { ComputedRef, CSSProperties, Ref, VNode } from 'vue';
|
|
7
7
|
import { ApActionGroupProps } from '../ap-action';
|
|
8
8
|
import { ApTableIndexProps } from './components/interface';
|
|
9
9
|
import { EllipsisConfig } from '@aplus-frontend/antdv/es/typography/Base';
|
|
@@ -243,9 +243,10 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
|
|
|
243
243
|
*/
|
|
244
244
|
card?: boolean;
|
|
245
245
|
/**
|
|
246
|
-
* request
|
|
246
|
+
* request额外请求的参数
|
|
247
|
+
* 如果传入响应式数据,将会在变更后重新执行
|
|
247
248
|
*/
|
|
248
|
-
params?: ParamsType
|
|
249
|
+
params?: ParamsType | Ref<ParamsType>;
|
|
249
250
|
/**
|
|
250
251
|
* 自定义渲染搜索表单
|
|
251
252
|
* @deprecated 未实现 暂不可用
|
|
@@ -708,4 +708,5 @@ export declare function getTableTitle(column: ApColumnType<any>, titleNodeClassN
|
|
|
708
708
|
}> | ((props: ColumnTitleProps<any>) => VNodeArrayChildren | VueNode) | null;
|
|
709
709
|
export declare function recursionApColumns<ReturnType = any>(columns: (ColumnType | ColumnGroupType<any>)[], handler: (column: ColumnType) => ReturnType): ReturnType[];
|
|
710
710
|
export declare function isEqualCustom(value: any, other: any): boolean | undefined;
|
|
711
|
+
export declare function falseToUndefined(obj: any): any;
|
|
711
712
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("lodash-unified"),d=require("./constants.js"),b=require("@fruits-chain/utils");require("../ap-form/index.js");const g=require("@aplus-frontend/antdv"),j=require("@ant-design/icons-vue"),O=require("../ap-form/item/index.vue.js");function h(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!u.isVNode(e)}const p=(e,t,n)=>{let o={};return i.isObject(e)?Object.keys(e).forEach(r=>{i.isObject(e[r])?o[r]=p(e[r],t[r],n):o[r]=n(e[r],t)}):o=n(e,t),o},N=(e,t)=>{switch(e){case"dayjs":return t.valueOf();case"dayjsRange":return t.map(n=>n.valueOf());case"dayjsDayRange":{const[n,o]=t;return[n.startOf("day").valueOf(),o.endOf("day").valueOf()]}case"multiple":case"multipleNumber":return i.isArray(t)?t:[t];case"boolean":return t;case"object":return t;default:return t}};function E(e){return i.isArray(e)?e.join("."):e}function F(e){const t=Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();return t==="string"&&typeof e=="object"?"object":e===null?"null":e===void 0?"undefined":t}const m=e=>F(e)==="map"?e:new Map(Object.entries(e||{})),c=e=>{const t=[],n=m(e);return n.forEach((o,r)=>{const s=n.get(r)||n.get(`${r}`);if(s){if(typeof s=="object"&&(s!=null&&s.text)){t.push({text:s==null?void 0:s.text,value:r,label:s==null?void 0:s.text,disabled:s.disabled});return}t.push({text:s,label:s,value:r})}}),t},S=e=>i.isUndefined(e)||e<0?0:e;function y(e,t){return!e||!i.isFunction(e)?e:e(t)}function V(e){let t=e.valueType||"text";return e.valueEnum&&(t="status"),t}function v(e,t,n,o){var l;const r=d.apTableRenderItemMap[e];if(r)return u.createVNode(r,u.mergeProps(t,{mode:"read"}),null);const s=o==null?void 0:o[e];return((l=s==null?void 0:s.render)==null?void 0:l.call(s,t.value,n,t))||t.value}function C(e,t){if(e.customRenderFormItem)return()=>{const r=e.customRenderFormItem(e);return u.cloneVNode(r,{...e.fieldProps,span:e.span,...r.props||{}})};const n=d.apTableFormItemMap[e.valueType];if(n)return n;const o=t==null?void 0:t[e.valueType];return()=>{var s;const r=(s=o==null?void 0:o.renderFormItem)==null?void 0:s.call(o,e.fieldProps.field);return r?u.createVNode(O.default,u.mergeProps(e.fieldProps,{span:e.span}),h(r)?r:{default:()=>[r]}):null}}function P(e,t){const n=y(e.fieldProps,t),o=(n==null?void 0:n.field)||n||{},r=e.valueType==="switch",s=e.valueType==="index",l=r?{checked:t.value}:{value:s?t.index+1:t.value};return e.valueEnum&&(o.valueEnum=e.valueEnum),{...i.omit(o,["request"]),...l}}function q(e){const t={...e};return i.isBoolean(e.filters)&&e.filters&&e.valueEnum&&(t.filters=c(e.valueEnum)),t}function I(e,t){var o;const n=t||{};return e.valueEnum&&!((o=n.field)!=null&&o.options)&&(n.field={...n.field,options:c(e.valueEnum)}),n}function A(e){if(!b.isType("Object")(e))return e;try{return JSON.stringify(e)}catch{return e}}function _(e,t,n,o){const r=n==null?void 0:n({title:e.title,column:e}),s=(r==null?void 0:r.filter(T=>T.type!==Symbol.for("v-cmt")))||[];if(r&&s.length>0)return r;const a=i.isString(e.title)?u.createVNode("span",{class:t,title:e.title},[e.title]):e.title,f=e.tooltip?i.isFunction(e.tooltip)?e.tooltip(e):u.createVNode(u.Fragment,null,[e.tooltip]):null;return f?u.createVNode("span",{style:{display:"inline-flex",alignItems:"center",maxWidth:"100%"}},[a,u.createVNode(g.Tooltip,{title:f,placement:"bottom"},{default:()=>[u.createVNode(j.QuestionCircleOutlined,{style:{padding:"4px",color:o,verticalAlign:"middle"}},null)]})]):a}function R(e,t){const n=[];function o(r){var s;for(const l of r)(s=l.children)!=null&&s.length?o(l.children):n.push(t(l))}return o(e),n}function w(e,t){if(i.isArray(e)&&i.isArray(t))return i.isEqual(i.sortBy(e),i.sortBy(t));if(i.isPlainObject(e)&&i.isPlainObject(t)){const n=o=>i.every(o,r=>r==null)||i.isEmpty(o);if(n(e)&&n(t))return!0}}function x(e){if(e!==!1)return e}exports.apColumnToColumn=q;exports.dataIndexToStr=E;exports.falseToUndefined=x;exports.formatParamsValueType=p;exports.getColumnOrder=S;exports.getFieldProps=y;exports.getSearchFormItemRenderNode=C;exports.getTableCellRenderNode=v;exports.getTableRenderProps=P;exports.getTableRenderType=V;exports.getTableTitle=_;exports.isEqualCustom=w;exports.objectToMap=m;exports.objectToString=A;exports.parseFieldValue=N;exports.recursionApColumns=R;exports.updateFormProps=I;exports.valueEnumToArray=c;
|
|
@@ -6,11 +6,12 @@ type ApTagGroupSlots = {
|
|
|
6
6
|
}) => void;
|
|
7
7
|
};
|
|
8
8
|
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
9
10
|
slots: Readonly<ApTagGroupSlots> & ApTagGroupSlots;
|
|
10
11
|
refs: {
|
|
11
12
|
container: HTMLDivElement;
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
+
rootEl: any;
|
|
14
15
|
};
|
|
15
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
17
|
declare const __VLS_component: DefineComponent<ApTagGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTagGroupProps> & Readonly<{}>, {
|