@aplus-frontend/ui 7.12.3 → 7.12.5
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/editable/form-item.vue.d.ts +4 -2
- package/es/src/ag-grid/editable/index.vue.d.ts +4 -2
- package/es/src/ag-grid/index.vue.d.ts +4 -2
- package/es/src/ag-grid/index.vue.mjs +33 -31
- package/es/src/ap-field/select/use-select-options.d.ts +2 -2
- package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/es/src/ap-form/ap-form.vue.d.ts +2 -1
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -3
- package/es/src/ap-form/items/number/index.vue.d.ts +3 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +6 -6
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -3
- package/es/src/ap-form/search-form/index.vue.d.ts +4 -3
- package/es/src/ap-grid/editable/form-item.vue.d.ts +4 -2
- package/es/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/es/src/ap-grid/index.vue.d.ts +4 -2
- package/es/src/ap-list/index.vue.d.ts +4 -2
- package/es/src/ap-modal/utils/confirm.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue.d.ts +4 -2
- package/es/src/ap-table/constants.d.ts +6 -6
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
- package/es/src/business/ap-draggable-grid/index.d.ts +1 -1
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/es/src/business/ap-select-layout/index.d.ts +4 -2
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
- package/es/src/business/ap-table-modal/index.d.ts +5 -17
- package/es/src/business/ap-upload/apUpload.vue.d.ts +19 -0
- package/es/src/business/ap-upload/apUpload.vue.mjs +38 -30
- package/es/src/business/ap-upload/apUploadTypes.d.ts +9 -0
- package/es/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +101 -101
- package/es/src/business/ap-value-select-card/index.vue.d.ts +4 -2
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +4 -3
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +3 -2
- package/es/src/business/batch-input-group/index.vue.mjs +67 -72
- package/es/src/business/batch-input-group/interface.d.ts +3 -0
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +65 -43
- package/es/src/business/batch-input-group/style/index.mjs +9 -9
- package/es/src/check-card/style/index.mjs +1 -1
- package/es/src/config-provider/config-provider.mjs +33 -32
- package/es/src/config-provider/hooks/use-global-config.mjs +40 -37
- package/es/src/config-provider/hooks/use-namespace.d.ts +1 -5
- package/es/src/editable-table/form-item.vue.d.ts +4 -2
- package/es/src/editable-table/index.vue.d.ts +4 -2
- package/es/src/scroll-view/index.vue.d.ts +5 -5
- package/es/src/tests/wrapper.d.ts +4 -4
- package/es/src/utils/cssinjs/utils.d.ts +1 -0
- package/es/src/utils/cssinjs/utils.mjs +9 -9
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.d.ts +4 -2
- package/lib/src/ag-grid/editable/index.vue.d.ts +4 -2
- package/lib/src/ag-grid/index.vue.d.ts +4 -2
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
- package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -3
- package/lib/src/ap-form/items/number/index.vue.d.ts +3 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +6 -6
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -3
- package/lib/src/ap-form/search-form/index.vue.d.ts +4 -3
- package/lib/src/ap-grid/editable/form-item.vue.d.ts +4 -2
- package/lib/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/lib/src/ap-grid/index.vue.d.ts +4 -2
- package/lib/src/ap-list/index.vue.d.ts +4 -2
- package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -2
- package/lib/src/ap-table/constants.d.ts +6 -6
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
- package/lib/src/business/ap-draggable-grid/index.d.ts +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/lib/src/business/ap-select-layout/index.d.ts +4 -2
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
- package/lib/src/business/ap-table-modal/index.d.ts +5 -17
- package/lib/src/business/ap-upload/apUpload.vue.d.ts +19 -0
- package/lib/src/business/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/business/ap-upload/apUploadTypes.d.ts +9 -0
- package/lib/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue.d.ts +4 -2
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +4 -3
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +3 -2
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/interface.d.ts +3 -0
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +3 -3
- package/lib/src/business/batch-input-group/style/index.js +1 -1
- package/lib/src/check-card/style/index.js +1 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.js +1 -1
- package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -5
- package/lib/src/editable-table/form-item.vue.d.ts +4 -2
- package/lib/src/editable-table/index.vue.d.ts +4 -2
- package/lib/src/scroll-view/index.vue.d.ts +5 -5
- package/lib/src/tests/wrapper.d.ts +4 -4
- package/lib/src/utils/cssinjs/utils.d.ts +1 -0
- package/lib/src/utils/cssinjs/utils.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -5,13 +5,13 @@ import { ApFieldDateProps, ApFieldDateRangeProps, ApFieldNumberProps, FieldMode,
|
|
|
5
5
|
import { ApFormItemSlots, ApFormItemTextPassword, ApActionGroupProps, GroupActionTypes } from '..';
|
|
6
6
|
import { ValueType } from '@aplus-frontend/antdv/es/input-number/src/utils/MiniDecimal';
|
|
7
7
|
import { KeyboardEventHandler, FocusEventHandler, ChangeEventHandler, CompositionEventHandler, MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
8
|
+
import { InputNumberProps, RadioChangeEvent, SelectProps, TreeSelectProps, CheckboxOptionType } from '@aplus-frontend/antdv';
|
|
8
9
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
9
10
|
import { VueTypeValidableDef } from '../../node_modules/vue-types';
|
|
10
11
|
import { VueNode, CustomSlotsType } from '@aplus-frontend/antdv/es/_util/type';
|
|
11
12
|
import { OnCleanup } from '@vue/reactivity';
|
|
12
13
|
import { RadioGroupChildOption } from '@aplus-frontend/antdv/es/radio/Group';
|
|
13
14
|
import { RadioGroupButtonStyle, RadioGroupOptionType } from '@aplus-frontend/antdv/es/radio/interface';
|
|
14
|
-
import { RadioChangeEvent, TreeSelectProps, CheckboxOptionType } from '@aplus-frontend/antdv';
|
|
15
15
|
import { SelectValue, DefaultOptionType, LabeledValue, BaseOptionType } from '@aplus-frontend/antdv/es/select';
|
|
16
16
|
import { SelectHandler, FieldNames, FilterFunc } from '@aplus-frontend/antdv/es/vc-select/Select';
|
|
17
17
|
import { RenderDOMFunc, CustomTagProps, DropdownRender, DisplayValueType } from '@aplus-frontend/antdv/es/vc-select/BaseSelect';
|
|
@@ -221,7 +221,7 @@ export declare const apTableFormItemMap: {
|
|
|
221
221
|
offset: ValueType;
|
|
222
222
|
type: "up" | "down";
|
|
223
223
|
}) => void) | undefined;
|
|
224
|
-
readonly inputMode?: "
|
|
224
|
+
readonly inputMode?: InputNumberProps["mode"];
|
|
225
225
|
readonly emptyText?: string | undefined;
|
|
226
226
|
readonly thousands?: boolean | undefined;
|
|
227
227
|
readonly limitDecimalsRetain?: boolean | undefined;
|
|
@@ -1016,14 +1016,14 @@ export declare const apTableFormItemMap: {
|
|
|
1016
1016
|
readonly onPopupScroll?: ((e: UIEvent) => void) | undefined;
|
|
1017
1017
|
readonly onInputKeyDown?: ((e: KeyboardEvent) => void) | undefined;
|
|
1018
1018
|
readonly emptyText?: string | undefined;
|
|
1019
|
-
readonly request?: ((value?: string, extraParams?: Recordable) => Promise<
|
|
1019
|
+
readonly request?: ((value?: string, extraParams?: Recordable) => Promise< SelectProps["options"]>) | undefined;
|
|
1020
1020
|
readonly multiple?: boolean | undefined;
|
|
1021
|
-
readonly value?:
|
|
1021
|
+
readonly value?: SelectProps["value"];
|
|
1022
1022
|
readonly 'onUpdate:value'?: (((val: SelectValue) => void) & ((...args: any[]) => any)) | undefined;
|
|
1023
|
-
readonly searchMode?: "filter" | "request" | undefined;
|
|
1023
|
+
readonly searchMode?: ("filter" | "request") | undefined;
|
|
1024
1024
|
readonly refetchOnFocus?: boolean | undefined;
|
|
1025
1025
|
readonly lazy?: boolean | undefined;
|
|
1026
|
-
readonly addAll?: boolean | number | undefined;
|
|
1026
|
+
readonly addAll?: (boolean | number) | undefined;
|
|
1027
1027
|
readonly params?: Recordable | undefined;
|
|
1028
1028
|
readonly searchDelay?: number | undefined;
|
|
1029
1029
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
@@ -4,18 +4,18 @@ export declare const useTableColumnState: (columnSetting: ApTableSettingType, pe
|
|
|
4
4
|
columnState: Ref<{
|
|
5
5
|
key: string | number;
|
|
6
6
|
show?: boolean | undefined;
|
|
7
|
-
fixed?: "left" | "right" | undefined;
|
|
7
|
+
fixed?: ("left" | "right") | undefined;
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
label?: any;
|
|
10
|
-
children?:
|
|
10
|
+
children?: any[] | undefined;
|
|
11
11
|
order?: number | undefined;
|
|
12
12
|
}[], ApColumnState[] | {
|
|
13
13
|
key: string | number;
|
|
14
14
|
show?: boolean | undefined;
|
|
15
|
-
fixed?: "left" | "right" | undefined;
|
|
15
|
+
fixed?: ("left" | "right") | undefined;
|
|
16
16
|
disabled?: boolean | undefined;
|
|
17
17
|
label?: any;
|
|
18
|
-
children?:
|
|
18
|
+
children?: any[] | undefined;
|
|
19
19
|
order?: number | undefined;
|
|
20
20
|
}[]>;
|
|
21
21
|
selectAll: () => void;
|
|
@@ -3,8 +3,8 @@ import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/bu
|
|
|
3
3
|
import { ButtonHTMLType, ButtonIconPosition, ButtonVariantType } from '@aplus-frontend/antdv/es/button/buttonTypes';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
5
|
import { MouseEventHandler, FocusEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
6
|
+
import { ButtonProps, ItemType, MenuTheme, MenuMode, TableColumnsType } from '@aplus-frontend/antdv';
|
|
6
7
|
import { DropdownArrowOptions, Trigger, Align } from '@aplus-frontend/antdv/es/dropdown/props';
|
|
7
|
-
import { ItemType, MenuTheme, MenuMode, TableColumnsType, ButtonProps } from '@aplus-frontend/antdv';
|
|
8
8
|
import { Key } from '@aplus-frontend/antdv/es/_util/type';
|
|
9
9
|
import { CSSMotionProps } from '@aplus-frontend/antdv/es/_util/transition';
|
|
10
10
|
import { BuiltinPlacements, TriggerSubMenuAction, SelectEventHandler, MenuClickEventHandler, PopupRender } from '@aplus-frontend/antdv/es/menu/src/interface';
|
|
@@ -72,7 +72,7 @@ declare const ApBatchActionGroup: {
|
|
|
72
72
|
color: PropType<"default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue" | "danger" | "primary">;
|
|
73
73
|
variant: PropType<ButtonVariantType>;
|
|
74
74
|
}>>, "type" | "onClick"> & {
|
|
75
|
-
type?:
|
|
75
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
76
76
|
borderLinkColor?: string;
|
|
77
77
|
minWidth?: boolean | number | string;
|
|
78
78
|
lazy?: boolean | number;
|
|
@@ -394,7 +394,7 @@ declare const ApBatchActionGroup: {
|
|
|
394
394
|
color: PropType<"default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue" | "danger" | "primary">;
|
|
395
395
|
variant: PropType<ButtonVariantType>;
|
|
396
396
|
}>>, "type" | "onClick"> & {
|
|
397
|
-
type?:
|
|
397
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
398
398
|
borderLinkColor?: string;
|
|
399
399
|
minWidth?: boolean | number | string;
|
|
400
400
|
lazy?: boolean | number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApExpandAlertProps } from './interface';
|
|
2
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
3
3
|
declare const _default: <T extends Record<string, any>>(__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<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly onClose?: ((args_0: MouseEvent) => any) | undefined;
|
|
@@ -24,7 +24,9 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
24
24
|
}): any;
|
|
25
25
|
};
|
|
26
26
|
emit: ((evt: "close", args_0: MouseEvent) => void) & ((evt: "expand", args_0: "collapse" | "expand") => void) & ((evt: "choose", args_0: T) => void);
|
|
27
|
-
}>) => VNode
|
|
27
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}> & {
|
|
28
30
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
29
31
|
};
|
|
30
32
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApSelectItem } from './interface';
|
|
2
|
-
import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
|
|
2
|
+
import { PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement, Plugin } from 'vue';
|
|
3
3
|
export * from './interface';
|
|
4
4
|
declare const ApSelectLayout: (<T extends ApSelectItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
5
5
|
attrs: any;
|
|
@@ -38,7 +38,9 @@ declare const ApSelectLayout: (<T extends ApSelectItem>(__VLS_props: NonNullable
|
|
|
38
38
|
(event: "afterEnter", el: Element): void;
|
|
39
39
|
(event: "afterLeave", el: Element): void;
|
|
40
40
|
};
|
|
41
|
-
}>) => VNode
|
|
41
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}> & {
|
|
42
44
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
43
45
|
}) & ( Plugin & (new (...args: any[]) => {
|
|
44
46
|
$props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApSelectItem, ApSelectLayoutProps } from './interface';
|
|
2
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
3
3
|
declare const _default: <T extends ApSelectItem>(__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<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly onOnSelect?: ((value: T) => any) | undefined;
|
|
@@ -19,7 +19,9 @@ declare const _default: <T extends ApSelectItem>(__VLS_props: NonNullable<Awaite
|
|
|
19
19
|
(event: "afterEnter", el: Element): void;
|
|
20
20
|
(event: "afterLeave", el: Element): void;
|
|
21
21
|
};
|
|
22
|
-
}>) => VNode
|
|
22
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}> & {
|
|
23
25
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
24
26
|
};
|
|
25
27
|
export default _default;
|
|
@@ -4,9 +4,9 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
|
|
|
4
4
|
import { ApTableModalProps, OpenOptions, OpenReturnType } from './interface';
|
|
5
5
|
import { Recordable } from '../../type';
|
|
6
6
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
7
|
+
import { InternalPagingType } from '../../ap-table/hooks/use-table-paging-ng';
|
|
7
8
|
import { ApFormSearchFormPopoverSorterItem } from '../..';
|
|
8
9
|
import { MaskType } from '@aplus-frontend/antdv/es/_util/hooks/useMergedMask';
|
|
9
|
-
import { InternalPagingType } from '../../ap-table/hooks/use-table-paging-ng';
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
@@ -44,14 +44,8 @@ declare const ApTableModal: {
|
|
|
44
44
|
};
|
|
45
45
|
y: undefined;
|
|
46
46
|
};
|
|
47
|
-
getPaging: () =>
|
|
48
|
-
|
|
49
|
-
pageSize: number;
|
|
50
|
-
}>;
|
|
51
|
-
setPaging: (nextPaging: Partial<{
|
|
52
|
-
current: number;
|
|
53
|
-
pageSize: number;
|
|
54
|
-
}>, refreshImmediately?: boolean) => void;
|
|
47
|
+
getPaging: () => InternalPagingType;
|
|
48
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
55
49
|
getSearchFormSorterItems: () => ApFormSearchFormPopoverSorterItem[];
|
|
56
50
|
setSearchFormSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
57
51
|
resetSearchFormSorterItems: () => void;
|
|
@@ -156,14 +150,8 @@ declare const ApTableModal: {
|
|
|
156
150
|
};
|
|
157
151
|
y: undefined;
|
|
158
152
|
};
|
|
159
|
-
getPaging: () =>
|
|
160
|
-
|
|
161
|
-
pageSize: number;
|
|
162
|
-
}>;
|
|
163
|
-
setPaging: (nextPaging: Partial<{
|
|
164
|
-
current: number;
|
|
165
|
-
pageSize: number;
|
|
166
|
-
}>, refreshImmediately?: boolean) => void;
|
|
153
|
+
getPaging: () => InternalPagingType;
|
|
154
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
167
155
|
getSearchFormSorterItems: () => ApFormSearchFormPopoverSorterItem[];
|
|
168
156
|
setSearchFormSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
169
157
|
resetSearchFormSorterItems: () => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UploadFile } from '@aplus-frontend/antdv';
|
|
1
2
|
import { PropType, VNode, DefineComponent, ExtractPropTypes, ComputedRef, ComponentOptionsMixin, PublicProps, RendererNode, RendererElement, ComponentProvideOptions } from 'vue';
|
|
2
3
|
import { FileUploadType, BeforeUpload, CustomRequest, ApUploadSlots } from './apUploadTypes';
|
|
3
4
|
import { GetOssAccess } from './hooks/useOss';
|
|
@@ -93,6 +94,14 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
93
94
|
type: StringConstructor;
|
|
94
95
|
default: undefined;
|
|
95
96
|
};
|
|
97
|
+
showDownload: {
|
|
98
|
+
type: PropType<boolean | ((file: UploadFile) => boolean)>;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
showPreview: {
|
|
102
|
+
type: PropType<boolean | ((file: UploadFile) => boolean)>;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
96
105
|
}>, {
|
|
97
106
|
done: ComputedRef<boolean>;
|
|
98
107
|
clear: typeof clear;
|
|
@@ -180,6 +189,14 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
180
189
|
type: StringConstructor;
|
|
181
190
|
default: undefined;
|
|
182
191
|
};
|
|
192
|
+
showDownload: {
|
|
193
|
+
type: PropType<boolean | ((file: UploadFile) => boolean)>;
|
|
194
|
+
default: boolean;
|
|
195
|
+
};
|
|
196
|
+
showPreview: {
|
|
197
|
+
type: PropType<boolean | ((file: UploadFile) => boolean)>;
|
|
198
|
+
default: boolean;
|
|
199
|
+
};
|
|
183
200
|
}>> & Readonly<{
|
|
184
201
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
185
202
|
}>, {
|
|
@@ -205,6 +222,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
205
222
|
baseDirName: string;
|
|
206
223
|
maxCountErrorMsg: string;
|
|
207
224
|
showUploadErrorMsg: boolean;
|
|
225
|
+
showDownload: boolean | ((file: UploadFile) => boolean);
|
|
226
|
+
showPreview: boolean | ((file: UploadFile) => boolean);
|
|
208
227
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
209
228
|
uploadRef: unknown;
|
|
210
229
|
}, HTMLDivElement>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
1
|
+
import { defineComponent as E, ref as d, computed as m, provide as t, createElementBlock as M, openBlock as c, normalizeClass as _, unref as r, createBlock as U, resolveDynamicComponent as O, mergeProps as j, createSlots as R, renderList as k, withCtx as z, renderSlot as A, normalizeProps as B, guardReactiveProps as D } from "vue";
|
|
2
|
+
import { Form as P } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
4
|
import "./components/MultipleFile.vue.mjs";
|
|
5
5
|
import "./components/Picture.vue.mjs";
|
|
6
6
|
import "./components/SingleFile.vue.mjs";
|
|
7
|
-
import { injectLocaleToOss as
|
|
8
|
-
import
|
|
9
|
-
import { injectLocaleToAccept as
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useNamespace as
|
|
7
|
+
import { injectLocaleToOss as $ } from "./hooks/useOss.mjs";
|
|
8
|
+
import T from "./style/index.mjs";
|
|
9
|
+
import { injectLocaleToAccept as I } from "./utils/accept.mjs";
|
|
10
|
+
import { useLocale as L } from "../../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as q } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
12
|
import V from "./components/Picture.vue2.mjs";
|
|
13
13
|
import G from "./components/MultipleFile.vue2.mjs";
|
|
14
14
|
import H from "./components/SingleFile.vue2.mjs";
|
|
15
15
|
import { useGlobalConfig as J } from "../../config-provider/hooks/use-global-config.mjs";
|
|
16
|
-
const K = ["id"],
|
|
16
|
+
const K = ["id"], de = /* @__PURE__ */ E({
|
|
17
17
|
name: "AplusFileUpload",
|
|
18
18
|
__name: "apUpload",
|
|
19
19
|
props: {
|
|
@@ -96,55 +96,63 @@ const K = ["id"], me = /* @__PURE__ */ _({
|
|
|
96
96
|
bucket: {
|
|
97
97
|
type: String,
|
|
98
98
|
default: void 0
|
|
99
|
+
},
|
|
100
|
+
showDownload: {
|
|
101
|
+
type: [Boolean, Object],
|
|
102
|
+
default: !0
|
|
103
|
+
},
|
|
104
|
+
showPreview: {
|
|
105
|
+
type: [Boolean, Object],
|
|
106
|
+
default: !0
|
|
99
107
|
}
|
|
100
108
|
},
|
|
101
109
|
emits: ["update:value"],
|
|
102
110
|
setup(f, { expose: g, emit: v }) {
|
|
103
|
-
const { t: n, lang: y } =
|
|
104
|
-
|
|
105
|
-
const { b } =
|
|
111
|
+
const { t: n, lang: y } = L();
|
|
112
|
+
I(n), $(n, y);
|
|
113
|
+
const { b } = q("ap-upload"), C = T("ap-upload"), s = d(null), e = f, S = v, h = {
|
|
106
114
|
singleFile: H,
|
|
107
115
|
multipleFile: G,
|
|
108
116
|
picture: V
|
|
109
|
-
},
|
|
117
|
+
}, i = P.useInjectFormItemContext(), w = m({
|
|
110
118
|
get() {
|
|
111
119
|
return e.value;
|
|
112
120
|
},
|
|
113
121
|
set(o) {
|
|
114
|
-
S("update:value", o),
|
|
122
|
+
S("update:value", o), i?.onFieldChange(), e.onChange?.(o);
|
|
115
123
|
}
|
|
116
124
|
}), a = J("apUpload");
|
|
117
|
-
t("value",
|
|
125
|
+
t("value", w), t("dirName", e.dirName ?? a.value?.dirName), t(
|
|
118
126
|
"needName",
|
|
119
127
|
e.needName ?? a.value?.needName ?? !1
|
|
120
128
|
), t("accept", e.accept ?? a.value?.accept ?? ""), t("maxSize", e.maxSize), t("title", e.title), t("subTitle", e.subTitle), t("maxCount", e.maxCount), t("beforeUpload", e.beforeUpload), t("customRequest", e.customRequest), t("baseDirName", e.baseDirName ?? "Frontend-Upload"), t(
|
|
121
129
|
"getOssAccess",
|
|
122
130
|
e.getOssAccess ?? a.value?.getOssAccess
|
|
123
|
-
), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg), t("onRemove", e.onRemove), t("showUploadErrorMsg", e.showUploadErrorMsg), t("bucket", e.bucket);
|
|
124
|
-
const
|
|
131
|
+
), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg), t("onRemove", e.onRemove), t("showUploadErrorMsg", e.showUploadErrorMsg), t("bucket", e.bucket), t("showDownload", e.showDownload), t("showPreview", e.showPreview);
|
|
132
|
+
const x = m(() => l.value === 0), l = d(0);
|
|
125
133
|
t("uploadingCount", l);
|
|
126
|
-
function
|
|
134
|
+
function F() {
|
|
127
135
|
u(void 0);
|
|
128
136
|
}
|
|
129
137
|
function u(o) {
|
|
130
|
-
|
|
138
|
+
s?.value?.setValue?.(o);
|
|
131
139
|
}
|
|
132
140
|
return g({
|
|
133
|
-
done:
|
|
134
|
-
clear:
|
|
141
|
+
done: x,
|
|
142
|
+
clear: F,
|
|
135
143
|
setValue: u
|
|
136
|
-
}), (o, Q) => (c(),
|
|
137
|
-
id: r(
|
|
138
|
-
class:
|
|
144
|
+
}), (o, Q) => (c(), M("div", {
|
|
145
|
+
id: r(i)?.id.value,
|
|
146
|
+
class: _([r(b)(), r(C)])
|
|
139
147
|
}, [
|
|
140
|
-
(c(), O(
|
|
148
|
+
(c(), U(O(h[e.type]), j(o.$attrs, {
|
|
141
149
|
ref_key: "uploadRef",
|
|
142
|
-
ref:
|
|
143
|
-
}),
|
|
144
|
-
|
|
150
|
+
ref: s
|
|
151
|
+
}), R({ _: 2 }, [
|
|
152
|
+
k(Object.keys(o.$slots), (p) => ({
|
|
145
153
|
name: p,
|
|
146
|
-
fn:
|
|
147
|
-
|
|
154
|
+
fn: z((N) => [
|
|
155
|
+
A(o.$slots, p, B(D(N || {})))
|
|
148
156
|
])
|
|
149
157
|
}))
|
|
150
158
|
]), 1040))
|
|
@@ -152,5 +160,5 @@ const K = ["id"], me = /* @__PURE__ */ _({
|
|
|
152
160
|
}
|
|
153
161
|
});
|
|
154
162
|
export {
|
|
155
|
-
|
|
163
|
+
de as default
|
|
156
164
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UploadFile } from '@aplus-frontend/antdv';
|
|
1
2
|
import { ComputedRef, VNode } from 'vue';
|
|
2
3
|
export type FileUploadType = 'picture' | 'singleFile' | 'multipleFile';
|
|
3
4
|
/**
|
|
@@ -85,6 +86,14 @@ export type MultipleFileProps = FileUploadProps & {
|
|
|
85
86
|
* 限制上传数量
|
|
86
87
|
*/
|
|
87
88
|
maxCount?: number;
|
|
89
|
+
/**
|
|
90
|
+
* 是否开启下载
|
|
91
|
+
*/
|
|
92
|
+
showDownload?: boolean | ((file: UploadFile) => boolean);
|
|
93
|
+
/**
|
|
94
|
+
* 是否开启预览
|
|
95
|
+
*/
|
|
96
|
+
showPreview?: boolean | ((file: UploadFile) => boolean);
|
|
88
97
|
};
|
|
89
98
|
export type PictureProps = FileUploadProps & {
|
|
90
99
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UploadFile, UploadChangeParam } from '@aplus-frontend/antdv';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives } from 'vue';
|
|
3
|
-
import { UploadType, UploadFile, FileType, HttpRequestHeader, ShowUploadListInterface, UploadListType, UploadLocale, UploadListProgressProps, ItemRender } from '@aplus-frontend/antdv/es/upload/interface';
|
|
3
|
+
import { UploadType, UploadFile, FileType, HttpRequestHeader, ShowUploadListInterface, UploadChangeParam, UploadListType, UploadLocale, UploadListProgressProps, ItemRender } from '@aplus-frontend/antdv/es/upload/interface';
|
|
4
4
|
import { AcceptConfig, UploadRequestOption } from '@aplus-frontend/antdv/es/vc-upload/interface';
|
|
5
5
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
6
6
|
declare function setValue(val: (string | Record<string, any>)[]): void;
|