@aplus-frontend/ui 7.7.3 → 7.7.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/ap-action/group/index.vue.d.ts +1 -0
- package/es/src/ap-action/group/index.vue.mjs +28 -28
- package/es/src/ap-action/item-popconfirm/index.vue.d.ts +25 -1
- package/es/src/ap-button/ap-action-button.vue.d.ts +2 -1
- package/es/src/ap-button/ap-button.vue.d.ts +2 -1
- package/es/src/ap-field/checkbox/index.vue.mjs +18 -8
- package/es/src/ap-field/number/index.vue.d.ts +20 -0
- package/es/src/ap-field/number/index.vue.mjs +24 -23
- package/es/src/ap-field/number/read.vue2.mjs +3 -2
- package/es/src/ap-field/radio/index.vue.mjs +24 -24
- package/es/src/ap-field/rate/index.vue.mjs +10 -10
- package/es/src/ap-field/select/index.vue.d.ts +12 -4
- package/es/src/ap-field/select/index.vue.mjs +74 -71
- package/es/src/ap-field/slider/index.vue.d.ts +4 -2
- package/es/src/ap-field/slider/index.vue.mjs +12 -12
- package/es/src/ap-field/switch/index.vue.mjs +20 -20
- package/es/src/ap-field/text/index.vue2.mjs +23 -23
- package/es/src/ap-field/text/password.vue.mjs +9 -9
- package/es/src/ap-field/text-area/index.vue.mjs +24 -20
- package/es/src/ap-field/tree-select/index.vue.d.ts +2 -0
- package/es/src/ap-field/tree-select/index.vue.mjs +17 -17
- package/es/src/ap-form/ap-form.vue2.mjs +64 -64
- package/es/src/ap-form/drawer-form/index.vue.mjs +41 -41
- package/es/src/ap-form/item/index.vue.mjs +64 -64
- package/es/src/ap-form/items/number/index.vue.d.ts +22 -0
- package/es/src/ap-form/items/number/index.vue.mjs +10 -10
- package/es/src/ap-form/items/radio/index.vue.mjs +3 -3
- package/es/src/ap-form/items/select/index.vue.d.ts +18 -6
- package/es/src/ap-form/items/select/index.vue.mjs +5 -5
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/index.vue2.mjs +6 -6
- package/es/src/ap-form/items/text/password.vue.mjs +7 -7
- package/es/src/ap-form/items/text-area/index.vue.mjs +5 -5
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -0
- package/es/src/ap-form/items/tree-select/index.vue.mjs +7 -7
- package/es/src/ap-form/modal-form/index.vue.d.ts +25 -1
- package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +19 -1
- package/es/src/ap-form/search-form/index.vue.mjs +63 -63
- package/es/src/ap-form/style/item.mjs +8 -7
- package/es/src/ap-list/index.vue.mjs +6 -6
- package/es/src/ap-table/constants.d.ts +23 -4
- package/es/src/business/ap-batch-action-group/index.d.ts +34 -4
- package/es/src/business/ap-descriptions/ap-descriptions.vue.d.ts +3 -10
- package/es/src/business/ap-descriptions/ap-descriptions.vue.mjs +58 -79
- package/es/src/business/ap-descriptions/interface.d.ts +2 -3
- package/es/src/business/ap-upload/apUpload.vue.d.ts +9 -0
- package/es/src/business/ap-upload/apUpload.vue.mjs +33 -29
- package/es/src/business/ap-upload/apUploadTypes.d.ts +4 -0
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +50 -49
- package/es/src/business/ap-upload/components/Picture.vue2.mjs +66 -65
- package/es/src/business/ap-upload/components/SingleFile.vue2.mjs +95 -94
- package/es/src/business/ap-upload/hooks/useOss.d.ts +2 -1
- package/es/src/business/ap-upload/hooks/useOss.mjs +26 -24
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/es/src/editable-table/form-item.vue.mjs +64 -64
- package/es/src/editable-table/index.vue.mjs +66 -66
- package/es/src/scroll-bar/index.vue.d.ts +7 -7
- package/es/src/scroll-bar/index.vue.mjs +21 -21
- package/es/src/scroll-bar/internal.vue.d.ts +4 -4
- package/es/src/scroll-bar/internal.vue.mjs +20 -20
- package/es/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
- package/es/src/scroll-view/hooks/use-scroll-wrapper.mjs +13 -13
- package/es/src/scroll-view/index.vue.d.ts +25 -25
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-action/group/index.vue.d.ts +1 -0
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +25 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +2 -1
- package/lib/src/ap-button/ap-button.vue.d.ts +2 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +20 -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/rate/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +12 -4
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +4 -2
- 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/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.d.ts +2 -0
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +22 -0
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +18 -6
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -0
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +25 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +19 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +23 -4
- package/lib/src/business/ap-batch-action-group/index.d.ts +34 -4
- package/lib/src/business/ap-descriptions/ap-descriptions.vue.d.ts +3 -10
- package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/business/ap-descriptions/interface.d.ts +2 -3
- package/lib/src/business/ap-upload/apUpload.vue.d.ts +9 -0
- package/lib/src/business/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/business/ap-upload/apUploadTypes.d.ts +4 -0
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/business/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/hooks/useOss.d.ts +2 -1
- package/lib/src/business/ap-upload/hooks/useOss.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/scroll-bar/index.vue.d.ts +7 -7
- package/lib/src/scroll-bar/index.vue.js +1 -1
- package/lib/src/scroll-bar/internal.vue.d.ts +4 -4
- package/lib/src/scroll-bar/internal.vue.js +1 -1
- package/lib/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
- package/lib/src/scroll-view/hooks/use-scroll-wrapper.js +1 -1
- package/lib/src/scroll-view/index.vue.d.ts +25 -25
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNodeChild, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
1
|
+
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNode, VNodeChild, RendererNode, RendererElement, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
2
2
|
import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
3
3
|
import { ButtonHTMLType, ButtonIconPosition, ButtonVariantType } from '@aplus-frontend/antdv/es/button/buttonTypes';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
@@ -31,9 +31,11 @@ declare const ApBatchActionGroup: {
|
|
|
31
31
|
loading: {
|
|
32
32
|
type: PropType<boolean | {
|
|
33
33
|
delay?: number;
|
|
34
|
+
icon?: VNode;
|
|
34
35
|
}>;
|
|
35
36
|
default: () => boolean | {
|
|
36
37
|
delay?: number;
|
|
38
|
+
icon?: VNode;
|
|
37
39
|
};
|
|
38
40
|
};
|
|
39
41
|
disabled: {
|
|
@@ -97,9 +99,15 @@ declare const ApBatchActionGroup: {
|
|
|
97
99
|
loading: {
|
|
98
100
|
type: PropType<boolean | {
|
|
99
101
|
delay?: number;
|
|
102
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
}>;
|
|
100
105
|
}>;
|
|
101
106
|
default: () => boolean | {
|
|
102
107
|
delay?: number;
|
|
108
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
109
|
+
[key: string]: any;
|
|
110
|
+
}>;
|
|
103
111
|
};
|
|
104
112
|
};
|
|
105
113
|
onClick: {
|
|
@@ -301,7 +309,9 @@ declare const ApBatchActionGroup: {
|
|
|
301
309
|
type: PropType<(val: boolean) => void>;
|
|
302
310
|
};
|
|
303
311
|
onOpenChange: {
|
|
304
|
-
type: PropType<(val: boolean
|
|
312
|
+
type: PropType<(val: boolean, info: {
|
|
313
|
+
source: "trigger" | "menu";
|
|
314
|
+
}) => void>;
|
|
305
315
|
};
|
|
306
316
|
'onUpdate:open': {
|
|
307
317
|
type: PropType<(val: boolean) => void>;
|
|
@@ -341,9 +351,11 @@ declare const ApBatchActionGroup: {
|
|
|
341
351
|
loading: {
|
|
342
352
|
type: PropType<boolean | {
|
|
343
353
|
delay?: number;
|
|
354
|
+
icon?: VNode;
|
|
344
355
|
}>;
|
|
345
356
|
default: () => boolean | {
|
|
346
357
|
delay?: number;
|
|
358
|
+
icon?: VNode;
|
|
347
359
|
};
|
|
348
360
|
};
|
|
349
361
|
disabled: {
|
|
@@ -407,9 +419,15 @@ declare const ApBatchActionGroup: {
|
|
|
407
419
|
loading: {
|
|
408
420
|
type: PropType<boolean | {
|
|
409
421
|
delay?: number;
|
|
422
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
423
|
+
[key: string]: any;
|
|
424
|
+
}>;
|
|
410
425
|
}>;
|
|
411
426
|
default: () => boolean | {
|
|
412
427
|
delay?: number;
|
|
428
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
429
|
+
[key: string]: any;
|
|
430
|
+
}>;
|
|
413
431
|
};
|
|
414
432
|
};
|
|
415
433
|
onClick: {
|
|
@@ -611,7 +629,9 @@ declare const ApBatchActionGroup: {
|
|
|
611
629
|
type: PropType<(val: boolean) => void>;
|
|
612
630
|
};
|
|
613
631
|
onOpenChange: {
|
|
614
|
-
type: PropType<(val: boolean
|
|
632
|
+
type: PropType<(val: boolean, info: {
|
|
633
|
+
source: "trigger" | "menu";
|
|
634
|
+
}) => void>;
|
|
615
635
|
};
|
|
616
636
|
'onUpdate:open': {
|
|
617
637
|
type: PropType<(val: boolean) => void>;
|
|
@@ -648,9 +668,11 @@ declare const ApBatchActionGroup: {
|
|
|
648
668
|
loading: {
|
|
649
669
|
type: PropType<boolean | {
|
|
650
670
|
delay?: number;
|
|
671
|
+
icon?: VNode;
|
|
651
672
|
}>;
|
|
652
673
|
default: () => boolean | {
|
|
653
674
|
delay?: number;
|
|
675
|
+
icon?: VNode;
|
|
654
676
|
};
|
|
655
677
|
};
|
|
656
678
|
disabled: {
|
|
@@ -714,9 +736,15 @@ declare const ApBatchActionGroup: {
|
|
|
714
736
|
loading: {
|
|
715
737
|
type: PropType<boolean | {
|
|
716
738
|
delay?: number;
|
|
739
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
740
|
+
[key: string]: any;
|
|
741
|
+
}>;
|
|
717
742
|
}>;
|
|
718
743
|
default: () => boolean | {
|
|
719
744
|
delay?: number;
|
|
745
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
746
|
+
[key: string]: any;
|
|
747
|
+
}>;
|
|
720
748
|
};
|
|
721
749
|
};
|
|
722
750
|
onClick: {
|
|
@@ -918,7 +946,9 @@ declare const ApBatchActionGroup: {
|
|
|
918
946
|
type: PropType<(val: boolean) => void>;
|
|
919
947
|
};
|
|
920
948
|
onOpenChange: {
|
|
921
|
-
type: PropType<(val: boolean
|
|
949
|
+
type: PropType<(val: boolean, info: {
|
|
950
|
+
source: "trigger" | "menu";
|
|
951
|
+
}) => void>;
|
|
922
952
|
};
|
|
923
953
|
'onUpdate:open': {
|
|
924
954
|
type: PropType<(val: boolean) => void>;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import { DisplayInfoProps } from './interface';
|
|
2
|
-
import {
|
|
2
|
+
import { Recordable } from '../../type';
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
4
|
declare function __VLS_template(): {
|
|
4
5
|
attrs: Partial<{}>;
|
|
5
|
-
slots:
|
|
6
|
-
index: number;
|
|
7
|
-
item: VNode<RendererNode, RendererElement, {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}> | VNodeChild;
|
|
10
|
-
record: {
|
|
11
|
-
[x: string]: any;
|
|
12
|
-
} | undefined;
|
|
13
|
-
}) => any>>;
|
|
6
|
+
slots: Readonly<Recordable> & Recordable;
|
|
14
7
|
refs: {};
|
|
15
8
|
rootEl: HTMLDivElement;
|
|
16
9
|
};
|
|
@@ -1,108 +1,87 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Descriptions as
|
|
3
|
-
import { mixinsAttachmentExtraProps as
|
|
4
|
-
import { get as
|
|
1
|
+
import { defineComponent as T, useSlots as D, createVNode as l, createTextVNode as V, Fragment as p, h as a, createElementBlock as E, openBlock as k, normalizeStyle as A, normalizeClass as B, unref as n, mergeProps as j } from "vue";
|
|
2
|
+
import { Descriptions as w } from "@aplus-frontend/antdv";
|
|
3
|
+
import { mixinsAttachmentExtraProps as z, transformValue as F, isEmptyWithType as G } from "./helper.mjs";
|
|
4
|
+
import { get as u } from "lodash-unified";
|
|
5
5
|
import "./help-message/index.vue.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import
|
|
8
|
-
import { useGlobalConfig as
|
|
7
|
+
import I from "./style/index.mjs";
|
|
8
|
+
import { useGlobalConfig as f } from "../../config-provider/hooks/use-global-config.mjs";
|
|
9
9
|
import { useNamespace as M } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import R from "./help-message/index.vue2.mjs";
|
|
11
|
-
const
|
|
11
|
+
const X = /* @__PURE__ */ T({
|
|
12
12
|
name: "ApDescriptions",
|
|
13
13
|
__name: "ap-descriptions",
|
|
14
14
|
props: {
|
|
15
15
|
descriptionsProps: {},
|
|
16
16
|
schemas: {},
|
|
17
17
|
dataSource: {},
|
|
18
|
-
style: {
|
|
18
|
+
style: {
|
|
19
|
+
type: [Boolean, null, String, Object, Array]
|
|
20
|
+
},
|
|
19
21
|
className: {}
|
|
20
22
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
setup(c) {
|
|
24
|
+
const o = c, d = f("apDescriptions"), y = f("downloadCenterTriggerConfig"), {
|
|
25
|
+
b: m,
|
|
26
|
+
be: b
|
|
27
|
+
} = M("ap-descriptions"), g = I("ap-descriptions"), S = D(), v = (e = {}) => {
|
|
28
|
+
let r = "";
|
|
29
|
+
return o.descriptionsProps?.layout === "vertical" && (r = "start"), {
|
|
30
|
+
justifyContent: r,
|
|
26
31
|
...e
|
|
27
32
|
};
|
|
28
|
-
},
|
|
29
|
-
const
|
|
33
|
+
}, s = (e) => {
|
|
34
|
+
const r = u(o.dataSource, e.field);
|
|
30
35
|
if (e.customRender)
|
|
31
|
-
return e.customRender(
|
|
32
|
-
e.valueType === "attachment" && (e.extraProps =
|
|
33
|
-
fromConfig:
|
|
34
|
-
fromGlobal:
|
|
36
|
+
return e.customRender(o.dataSource);
|
|
37
|
+
e.valueType === "attachment" && (e.extraProps = z(e.extraProps, {
|
|
38
|
+
fromConfig: d.value?.downloadFile,
|
|
39
|
+
fromGlobal: y.value?.trigger
|
|
35
40
|
}));
|
|
36
|
-
const t = e.format ? e.format(
|
|
37
|
-
return
|
|
38
|
-
|
|
41
|
+
const t = e.format ? e.format(r, o.dataSource || {}) : r;
|
|
42
|
+
return F({
|
|
43
|
+
value: t,
|
|
44
|
+
record: o.dataSource
|
|
45
|
+
}, e);
|
|
46
|
+
}, C = (e) => e.valueType === "text" && !!e.extraProps?.ellipsis, P = (e, r) => {
|
|
39
47
|
if (e.visible != null) {
|
|
40
48
|
if (typeof e.visible == "boolean")
|
|
41
49
|
return e.visible;
|
|
42
50
|
if (typeof e.visible == "function")
|
|
43
51
|
return e.visible({
|
|
44
|
-
record:
|
|
52
|
+
record: r || {},
|
|
45
53
|
schema: e
|
|
46
54
|
});
|
|
47
55
|
}
|
|
48
56
|
return !0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
]) : null,
|
|
76
|
-
span: t.span,
|
|
77
|
-
"content-style": t.contentStyle,
|
|
78
|
-
"label-style": t.labelStyle
|
|
79
|
-
}, {
|
|
80
|
-
default: f(() => [
|
|
81
|
-
r(I)(r(b)(e.dataSource, t.field), t) ? (o(), n("span", $, "--")) : (o(), n(a, { key: 1 }, [
|
|
82
|
-
t.contentSlotName ? A(e.$slots, t.contentSlotName, {
|
|
83
|
-
key: 0,
|
|
84
|
-
index: u,
|
|
85
|
-
item: c(t),
|
|
86
|
-
record: e.dataSource
|
|
87
|
-
}) : (o(), i(j(
|
|
88
|
-
p(a, [
|
|
89
|
-
t.prefix,
|
|
90
|
-
c(t),
|
|
91
|
-
t.suffix
|
|
92
|
-
])
|
|
93
|
-
), { key: 1 }))
|
|
94
|
-
], 64))
|
|
95
|
-
]),
|
|
96
|
-
_: 2
|
|
97
|
-
}, 1032, ["class", "label", "span", "content-style", "label-style"]))
|
|
98
|
-
], 64)) : w("", !0)
|
|
99
|
-
], 64))), 128))
|
|
100
|
-
]),
|
|
101
|
-
_: 3
|
|
102
|
-
}, 16, ["label-style"])
|
|
103
|
-
], 6));
|
|
57
|
+
}, N = (e, r, t) => e.valueType === "empty" ? null : G(u(t, e.field), e) ? l("span", null, [V("--")]) : e.contentSlotName ? S?.[e.contentSlotName]?.({
|
|
58
|
+
index: r,
|
|
59
|
+
record: t,
|
|
60
|
+
item: s(e)
|
|
61
|
+
}) : l(p, null, [e.prefix, s(e), e.suffix]), x = (e = [], r) => e.filter((t) => P(t, r)).map((t, i) => ({
|
|
62
|
+
label: t.label ? a(p, [a(R, {
|
|
63
|
+
helpMessage: t.helpMessage,
|
|
64
|
+
label: t.label
|
|
65
|
+
})]) : null,
|
|
66
|
+
span: t.span,
|
|
67
|
+
style: t.style,
|
|
68
|
+
contentStyle: t.contentStyle,
|
|
69
|
+
labelStyle: t.labelStyle,
|
|
70
|
+
key: t.field?.toString() || "empty" + i,
|
|
71
|
+
class: C(t) ? b("item", "ellipsis") : "",
|
|
72
|
+
children: N(t, i, r)
|
|
73
|
+
}));
|
|
74
|
+
return (e, r) => (k(), E("div", {
|
|
75
|
+
class: B([e.className, n(m)(), n(g)]),
|
|
76
|
+
style: A(e.style)
|
|
77
|
+
}, [l(n(w), j(e.descriptionsProps, {
|
|
78
|
+
"label-style": v({
|
|
79
|
+
...e.descriptionsProps?.labelStyle || {}
|
|
80
|
+
}),
|
|
81
|
+
items: x(e.schemas, e.dataSource)
|
|
82
|
+
}), null, 16, ["label-style", "items"])], 6));
|
|
104
83
|
}
|
|
105
84
|
});
|
|
106
85
|
export {
|
|
107
|
-
|
|
86
|
+
X as default
|
|
108
87
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DescriptionsProps } from '@aplus-frontend/antdv';
|
|
1
|
+
import { DescriptionItemType, DescriptionsProps } from '@aplus-frontend/antdv';
|
|
2
2
|
import { CSSProperties, StyleValue, VNode, VNodeChild } from 'vue';
|
|
3
3
|
import { formatterMap } from './formatter';
|
|
4
4
|
/** 字段路径 */
|
|
@@ -19,10 +19,9 @@ type AllKeys<T, P extends string = '', Level extends unknown[] = []> = Level['le
|
|
|
19
19
|
]> : never);
|
|
20
20
|
}[keyof T] : never;
|
|
21
21
|
/** 基本描述类型 */
|
|
22
|
-
export interface ItemSchema<T extends Recordable = Recordable> {
|
|
22
|
+
export interface ItemSchema<T extends Recordable = Recordable> extends Omit<DescriptionItemType, 'children'> {
|
|
23
23
|
label: VNodeChild | VNode;
|
|
24
24
|
field: Extract<AllKeys<T>, string> | (string & {}) | string[];
|
|
25
|
-
span?: number;
|
|
26
25
|
prefix?: VNodeChild | VNode;
|
|
27
26
|
suffix?: VNodeChild | VNode;
|
|
28
27
|
contentStyle?: CSSProperties;
|
|
@@ -85,6 +85,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
85
85
|
type: BooleanConstructor;
|
|
86
86
|
default: boolean;
|
|
87
87
|
};
|
|
88
|
+
baseDirName: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
88
92
|
}>, {
|
|
89
93
|
done: ComputedRef<boolean>;
|
|
90
94
|
clear: typeof clear;
|
|
@@ -164,6 +168,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
164
168
|
type: BooleanConstructor;
|
|
165
169
|
default: boolean;
|
|
166
170
|
};
|
|
171
|
+
baseDirName: {
|
|
172
|
+
type: StringConstructor;
|
|
173
|
+
default: string;
|
|
174
|
+
};
|
|
167
175
|
}>> & Readonly<{
|
|
168
176
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
169
177
|
}>, {
|
|
@@ -185,6 +193,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
185
193
|
subTitle: string | VNode< RendererNode, RendererElement, {
|
|
186
194
|
[key: string]: any;
|
|
187
195
|
}>;
|
|
196
|
+
baseDirName: string;
|
|
188
197
|
showUploadErrorMsg: boolean;
|
|
189
198
|
maxCountErrorMsg: string;
|
|
190
199
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, ref as m, computed as d, provide as t, createElementBlock as U, openBlock as c, normalizeClass as h, unref as r, createBlock as O, resolveDynamicComponent as R, mergeProps as z, createSlots as j, renderList as A, withCtx as $, renderSlot as k, normalizeProps as B, guardReactiveProps as T } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
3
|
import "./components/SingleFile.vue.mjs";
|
|
4
4
|
import "./components/MultipleFile.vue.mjs";
|
|
5
5
|
import "./components/Picture.vue.mjs";
|
|
6
6
|
import { injectLocaleToAccept as w } from "./utils/accept.mjs";
|
|
7
|
-
import { injectLocaleToOss as
|
|
8
|
-
import { Form as
|
|
9
|
-
import
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
import
|
|
7
|
+
import { injectLocaleToOss as D } from "./hooks/useOss.mjs";
|
|
8
|
+
import { Form as I } from "@aplus-frontend/antdv";
|
|
9
|
+
import L from "./style/index.mjs";
|
|
10
|
+
import { useLocale as q } from "../../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as P } from "../../config-provider/hooks/use-namespace.mjs";
|
|
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"], me = /* @__PURE__ */
|
|
16
|
+
const K = ["id"], me = /* @__PURE__ */ _({
|
|
17
17
|
name: "AplusFileUpload",
|
|
18
18
|
__name: "apUpload",
|
|
19
19
|
props: {
|
|
@@ -88,55 +88,59 @@ const K = ["id"], me = /* @__PURE__ */ h({
|
|
|
88
88
|
showUploadErrorMsg: {
|
|
89
89
|
type: Boolean,
|
|
90
90
|
default: !0
|
|
91
|
+
},
|
|
92
|
+
baseDirName: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: "Frontend-Upload"
|
|
91
95
|
}
|
|
92
96
|
},
|
|
93
97
|
emits: ["update:value"],
|
|
94
98
|
setup(f, { expose: g, emit: v }) {
|
|
95
|
-
const { t: n, lang: y } =
|
|
96
|
-
w(n),
|
|
97
|
-
const { b: C } =
|
|
99
|
+
const { t: n, lang: y } = q();
|
|
100
|
+
w(n), D(n, y);
|
|
101
|
+
const { b: C } = P("ap-upload"), S = L("ap-upload"), s = m(null), e = f, b = v, x = {
|
|
98
102
|
singleFile: H,
|
|
99
103
|
multipleFile: G,
|
|
100
|
-
picture:
|
|
101
|
-
}, i =
|
|
104
|
+
picture: V
|
|
105
|
+
}, i = I.useInjectFormItemContext(), F = d({
|
|
102
106
|
get() {
|
|
103
107
|
return e.value;
|
|
104
108
|
},
|
|
105
109
|
set(o) {
|
|
106
|
-
|
|
110
|
+
b("update:value", o), i?.onFieldChange(), e.onChange?.(o);
|
|
107
111
|
}
|
|
108
|
-
}),
|
|
109
|
-
t("value",
|
|
112
|
+
}), a = J("apUpload");
|
|
113
|
+
t("value", F), t("dirName", e.dirName ?? a.value?.dirName), t(
|
|
110
114
|
"needName",
|
|
111
|
-
e.needName ??
|
|
112
|
-
), t("accept", e.accept ??
|
|
115
|
+
e.needName ?? a.value?.needName ?? !1
|
|
116
|
+
), 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(
|
|
113
117
|
"getOssAccess",
|
|
114
|
-
e.getOssAccess ??
|
|
118
|
+
e.getOssAccess ?? a.value?.getOssAccess
|
|
115
119
|
), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg), t("onRemove", e.onRemove), t("showUploadErrorMsg", e.showUploadErrorMsg);
|
|
116
|
-
const
|
|
120
|
+
const N = d(() => l.value === 0), l = m(0);
|
|
117
121
|
t("uploadingCount", l);
|
|
118
|
-
function
|
|
122
|
+
function E() {
|
|
119
123
|
p(void 0);
|
|
120
124
|
}
|
|
121
125
|
function p(o) {
|
|
122
126
|
s?.value?.setValue?.(o);
|
|
123
127
|
}
|
|
124
128
|
return g({
|
|
125
|
-
done:
|
|
126
|
-
clear:
|
|
129
|
+
done: N,
|
|
130
|
+
clear: E,
|
|
127
131
|
setValue: p
|
|
128
|
-
}), (o, Q) => (
|
|
129
|
-
id:
|
|
130
|
-
class:
|
|
132
|
+
}), (o, Q) => (c(), U("div", {
|
|
133
|
+
id: r(i)?.id.value,
|
|
134
|
+
class: h([r(C)(), r(S)])
|
|
131
135
|
}, [
|
|
132
|
-
(
|
|
136
|
+
(c(), O(R(x[e.type]), z(o.$attrs, {
|
|
133
137
|
ref_key: "uploadRef",
|
|
134
138
|
ref: s
|
|
135
139
|
}), j({ _: 2 }, [
|
|
136
140
|
A(Object.keys(o.$slots), (u) => ({
|
|
137
141
|
name: u,
|
|
138
|
-
fn: $((
|
|
139
|
-
k(o.$slots, u, B(T(
|
|
142
|
+
fn: $((M) => [
|
|
143
|
+
k(o.$slots, u, B(T(M || {})))
|
|
140
144
|
])
|
|
141
145
|
}))
|
|
142
146
|
]), 1040))
|