@aplus-frontend/ui 7.17.4 → 7.18.1
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/ag-grid/hooks/use-editable-form-item-api.mjs +1 -1
- package/es/src/ag-grid/index.vue.mjs +1 -1
- package/es/src/ap-field/cascader/index.vue.mjs +9 -8
- package/es/src/ap-field/cascader/read.vue2.mjs +3 -2
- package/es/src/ap-field/checkbox/index.vue.mjs +12 -11
- package/es/src/ap-field/checkbox/read.vue2.mjs +5 -4
- package/es/src/ap-field/date/index.vue.mjs +83 -73
- package/es/src/ap-field/date/read.vue2.mjs +1 -0
- package/es/src/ap-field/date-range/index.vue.mjs +80 -70
- package/es/src/ap-field/date-range/read.vue2.mjs +3 -2
- package/es/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
- package/es/src/ap-field/hooks/use-read-mode-render.mjs +6 -0
- package/es/src/ap-field/interface.d.ts +8 -0
- package/es/src/ap-field/number/index.vue.mjs +57 -46
- package/es/src/ap-field/number/read.vue2.mjs +1 -0
- package/es/src/ap-field/radio/index.vue.mjs +17 -16
- package/es/src/ap-field/radio/read.vue2.mjs +1 -0
- package/es/src/ap-field/rate/index.vue.mjs +6 -5
- package/es/src/ap-field/second/index.vue.mjs +35 -20
- package/es/src/ap-field/second/read.vue2.mjs +1 -0
- package/es/src/ap-field/segmented/index.vue.mjs +15 -14
- package/es/src/ap-field/select/index.vue.mjs +53 -52
- package/es/src/ap-field/select/read.vue2.mjs +1 -0
- package/es/src/ap-field/slider/index.vue.mjs +11 -10
- package/es/src/ap-field/switch/index.vue.mjs +20 -19
- package/es/src/ap-field/switch/read.vue2.mjs +5 -4
- package/es/src/ap-field/text/index.vue2.mjs +35 -31
- package/es/src/ap-field/text/password.vue.d.ts +4 -4
- package/es/src/ap-field/text/password.vue.mjs +57 -48
- package/es/src/ap-field/text/read-password.vue2.mjs +6 -5
- package/es/src/ap-field/text/read.vue2.mjs +3 -2
- package/es/src/ap-field/text-area/index.vue.mjs +46 -36
- package/es/src/ap-field/text-area/read.vue2.mjs +1 -0
- package/es/src/ap-field/tree-select/index.vue.mjs +9 -8
- package/es/src/ap-field/tree-select/read.vue2.mjs +1 -0
- package/es/src/ap-form/items/cascader/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/date/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/date-range/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/number/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/select/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/switch/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/text/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/text/password.vue.d.ts +3 -1
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
- package/es/src/ap-table/constants.d.ts +11 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +110 -99
- package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/es/src/business/batch-input-group/index.vue.mjs +11 -10
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/read.vue2.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
- package/lib/src/ap-field/hooks/use-read-mode-render.js +1 -0
- package/lib/src/ap-field/interface.d.ts +8 -0
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/number/read.vue2.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/radio/read.vue2.js +1 -1
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/switch/read.vue2.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +4 -4
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
- package/lib/src/ap-form/items/cascader/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/date/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/switch/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/text/password.vue.d.ts +3 -1
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
- package/lib/src/ap-table/constants.d.ts +11 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFormItemSlots } from '../../interface';
|
|
2
2
|
import { ApFormItemNumberProps } from '../interface';
|
|
3
|
-
import { ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
3
|
+
import { ComponentInternalInstance, VNode, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
4
4
|
import { FieldMode, ApFieldNumberProps } from '../../..';
|
|
5
5
|
import { ValueType } from '@aplus-frontend/antdv/es/input-number/src/utils/MiniDecimal';
|
|
6
6
|
import { KeyboardEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
@@ -34,6 +34,7 @@ declare function __VLS_template(): {
|
|
|
34
34
|
readonly class?: unknown;
|
|
35
35
|
readonly style?: unknown;
|
|
36
36
|
readonly emptyText?: string | undefined;
|
|
37
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
37
38
|
readonly size?: "small" | "large" | "middle" | undefined;
|
|
38
39
|
readonly type?: string | undefined;
|
|
39
40
|
readonly step?: ValueType | undefined;
|
|
@@ -555,6 +556,7 @@ declare const __VLS_component: DefineComponent<ApFormItemNumberProps, {
|
|
|
555
556
|
readonly class?: unknown;
|
|
556
557
|
readonly style?: unknown;
|
|
557
558
|
readonly emptyText?: string | undefined;
|
|
559
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
558
560
|
readonly size?: "small" | "large" | "middle" | undefined;
|
|
559
561
|
readonly type?: string | undefined;
|
|
560
562
|
readonly step?: ValueType | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFormItemSlots } from '../../interface';
|
|
2
2
|
import { ApFormItemSelectProps } from '../interface';
|
|
3
|
-
import { ComponentInternalInstance, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
3
|
+
import { ComponentInternalInstance, VNode, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
4
4
|
import { FieldMode, ApFieldSelectProps } from '../../..';
|
|
5
5
|
import { SelectValue, DefaultOptionType, LabeledValue } from '@aplus-frontend/antdv/es/select';
|
|
6
6
|
import { SelectHandler, FieldNames, FilterFunc } from '@aplus-frontend/antdv/es/vc-select/Select';
|
|
@@ -50,6 +50,7 @@ declare function __VLS_template(): {
|
|
|
50
50
|
readonly class?: unknown;
|
|
51
51
|
readonly style?: unknown;
|
|
52
52
|
readonly emptyText?: string | undefined;
|
|
53
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
53
54
|
readonly size?: "small" | "large" | "middle" | undefined;
|
|
54
55
|
readonly onBlur?: ((e: FocusEvent) => void) | undefined;
|
|
55
56
|
readonly onChange?: ((value: SelectValue, option: DefaultOptionType | DefaultOptionType[]) => void) | undefined;
|
|
@@ -715,6 +716,7 @@ declare const __VLS_component: DefineComponent<ApFormItemSelectProps, {
|
|
|
715
716
|
readonly class?: unknown;
|
|
716
717
|
readonly style?: unknown;
|
|
717
718
|
readonly emptyText?: string | undefined;
|
|
719
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
718
720
|
readonly size?: "small" | "large" | "middle" | undefined;
|
|
719
721
|
readonly onBlur?: ((e: FocusEvent) => void) | undefined;
|
|
720
722
|
readonly onChange?: ((value: SelectValue, option: DefaultOptionType | DefaultOptionType[]) => void) | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFormItemSlots } from '../../interface';
|
|
2
2
|
import { ApFormItemSwitchProps } from '../interface';
|
|
3
|
-
import { ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
3
|
+
import { ComponentInternalInstance, VNode, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
4
4
|
import { FieldMode, ApFieldSwitchConfirmConfig, ApFieldSwitchProps } from '../../../ap-field';
|
|
5
5
|
import { FocusEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
6
6
|
import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
|
|
@@ -26,6 +26,7 @@ declare function __VLS_template(): {
|
|
|
26
26
|
readonly class?: unknown;
|
|
27
27
|
readonly style?: unknown;
|
|
28
28
|
readonly emptyText?: string | undefined;
|
|
29
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
29
30
|
readonly size?: "small" | "default" | undefined;
|
|
30
31
|
readonly onBlur?: FocusEventHandler | undefined;
|
|
31
32
|
readonly onChange?: ((checked: string | number | boolean, e: Event) => void) | undefined;
|
|
@@ -254,6 +255,7 @@ declare const __VLS_component: DefineComponent<ApFormItemSwitchProps, {
|
|
|
254
255
|
readonly class?: unknown;
|
|
255
256
|
readonly style?: unknown;
|
|
256
257
|
readonly emptyText?: string | undefined;
|
|
258
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
257
259
|
readonly size?: "small" | "default" | undefined;
|
|
258
260
|
readonly onBlur?: FocusEventHandler | undefined;
|
|
259
261
|
readonly onChange?: ((checked: string | number | boolean, e: Event) => void) | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputFocusOptions } from '@aplus-frontend/antdv/es/vc-input/utils/commonUtils';
|
|
2
2
|
import { ApFormItemSlots } from '../../interface';
|
|
3
3
|
import { ApFormItemTextProps } from '../interface';
|
|
4
|
-
import { ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
4
|
+
import { ComponentInternalInstance, VNode, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
5
5
|
import { FieldMode, ApFieldTextProps } from '../../..';
|
|
6
6
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
7
7
|
import { FocusEventHandler, ChangeEventHandler, CompositionEventHandler, KeyboardEventHandler, MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
@@ -33,6 +33,7 @@ declare function __VLS_template(): {
|
|
|
33
33
|
readonly class?: unknown;
|
|
34
34
|
readonly style?: unknown;
|
|
35
35
|
readonly emptyText?: string | undefined;
|
|
36
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
36
37
|
readonly type?: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "url" | "email" | "datetime-local" | "file" | "password" | "tel" | undefined;
|
|
37
38
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
38
39
|
readonly lazy?: boolean | undefined;
|
|
@@ -425,6 +426,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTextProps, {
|
|
|
425
426
|
readonly class?: unknown;
|
|
426
427
|
readonly style?: unknown;
|
|
427
428
|
readonly emptyText?: string | undefined;
|
|
429
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
428
430
|
readonly type?: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "url" | "email" | "datetime-local" | "file" | "password" | "tel" | undefined;
|
|
429
431
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
430
432
|
readonly lazy?: boolean | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFormItemSlots } from '../../interface';
|
|
2
2
|
import { ApFormItemTextPasswordProps } from '../interface';
|
|
3
|
-
import { ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
3
|
+
import { ComponentInternalInstance, VNode, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
4
4
|
import { FieldMode, ApFieldTextPasswordProps } from '../../..';
|
|
5
5
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
6
6
|
import { FocusEventHandler, ChangeEventHandler, CompositionEventHandler, KeyboardEventHandler, MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
@@ -33,6 +33,7 @@ declare function __VLS_template(): {
|
|
|
33
33
|
readonly class?: unknown;
|
|
34
34
|
readonly style?: unknown;
|
|
35
35
|
readonly emptyText?: string | undefined;
|
|
36
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
36
37
|
readonly type?: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "url" | "email" | "datetime-local" | "file" | "password" | "tel" | undefined;
|
|
37
38
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
38
39
|
readonly lazy?: boolean | undefined;
|
|
@@ -467,6 +468,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTextPasswordProps, {
|
|
|
467
468
|
readonly class?: unknown;
|
|
468
469
|
readonly style?: unknown;
|
|
469
470
|
readonly emptyText?: string | undefined;
|
|
471
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
470
472
|
readonly type?: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "url" | "email" | "datetime-local" | "file" | "password" | "tel" | undefined;
|
|
471
473
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
472
474
|
readonly lazy?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LegacyDataNode, FieldNames, Key } from '@aplus-frontend/antdv/es/vc-tree-select/interface';
|
|
2
2
|
import { ApFormItemSlots } from '../../interface';
|
|
3
3
|
import { ApFormItemTreeSelectProps } from '../interface';
|
|
4
|
-
import { ComponentInternalInstance, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
4
|
+
import { ComponentInternalInstance, VNode, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
5
5
|
import { FieldMode, ApFieldTreeSelectProps } from '../../../ap-field';
|
|
6
6
|
import { ChangeEventExtra, FieldNames, DefaultOptionType, BaseOptionType, SimpleModeConfig, LegacyDataNode } from '@aplus-frontend/antdv/es/vc-tree-select/TreeSelect';
|
|
7
7
|
import { SelectHandler } from '@aplus-frontend/antdv/es/vc-select/Select';
|
|
@@ -52,6 +52,7 @@ declare function __VLS_template(): {
|
|
|
52
52
|
readonly class?: unknown;
|
|
53
53
|
readonly style?: unknown;
|
|
54
54
|
readonly emptyText?: string | undefined;
|
|
55
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
55
56
|
readonly size?: "small" | "large" | "middle" | undefined;
|
|
56
57
|
readonly onBlur?: ((e: FocusEvent) => void) | undefined;
|
|
57
58
|
readonly onChange?: ((value: unknown, labelList: any[], extra: ChangeEventExtra) => void) | undefined;
|
|
@@ -856,6 +857,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTreeSelectProps, {
|
|
|
856
857
|
readonly class?: unknown;
|
|
857
858
|
readonly style?: unknown;
|
|
858
859
|
readonly emptyText?: string | undefined;
|
|
860
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
859
861
|
readonly size?: "small" | "large" | "middle" | undefined;
|
|
860
862
|
readonly onBlur?: ((e: FocusEvent) => void) | undefined;
|
|
861
863
|
readonly onChange?: ((value: unknown, labelList: any[], extra: ChangeEventExtra) => void) | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApTableValueFields } from './interface';
|
|
2
|
-
import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentInternalInstance, CSSProperties, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, PropType, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase,
|
|
2
|
+
import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentInternalInstance, VNode, CSSProperties, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, PropType, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, RendererNode, RendererElement, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
|
|
3
3
|
import { ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextProps, ApFormItemTextAreaProps, ApFormItemCheckboxProps, ApFormItemTextPasswordProps, ApFormItemTreeSelectProps, ApFormItemCascaderProps } from '../ap-form/items/interface';
|
|
4
4
|
import { ApFieldDateProps, FieldMode, ApFieldDateRangeProps, ApFieldNumberProps, ApFieldRadioProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldSwitchConfirmConfig, ApFieldTextProps, ApFieldTextAreaProps, ApFieldCheckboxProps, ApFieldTextPasswordProps, ApFieldTreeSelectProps, ApFieldCascaderProps } from '../ap-field';
|
|
5
5
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
@@ -67,6 +67,7 @@ export declare const apTableFormItemMap: {
|
|
|
67
67
|
readonly class?: unknown;
|
|
68
68
|
readonly style?: unknown;
|
|
69
69
|
readonly emptyText?: string | undefined;
|
|
70
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
70
71
|
readonly size?: ButtonSize;
|
|
71
72
|
readonly onBlur?: FocusEventHandler | undefined;
|
|
72
73
|
readonly onClick?: MouseEventHandler | undefined;
|
|
@@ -876,6 +877,7 @@ export declare const apTableFormItemMap: {
|
|
|
876
877
|
readonly class?: unknown;
|
|
877
878
|
readonly style?: unknown;
|
|
878
879
|
readonly emptyText?: string | undefined;
|
|
880
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
879
881
|
readonly size?: ButtonSize;
|
|
880
882
|
readonly onBlur?: FocusEventHandler | undefined;
|
|
881
883
|
readonly onClick?: MouseEventHandler | undefined;
|
|
@@ -1738,6 +1740,7 @@ export declare const apTableFormItemMap: {
|
|
|
1738
1740
|
readonly class?: unknown;
|
|
1739
1741
|
readonly style?: unknown;
|
|
1740
1742
|
readonly emptyText?: string | undefined;
|
|
1743
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
1741
1744
|
readonly size?: "small" | "large" | "middle" | undefined;
|
|
1742
1745
|
readonly type?: string | undefined;
|
|
1743
1746
|
readonly step?: ValueType | undefined;
|
|
@@ -2494,6 +2497,7 @@ export declare const apTableFormItemMap: {
|
|
|
2494
2497
|
readonly class?: unknown;
|
|
2495
2498
|
readonly style?: unknown;
|
|
2496
2499
|
readonly emptyText?: string | undefined;
|
|
2500
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
2497
2501
|
readonly size?: "small" | "large" | "middle" | undefined;
|
|
2498
2502
|
readonly onBlur?: ((e: FocusEvent) => void) | undefined;
|
|
2499
2503
|
readonly onChange?: ((value: SelectValue, option: DefaultOptionType | DefaultOptionType[]) => void) | undefined;
|
|
@@ -3220,6 +3224,7 @@ export declare const apTableFormItemMap: {
|
|
|
3220
3224
|
readonly class?: unknown;
|
|
3221
3225
|
readonly style?: unknown;
|
|
3222
3226
|
readonly emptyText?: string | undefined;
|
|
3227
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
3223
3228
|
readonly size?: "small" | "default" | undefined;
|
|
3224
3229
|
readonly onBlur?: FocusEventHandler | undefined;
|
|
3225
3230
|
readonly onChange?: ((checked: string | number | boolean, e: Event) => void) | undefined;
|
|
@@ -3493,6 +3498,7 @@ export declare const apTableFormItemMap: {
|
|
|
3493
3498
|
readonly class?: unknown;
|
|
3494
3499
|
readonly style?: unknown;
|
|
3495
3500
|
readonly emptyText?: string | undefined;
|
|
3501
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
3496
3502
|
readonly type?: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "url" | "email" | "datetime-local" | "file" | "password" | "tel" | undefined;
|
|
3497
3503
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
3498
3504
|
readonly lazy?: boolean | undefined;
|
|
@@ -4308,6 +4314,7 @@ export declare const apTableFormItemMap: {
|
|
|
4308
4314
|
readonly class?: unknown;
|
|
4309
4315
|
readonly style?: unknown;
|
|
4310
4316
|
readonly emptyText?: string | undefined;
|
|
4317
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
4311
4318
|
readonly onChange?: ((checkedValue: Array< CheckboxValueType>) => void) | undefined;
|
|
4312
4319
|
readonly value?: CheckboxValueType[] | undefined;
|
|
4313
4320
|
readonly disabled?: boolean | undefined;
|
|
@@ -4446,6 +4453,7 @@ export declare const apTableFormItemMap: {
|
|
|
4446
4453
|
readonly class?: unknown;
|
|
4447
4454
|
readonly style?: unknown;
|
|
4448
4455
|
readonly emptyText?: string | undefined;
|
|
4456
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
4449
4457
|
readonly type?: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "url" | "email" | "datetime-local" | "file" | "password" | "tel" | undefined;
|
|
4450
4458
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
4451
4459
|
readonly lazy?: boolean | undefined;
|
|
@@ -4928,6 +4936,7 @@ export declare const apTableFormItemMap: {
|
|
|
4928
4936
|
readonly class?: unknown;
|
|
4929
4937
|
readonly style?: unknown;
|
|
4930
4938
|
readonly emptyText?: string | undefined;
|
|
4939
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
4931
4940
|
readonly size?: "small" | "large" | "middle" | undefined;
|
|
4932
4941
|
readonly onBlur?: ((e: FocusEvent) => void) | undefined;
|
|
4933
4942
|
readonly onChange?: ((value: unknown, labelList: any[], extra: ChangeEventExtra) => void) | undefined;
|
|
@@ -5791,6 +5800,7 @@ export declare const apTableFormItemMap: {
|
|
|
5791
5800
|
readonly class?: unknown;
|
|
5792
5801
|
readonly style?: unknown;
|
|
5793
5802
|
readonly emptyText?: string | undefined;
|
|
5803
|
+
readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
|
|
5794
5804
|
readonly size?: ButtonSize;
|
|
5795
5805
|
readonly onBlur?: ((e: FocusEvent) => void) | undefined;
|
|
5796
5806
|
readonly onChange?: ((value: ValueType, selectOptions: DefaultOptionType[] | DefaultOptionType[][]) => void) | undefined;
|
|
@@ -117,7 +117,7 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
|
|
|
117
117
|
dataSource: DataType[];
|
|
118
118
|
}>;
|
|
119
119
|
dataSource: ComputedRef<DataType[]>;
|
|
120
|
-
setDataSource: (dataSource?: DataType[]) => void;
|
|
120
|
+
setDataSource: (dataSource?: DataType[], isAgGrid?: boolean) => void;
|
|
121
121
|
getColumnSFConfig: (column: ApColumnType, append?: boolean) => Recordable;
|
|
122
122
|
sortedInfo: Ref<{
|
|
123
123
|
[x: string]: any;
|
|
@@ -1,171 +1,171 @@
|
|
|
1
|
-
import { ref as me, reactive as
|
|
2
|
-
import { cloneDeep as Te, isArray as
|
|
1
|
+
import { ref as me, reactive as J, unref as d, nextTick as Se, onMounted as ze, watch as Pe, computed as y, createVNode as x } from "vue";
|
|
2
|
+
import { cloneDeep as Te, isArray as K, isEqualWith as Ce, isUndefined as be } from "lodash-unified";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
4
|
import "../../utils/index.mjs";
|
|
5
5
|
import { parseFieldValue as xe, dataIndexToStr as Fe, isEqualCustom as we } from "../utils.mjs";
|
|
6
6
|
import { useTableSortedAndFiltered as De } from "./use-sorted-filtered.mjs";
|
|
7
7
|
import { useLocale as Ee } from "../../config-provider/hooks/use-locale.mjs";
|
|
8
8
|
import { useNamespace as ve } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
-
import { isDef as
|
|
10
|
-
const
|
|
11
|
-
defaultCurrent:
|
|
12
|
-
defaultPageSize:
|
|
9
|
+
import { isDef as Q } from "../../utils/is.mjs";
|
|
10
|
+
const p = 1, M = 20, W = {
|
|
11
|
+
defaultCurrent: p,
|
|
12
|
+
defaultPageSize: M,
|
|
13
13
|
showLessItems: !1,
|
|
14
14
|
showTotal: !0
|
|
15
15
|
};
|
|
16
16
|
function Ae(i) {
|
|
17
|
-
return i === !1 ? {} : i == null || i === !0 ?
|
|
18
|
-
...
|
|
17
|
+
return i === !1 ? {} : i == null || i === !0 ? W : {
|
|
18
|
+
...W,
|
|
19
19
|
...i
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
function Le(i) {
|
|
23
23
|
const f = {};
|
|
24
|
-
return i === !1 || (i === !0 || i == null ? (f.current =
|
|
24
|
+
return i === !1 || (i === !0 || i == null ? (f.current = p, f.pageSize = M) : (f.current = i.defaultCurrent || p, f.pageSize = i.defaultPageSize || M)), f;
|
|
25
25
|
}
|
|
26
26
|
const qe = ({
|
|
27
27
|
manual: i = !1,
|
|
28
28
|
request: f,
|
|
29
|
-
params:
|
|
30
|
-
defaultData:
|
|
29
|
+
params: R = {},
|
|
30
|
+
defaultData: I = [],
|
|
31
31
|
formatParams: N,
|
|
32
32
|
paramsValueTypeMap: O,
|
|
33
33
|
resetFieldsIgnores: V,
|
|
34
|
-
filterFields:
|
|
35
|
-
sortFields:
|
|
36
|
-
namespace:
|
|
37
|
-
pagination:
|
|
38
|
-
onClickReset:
|
|
39
|
-
onAfterRequest:
|
|
34
|
+
filterFields: $,
|
|
35
|
+
sortFields: G,
|
|
36
|
+
namespace: Z = "ap-table",
|
|
37
|
+
pagination: g,
|
|
38
|
+
onClickReset: H,
|
|
39
|
+
onAfterRequest: X,
|
|
40
40
|
defaultSortOrder: h
|
|
41
41
|
}) => {
|
|
42
|
-
let F = 0,
|
|
43
|
-
const
|
|
44
|
-
getColumnSFConfig:
|
|
45
|
-
setSF:
|
|
46
|
-
clearAll:
|
|
42
|
+
let F = 0, c = {};
|
|
43
|
+
const Y = Ae(g), ee = (e) => N ? N(e) : e, m = me(), o = J(Le(g)), {
|
|
44
|
+
getColumnSFConfig: te,
|
|
45
|
+
setSF: ne,
|
|
46
|
+
clearAll: re,
|
|
47
47
|
sortedInfo: j,
|
|
48
48
|
filteredInfo: U
|
|
49
49
|
} = De(h), {
|
|
50
50
|
t: S
|
|
51
51
|
} = Ee(), {
|
|
52
52
|
b: z
|
|
53
|
-
} = ve(
|
|
54
|
-
total:
|
|
55
|
-
records:
|
|
53
|
+
} = ve(Z), a = J({
|
|
54
|
+
total: I.length,
|
|
55
|
+
records: I,
|
|
56
56
|
loading: !1
|
|
57
57
|
}), P = () => m.value?.apForm?.getFieldsValueTransformed(!0) || {}, w = async (e, t) => {
|
|
58
|
-
const n =
|
|
58
|
+
const n = ee(e), r = Date.now(), s = t?.cache;
|
|
59
59
|
F = r, a.loading = !0;
|
|
60
60
|
try {
|
|
61
61
|
const u = await f({
|
|
62
|
-
...
|
|
62
|
+
...d(R),
|
|
63
63
|
...n
|
|
64
64
|
});
|
|
65
65
|
if (F === r) {
|
|
66
|
-
a.total = u.total || u.data?.length || 0,
|
|
67
|
-
const
|
|
68
|
-
t?.onSuccess?.(e,
|
|
66
|
+
a.total = u.total || u.data?.length || 0, s ? a.records.push(...u.data || []) : a.records = [...u.data || []];
|
|
67
|
+
const b = a.records.length < a.total;
|
|
68
|
+
t?.onSuccess?.(e, b), a.loading = !1;
|
|
69
69
|
}
|
|
70
70
|
} catch {
|
|
71
|
-
F === r && !
|
|
71
|
+
F === r && !s && (a.records = [], a.total = 0), a.loading = !1;
|
|
72
72
|
} finally {
|
|
73
|
-
|
|
73
|
+
X?.(a.records);
|
|
74
74
|
}
|
|
75
75
|
}, D = (e) => {
|
|
76
76
|
const t = {};
|
|
77
77
|
return Object.entries(e).forEach(([n, r]) => {
|
|
78
78
|
if (t[n] = r, O && r) {
|
|
79
|
-
const
|
|
80
|
-
|
|
79
|
+
const s = O[n];
|
|
80
|
+
s && (t[n] = xe(s, r));
|
|
81
81
|
}
|
|
82
82
|
}), t;
|
|
83
|
-
},
|
|
83
|
+
}, ae = async (e) => {
|
|
84
84
|
const t = P(), n = {};
|
|
85
|
-
Object.entries(t).forEach(([r,
|
|
86
|
-
V && V.indexOf(r) > -1 && (n[r] =
|
|
85
|
+
Object.entries(t).forEach(([r, s]) => {
|
|
86
|
+
V && V.indexOf(r) > -1 && (n[r] = s);
|
|
87
87
|
}), await m.value?.apForm?.resetFields(), m.value?.apForm?.setFieldsValue?.(n), Se(() => {
|
|
88
88
|
e?.();
|
|
89
89
|
});
|
|
90
90
|
}, T = (e) => {
|
|
91
|
-
|
|
91
|
+
c = e;
|
|
92
92
|
const t = D(e);
|
|
93
93
|
w(t);
|
|
94
|
-
},
|
|
94
|
+
}, oe = (e) => {
|
|
95
95
|
T({
|
|
96
|
-
...
|
|
96
|
+
...c,
|
|
97
97
|
...e
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
-
let
|
|
100
|
+
let C, E = !0;
|
|
101
101
|
function q() {
|
|
102
|
-
|
|
102
|
+
C = void 0, E = !0;
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const se = () => {
|
|
105
105
|
if (!E)
|
|
106
106
|
return;
|
|
107
|
-
const e =
|
|
108
|
-
...
|
|
107
|
+
const e = C ? C + 1 : 2, t = {
|
|
108
|
+
...c,
|
|
109
109
|
current: e
|
|
110
110
|
};
|
|
111
|
-
|
|
111
|
+
c = t;
|
|
112
112
|
const n = D(t);
|
|
113
113
|
w(n, {
|
|
114
114
|
cache: !0,
|
|
115
|
-
onSuccess(r,
|
|
116
|
-
|
|
115
|
+
onSuccess(r, s) {
|
|
116
|
+
C = r.current, E = s;
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
},
|
|
119
|
+
}, ce = () => Te(c), v = () => {
|
|
120
120
|
_(!0), q();
|
|
121
121
|
}, _ = (e = !1) => {
|
|
122
|
-
const t = P(), n =
|
|
123
|
-
n && e && (
|
|
122
|
+
const t = P(), n = g !== !1;
|
|
123
|
+
n && e && (o.current = p), T({
|
|
124
124
|
...t,
|
|
125
|
-
filter:
|
|
126
|
-
sort:
|
|
127
|
-
current: n ? e ?
|
|
128
|
-
pageSize: n ?
|
|
125
|
+
filter: c.filter,
|
|
126
|
+
sort: c.sort,
|
|
127
|
+
current: n ? e ? p : c.current || o.current : void 0,
|
|
128
|
+
pageSize: n ? c.pageSize || o.pageSize : void 0
|
|
129
129
|
});
|
|
130
|
-
},
|
|
131
|
-
|
|
130
|
+
}, ie = () => {
|
|
131
|
+
re(), c.sort = {}, c.filter = {}, H?.(), ae(v), q();
|
|
132
132
|
}, A = () => {
|
|
133
|
-
T(
|
|
134
|
-
},
|
|
135
|
-
if (
|
|
133
|
+
T(c);
|
|
134
|
+
}, ue = (e) => {
|
|
135
|
+
if (g === !1)
|
|
136
136
|
A();
|
|
137
137
|
else {
|
|
138
138
|
const {
|
|
139
139
|
current: t,
|
|
140
140
|
pageSize: n
|
|
141
|
-
} =
|
|
142
|
-
|
|
141
|
+
} = o, r = a.total - e, s = Math.ceil(r / n), u = t > s ? s : t;
|
|
142
|
+
oe({
|
|
143
143
|
current: u > 0 ? u : 1
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
}, L = (e, t, n) => {
|
|
147
147
|
const r = P();
|
|
148
|
-
|
|
149
|
-
const
|
|
150
|
-
for (const l of
|
|
151
|
-
|
|
152
|
-
const
|
|
148
|
+
o.current = e.current, o.pageSize = e.pageSize, ne(t, n);
|
|
149
|
+
const s = K(n) ? [...n] : [n], u = {};
|
|
150
|
+
for (const l of s)
|
|
151
|
+
d(G)?.includes(l.columnKey || l.field) && l.order && (u[Fe(l.columnKey || l.field)] = l.order);
|
|
152
|
+
const b = {};
|
|
153
153
|
for (const l of Object.keys(t))
|
|
154
|
-
|
|
155
|
-
const
|
|
154
|
+
d($)?.includes(l) && t[l] && (b[l] = t[l]);
|
|
155
|
+
const B = {
|
|
156
156
|
...r,
|
|
157
|
-
filter:
|
|
157
|
+
filter: b,
|
|
158
158
|
sort: u,
|
|
159
159
|
current: e.current,
|
|
160
160
|
pageSize: e.pageSize
|
|
161
161
|
};
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
const r = e?.current ??
|
|
162
|
+
Ce(c, B, we) || T(B);
|
|
163
|
+
}, k = (e, t = U.value || {}, n = j.value || {}) => {
|
|
164
|
+
const r = e?.current ?? o.current, s = e?.pageSize ?? o.pageSize;
|
|
165
165
|
L(
|
|
166
166
|
{
|
|
167
167
|
current: r,
|
|
168
|
-
pageSize:
|
|
168
|
+
pageSize: s
|
|
169
169
|
},
|
|
170
170
|
t,
|
|
171
171
|
n,
|
|
@@ -185,18 +185,18 @@ const qe = ({
|
|
|
185
185
|
const e = P(), {
|
|
186
186
|
current: t,
|
|
187
187
|
pageSize: n
|
|
188
|
-
} =
|
|
189
|
-
if (
|
|
188
|
+
} = o;
|
|
189
|
+
if (c = {
|
|
190
190
|
current: t,
|
|
191
191
|
pageSize: n,
|
|
192
192
|
filter: {},
|
|
193
193
|
sort: le(),
|
|
194
194
|
...e
|
|
195
195
|
}, !i) {
|
|
196
|
-
const r = D(
|
|
196
|
+
const r = D(c);
|
|
197
197
|
w(r);
|
|
198
198
|
}
|
|
199
|
-
}), Pe(() =>
|
|
199
|
+
}), Pe(() => d(R), () => {
|
|
200
200
|
v();
|
|
201
201
|
}, {
|
|
202
202
|
deep: !0
|
|
@@ -207,11 +207,22 @@ const qe = ({
|
|
|
207
207
|
const {
|
|
208
208
|
current: e,
|
|
209
209
|
pageSize: t
|
|
210
|
-
} =
|
|
210
|
+
} = o;
|
|
211
211
|
return `${e}/${Math.ceil(a.total / t)}`;
|
|
212
212
|
});
|
|
213
|
-
function ge(e) {
|
|
214
|
-
|
|
213
|
+
function ge(e, t = !1) {
|
|
214
|
+
if (K(e)) {
|
|
215
|
+
if (g !== !1 && t) {
|
|
216
|
+
const n = o.pageSize * (o.current - 1);
|
|
217
|
+
a.records = e.slice(n, n + o.pageSize) || [];
|
|
218
|
+
const r = Math.ceil(e.length / o.pageSize);
|
|
219
|
+
r < o.current && k({
|
|
220
|
+
current: r
|
|
221
|
+
});
|
|
222
|
+
} else
|
|
223
|
+
a.records = e;
|
|
224
|
+
a.total = e.length;
|
|
225
|
+
}
|
|
215
226
|
}
|
|
216
227
|
const de = y(() => {
|
|
217
228
|
const {
|
|
@@ -219,19 +230,19 @@ const qe = ({
|
|
|
219
230
|
showTotal: t,
|
|
220
231
|
showQuickJumper: n,
|
|
221
232
|
showSizeChanger: r,
|
|
222
|
-
pageSizeOptions:
|
|
223
|
-
} =
|
|
233
|
+
pageSizeOptions: s
|
|
234
|
+
} = Y;
|
|
224
235
|
return {
|
|
225
236
|
loading: a.loading,
|
|
226
237
|
pagination: {
|
|
227
|
-
current:
|
|
228
|
-
pageSize:
|
|
238
|
+
current: o.current,
|
|
239
|
+
pageSize: o.pageSize,
|
|
229
240
|
total: a.total,
|
|
230
|
-
showSizeChanger:
|
|
231
|
-
showQuickJumper:
|
|
241
|
+
showSizeChanger: Q(r) ? r : !e,
|
|
242
|
+
showQuickJumper: Q(n) ? n : !e,
|
|
232
243
|
showLessItems: e,
|
|
233
244
|
size: "default",
|
|
234
|
-
pageSizeOptions:
|
|
245
|
+
pageSizeOptions: be(s) ? ["10", "20", "50", "100"] : s,
|
|
235
246
|
showTotal: t ? (u) => x("span", {
|
|
236
247
|
class: z("pagination-total-wrapper")
|
|
237
248
|
}, [S("ap.apTable.pagination.totalLeftPrefix"), " ", x("span", {
|
|
@@ -240,44 +251,44 @@ const qe = ({
|
|
|
240
251
|
class: z("pagination--total-right")
|
|
241
252
|
}, [S("ap.apTable.pagination.totalRightPrefix"), " ", x("span", {
|
|
242
253
|
class: z("pagination-count-text")
|
|
243
|
-
}, [
|
|
254
|
+
}, [d(fe)]), " ", S("ap.apTable.pagination.totalRightSuffix")])]) : void 0
|
|
244
255
|
},
|
|
245
256
|
onChange: L,
|
|
246
257
|
dataSource: a.records
|
|
247
258
|
};
|
|
248
259
|
});
|
|
249
260
|
function pe(e, t = !0) {
|
|
250
|
-
Object.assign(
|
|
261
|
+
Object.assign(o, e), c.current = e.current, c.pageSize = e.pageSize, t && A();
|
|
251
262
|
}
|
|
252
263
|
function he() {
|
|
253
264
|
return {
|
|
254
|
-
...
|
|
265
|
+
...o
|
|
255
266
|
};
|
|
256
267
|
}
|
|
257
268
|
return {
|
|
258
269
|
formRef: m,
|
|
259
270
|
submit: v,
|
|
260
|
-
reset:
|
|
271
|
+
reset: ie,
|
|
261
272
|
refresh: A,
|
|
262
|
-
refreshByDelete:
|
|
273
|
+
refreshByDelete: ue,
|
|
263
274
|
data: a,
|
|
264
275
|
handleTableChange: L,
|
|
265
|
-
handleTableChangeOptional:
|
|
276
|
+
handleTableChangeOptional: k,
|
|
266
277
|
tableProps: de,
|
|
267
278
|
dataSource: y(() => a.records),
|
|
268
279
|
setDataSource: ge,
|
|
269
|
-
getColumnSFConfig:
|
|
280
|
+
getColumnSFConfig: te,
|
|
270
281
|
sortedInfo: j,
|
|
271
282
|
filteredInfo: U,
|
|
272
283
|
getPaging: he,
|
|
273
284
|
setPaging: pe,
|
|
274
285
|
submitWith: _,
|
|
275
|
-
fetchNextPageAndCache:
|
|
276
|
-
getLastParams:
|
|
286
|
+
fetchNextPageAndCache: se,
|
|
287
|
+
getLastParams: ce
|
|
277
288
|
};
|
|
278
289
|
};
|
|
279
290
|
export {
|
|
280
|
-
|
|
281
|
-
|
|
291
|
+
p as DEFAULT_CURRENT,
|
|
292
|
+
M as DEFAULT_PAGE_SIZE,
|
|
282
293
|
qe as useTablePaging
|
|
283
294
|
};
|