@aplus-frontend/ui 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-action/item/index.vue2.mjs +11 -11
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +24 -24
- package/es/src/ap-drawer/utils/createDrawer.mjs +10 -10
- package/es/src/ap-field/checkbox/index.vue.mjs +3 -3
- package/es/src/ap-field/date/index.vue.mjs +2 -2
- package/es/src/ap-field/date-range/index.vue.mjs +2 -2
- package/es/src/ap-field/number/index.vue.mjs +3 -3
- package/es/src/ap-field/radio/index.vue.mjs +5 -5
- package/es/src/ap-field/rate/index.vue.mjs +4 -4
- package/es/src/ap-field/segmented/index.vue.mjs +3 -3
- package/es/src/ap-field/select/index.vue.mjs +4 -4
- package/es/src/ap-field/slider/index.vue.mjs +3 -3
- package/es/src/ap-field/switch/index.vue.mjs +4 -4
- package/es/src/ap-field/text-area/index.vue.mjs +3 -3
- package/es/src/ap-form/ap-form.vue.d.ts +5 -6
- package/es/src/ap-form/ap-form.vue2.mjs +5 -5
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -4
- package/es/src/ap-form/drawer-form/index.vue.mjs +2 -2
- package/es/src/ap-form/interface.d.ts +12 -3
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -4
- package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
- package/es/src/ap-form/search-form/index.vue.d.ts +5 -5
- package/es/src/ap-form/search-form/index.vue.mjs +2 -2
- package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +6 -6
- package/es/src/ap-list/index.vue.mjs +27 -27
- package/es/src/ap-modal/utils/createModal.mjs +10 -10
- package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +3 -3
- package/es/src/ap-table/ap-table.vue2.mjs +3 -3
- package/es/src/ap-table/components/index/index.vue2.mjs +3 -3
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +4 -4
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +2 -2
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +3 -3
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +8 -8
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +6 -6
- package/es/src/ap-table/components/status/index.vue2.mjs +4 -4
- package/es/src/ap-table/hooks/use-table-content-height.mjs +13 -11
- package/es/src/ap-tag/ap-tag-group.vue.mjs +1 -1
- package/es/src/ap-upload/apUpload.vue.d.ts +57 -8
- package/es/src/ap-upload/apUpload.vue.mjs +56 -37
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +10 -10
- package/es/src/ap-upload/components/Picture.vue2.mjs +26 -26
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +27 -27
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +49 -49
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +10 -10
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +5 -5
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +11 -11
- package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
- package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +26 -26
- package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +15 -15
- package/es/src/business/ap-group-search/index.d.ts +1 -1
- package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -15
- package/es/src/business/ap-image/ApImage.vue2.mjs +28 -28
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -9
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +74 -70
- package/es/src/business/ap-upload-file/hook/useProps.mjs +8 -8
- package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +1 -1
- package/es/src/business/ap-upload-file/interface.d.ts +2 -0
- package/es/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
- package/es/src/business/ap-upload-file/utils/fileList.mjs +12 -12
- package/es/src/business/ap-upload-file/utils/upload.d.ts +3 -0
- package/es/src/business/ap-upload-file/utils/upload.mjs +23 -23
- package/es/src/business/batch-input-group/index.vue.mjs +5 -5
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +15 -15
- package/es/src/editable-table/form-item.vue.mjs +3 -3
- package/es/src/editable-table/index.vue.mjs +6 -6
- package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.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/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.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/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +5 -6
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -4
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +12 -3
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -4
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +5 -5
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/index/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
- package/lib/src/ap-table/components/status/index.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +57 -8
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
- package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
- package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
- package/lib/src/business/ap-group-search/index.d.ts +1 -1
- package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
- package/lib/src/business/ap-upload-file/hook/useProps.js +1 -1
- package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
- package/lib/src/business/ap-upload-file/interface.d.ts +2 -0
- package/lib/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
- package/lib/src/business/ap-upload-file/utils/fileList.js +1 -1
- package/lib/src/business/ap-upload-file/utils/upload.d.ts +3 -0
- package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +1 -1
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +2 -2
|
@@ -15,6 +15,7 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
15
15
|
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
16
16
|
dirName: {
|
|
17
17
|
type: StringConstructor;
|
|
18
|
+
default: undefined;
|
|
18
19
|
};
|
|
19
20
|
type: {
|
|
20
21
|
type: PropType<FileUploadType>;
|
|
@@ -30,9 +31,11 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
30
31
|
};
|
|
31
32
|
accept: {
|
|
32
33
|
type: StringConstructor;
|
|
34
|
+
default: undefined;
|
|
33
35
|
};
|
|
34
36
|
maxSize: {
|
|
35
37
|
type: NumberConstructor;
|
|
38
|
+
default: undefined;
|
|
36
39
|
};
|
|
37
40
|
title: {
|
|
38
41
|
type: StringConstructor;
|
|
@@ -44,20 +47,36 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
44
47
|
};
|
|
45
48
|
maxCount: {
|
|
46
49
|
type: NumberConstructor;
|
|
50
|
+
default: undefined;
|
|
47
51
|
};
|
|
48
52
|
beforeUpload: {
|
|
49
53
|
type: PropType<BeforeUpload>;
|
|
54
|
+
default: undefined;
|
|
50
55
|
};
|
|
51
56
|
customRequest: {
|
|
52
57
|
type: PropType<CustomRequest>;
|
|
58
|
+
default: undefined;
|
|
53
59
|
};
|
|
54
60
|
getOssAccess: {
|
|
55
61
|
type: PropType<GetOssAccess>;
|
|
62
|
+
default: undefined;
|
|
63
|
+
};
|
|
64
|
+
onChange: {
|
|
65
|
+
type: FunctionConstructor;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
maxSizeErrorMsg: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: undefined;
|
|
71
|
+
};
|
|
72
|
+
maxCountErrorMsg: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: undefined;
|
|
75
|
+
};
|
|
76
|
+
acceptErrorMsg: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
default: undefined;
|
|
56
79
|
};
|
|
57
|
-
onChange: FunctionConstructor;
|
|
58
|
-
maxSizeErrorMsg: StringConstructor;
|
|
59
|
-
maxCountErrorMsg: StringConstructor;
|
|
60
|
-
acceptErrorMsg: StringConstructor;
|
|
61
80
|
}>, {
|
|
62
81
|
done: ComputedRef<boolean>;
|
|
63
82
|
clear: typeof clear;
|
|
@@ -67,6 +86,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
67
86
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
68
87
|
dirName: {
|
|
69
88
|
type: StringConstructor;
|
|
89
|
+
default: undefined;
|
|
70
90
|
};
|
|
71
91
|
type: {
|
|
72
92
|
type: PropType<FileUploadType>;
|
|
@@ -82,9 +102,11 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
82
102
|
};
|
|
83
103
|
accept: {
|
|
84
104
|
type: StringConstructor;
|
|
105
|
+
default: undefined;
|
|
85
106
|
};
|
|
86
107
|
maxSize: {
|
|
87
108
|
type: NumberConstructor;
|
|
109
|
+
default: undefined;
|
|
88
110
|
};
|
|
89
111
|
title: {
|
|
90
112
|
type: StringConstructor;
|
|
@@ -96,30 +118,57 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
96
118
|
};
|
|
97
119
|
maxCount: {
|
|
98
120
|
type: NumberConstructor;
|
|
121
|
+
default: undefined;
|
|
99
122
|
};
|
|
100
123
|
beforeUpload: {
|
|
101
124
|
type: PropType<BeforeUpload>;
|
|
125
|
+
default: undefined;
|
|
102
126
|
};
|
|
103
127
|
customRequest: {
|
|
104
128
|
type: PropType<CustomRequest>;
|
|
129
|
+
default: undefined;
|
|
105
130
|
};
|
|
106
131
|
getOssAccess: {
|
|
107
132
|
type: PropType<GetOssAccess>;
|
|
133
|
+
default: undefined;
|
|
134
|
+
};
|
|
135
|
+
onChange: {
|
|
136
|
+
type: FunctionConstructor;
|
|
137
|
+
default: undefined;
|
|
138
|
+
};
|
|
139
|
+
maxSizeErrorMsg: {
|
|
140
|
+
type: StringConstructor;
|
|
141
|
+
default: undefined;
|
|
142
|
+
};
|
|
143
|
+
maxCountErrorMsg: {
|
|
144
|
+
type: StringConstructor;
|
|
145
|
+
default: undefined;
|
|
146
|
+
};
|
|
147
|
+
acceptErrorMsg: {
|
|
148
|
+
type: StringConstructor;
|
|
149
|
+
default: undefined;
|
|
108
150
|
};
|
|
109
|
-
onChange: FunctionConstructor;
|
|
110
|
-
maxSizeErrorMsg: StringConstructor;
|
|
111
|
-
maxCountErrorMsg: StringConstructor;
|
|
112
|
-
acceptErrorMsg: StringConstructor;
|
|
113
151
|
}>> & Readonly<{
|
|
114
152
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
115
153
|
}>, {
|
|
116
154
|
type: FileUploadType;
|
|
117
155
|
title: string;
|
|
156
|
+
onChange: Function;
|
|
118
157
|
value: string | unknown[] | Record<string, any>;
|
|
158
|
+
getOssAccess: GetOssAccess;
|
|
159
|
+
dirName: string;
|
|
119
160
|
needName: boolean | Record<string, any>;
|
|
161
|
+
accept: string;
|
|
162
|
+
maxSize: number;
|
|
120
163
|
subTitle: string | VNode< RendererNode, RendererElement, {
|
|
121
164
|
[key: string]: any;
|
|
122
165
|
}>;
|
|
166
|
+
beforeUpload: BeforeUpload;
|
|
167
|
+
customRequest: CustomRequest;
|
|
168
|
+
maxSizeErrorMsg: string;
|
|
169
|
+
acceptErrorMsg: string;
|
|
170
|
+
maxCount: number;
|
|
171
|
+
maxCountErrorMsg: string;
|
|
123
172
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
124
173
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
125
174
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as A, ref as
|
|
1
|
+
import { defineComponent as A, ref as g, computed as v, provide as t, openBlock as y, createElementBlock as U, normalizeClass as $, unref as k, createBlock as T, resolveDynamicComponent as B, mergeProps as L, createSlots as R, renderList as q, withCtx as P, renderSlot as V, normalizeProps as w, guardReactiveProps as D } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import "./components/SingleFile.vue.mjs";
|
|
4
4
|
import "./components/MultipleFile.vue.mjs";
|
|
@@ -12,12 +12,13 @@ import Q from "./components/SingleFile.vue2.mjs";
|
|
|
12
12
|
import W from "./components/MultipleFile.vue2.mjs";
|
|
13
13
|
import X from "./components/Picture.vue2.mjs";
|
|
14
14
|
import { useGlobalConfig as C } from "../config-provider/hooks/use-global-config.mjs";
|
|
15
|
-
const
|
|
15
|
+
const me = /* @__PURE__ */ A({
|
|
16
16
|
name: "AplusFileUpload",
|
|
17
17
|
__name: "apUpload",
|
|
18
18
|
props: {
|
|
19
19
|
dirName: {
|
|
20
|
-
type: String
|
|
20
|
+
type: String,
|
|
21
|
+
default: void 0
|
|
21
22
|
},
|
|
22
23
|
type: {
|
|
23
24
|
type: String,
|
|
@@ -32,10 +33,12 @@ const ue = /* @__PURE__ */ A({
|
|
|
32
33
|
default: void 0
|
|
33
34
|
},
|
|
34
35
|
accept: {
|
|
35
|
-
type: String
|
|
36
|
+
type: String,
|
|
37
|
+
default: void 0
|
|
36
38
|
},
|
|
37
39
|
maxSize: {
|
|
38
|
-
type: Number
|
|
40
|
+
type: Number,
|
|
41
|
+
default: void 0
|
|
39
42
|
},
|
|
40
43
|
title: {
|
|
41
44
|
type: String,
|
|
@@ -46,71 +49,87 @@ const ue = /* @__PURE__ */ A({
|
|
|
46
49
|
default: ""
|
|
47
50
|
},
|
|
48
51
|
maxCount: {
|
|
49
|
-
type: Number
|
|
52
|
+
type: Number,
|
|
53
|
+
default: void 0
|
|
50
54
|
},
|
|
51
55
|
beforeUpload: {
|
|
52
|
-
type: Function
|
|
56
|
+
type: Function,
|
|
57
|
+
default: void 0
|
|
53
58
|
},
|
|
54
59
|
customRequest: {
|
|
55
|
-
type: Function
|
|
60
|
+
type: Function,
|
|
61
|
+
default: void 0
|
|
56
62
|
},
|
|
57
63
|
getOssAccess: {
|
|
58
|
-
type: Function
|
|
64
|
+
type: Function,
|
|
65
|
+
default: void 0
|
|
66
|
+
},
|
|
67
|
+
onChange: {
|
|
68
|
+
type: Function,
|
|
69
|
+
default: void 0
|
|
70
|
+
},
|
|
71
|
+
maxSizeErrorMsg: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: void 0
|
|
74
|
+
},
|
|
75
|
+
maxCountErrorMsg: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: void 0
|
|
59
78
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
79
|
+
acceptErrorMsg: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: void 0
|
|
82
|
+
}
|
|
64
83
|
},
|
|
65
84
|
emits: ["update:value"],
|
|
66
85
|
setup(S, { expose: b, emit: x }) {
|
|
67
|
-
var p,
|
|
68
|
-
const { t:
|
|
69
|
-
G(
|
|
70
|
-
const { b: N } = K("ap-upload"), n =
|
|
86
|
+
var p, m, d, f;
|
|
87
|
+
const { t: l, lang: M } = J();
|
|
88
|
+
G(l), I(l, M);
|
|
89
|
+
const { b: N } = K("ap-upload"), n = g(null), e = S, _ = x, E = {
|
|
71
90
|
singleFile: Q,
|
|
72
91
|
multipleFile: W,
|
|
73
92
|
picture: X
|
|
74
|
-
},
|
|
93
|
+
}, s = H.useInjectFormItemContext(), F = v({
|
|
75
94
|
get() {
|
|
76
95
|
return e.value;
|
|
77
96
|
},
|
|
78
97
|
set(o) {
|
|
79
|
-
var
|
|
80
|
-
_("update:value", o),
|
|
98
|
+
var a;
|
|
99
|
+
_("update:value", o), s == null || s.onFieldChange(), (a = e.onChange) == null || a.call(e, o);
|
|
81
100
|
}
|
|
82
|
-
}), O = C("uiMode"),
|
|
83
|
-
t("theme", O.value), t("value", F), t("dirName", e.dirName ?? ((p =
|
|
101
|
+
}), O = C("uiMode"), i = C("apUpload");
|
|
102
|
+
t("theme", O.value), t("value", F), t("dirName", e.dirName ?? ((p = i.value) == null ? void 0 : p.dirName)), t(
|
|
84
103
|
"needName",
|
|
85
|
-
e.needName ?? ((
|
|
86
|
-
), t("accept", e.accept ?? ((d =
|
|
104
|
+
e.needName ?? ((m = i.value) == null ? void 0 : m.needName) ?? !1
|
|
105
|
+
), t("accept", e.accept ?? ((d = i.value) == null ? void 0 : d.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(
|
|
87
106
|
"getOssAccess",
|
|
88
|
-
e.getOssAccess ?? ((
|
|
107
|
+
e.getOssAccess ?? ((f = i.value) == null ? void 0 : f.getOssAccess)
|
|
89
108
|
), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg);
|
|
90
|
-
const z = v(() =>
|
|
91
|
-
t("uploadingCount",
|
|
109
|
+
const z = v(() => u.value === 0), u = g(0);
|
|
110
|
+
t("uploadingCount", u);
|
|
92
111
|
function h() {
|
|
93
|
-
|
|
112
|
+
c(void 0);
|
|
94
113
|
}
|
|
95
|
-
function
|
|
96
|
-
var
|
|
97
|
-
(
|
|
114
|
+
function c(o) {
|
|
115
|
+
var a, r;
|
|
116
|
+
(r = (a = n == null ? void 0 : n.value) == null ? void 0 : a.setValue) == null || r.call(a, o);
|
|
98
117
|
}
|
|
99
118
|
return b({
|
|
100
119
|
done: z,
|
|
101
120
|
clear: h,
|
|
102
|
-
setValue:
|
|
103
|
-
}), (o,
|
|
121
|
+
setValue: c
|
|
122
|
+
}), (o, a) => (y(), U("div", {
|
|
104
123
|
class: $(k(N)())
|
|
105
124
|
}, [
|
|
106
125
|
(y(), T(B(E[e.type]), L(o.$attrs, {
|
|
107
126
|
ref_key: "uploadRef",
|
|
108
127
|
ref: n
|
|
109
128
|
}), R({ _: 2 }, [
|
|
110
|
-
q(Object.keys(o.$slots), (
|
|
111
|
-
name:
|
|
129
|
+
q(Object.keys(o.$slots), (r) => ({
|
|
130
|
+
name: r,
|
|
112
131
|
fn: P((j) => [
|
|
113
|
-
V(o.$slots,
|
|
132
|
+
V(o.$slots, r, w(D(j || {})))
|
|
114
133
|
])
|
|
115
134
|
}))
|
|
116
135
|
]), 1040))
|
|
@@ -118,5 +137,5 @@ const ue = /* @__PURE__ */ A({
|
|
|
118
137
|
}
|
|
119
138
|
});
|
|
120
139
|
export {
|
|
121
|
-
|
|
140
|
+
me as default
|
|
122
141
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as W, inject as s, ref as G, watch as H, nextTick as J, openBlock as x, createElementBlock as
|
|
1
|
+
import { defineComponent as W, inject as s, ref as G, watch as H, nextTick as J, openBlock as x, createElementBlock as k, normalizeClass as K, unref as n, createVNode as C, withCtx as T, createElementVNode as b, createTextVNode as Q, toDisplayString as S, withModifiers as X, createBlock as Y, resolveDynamicComponent as Z, createCommentVNode as ee } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
3
|
import { getPath as te, getName as oe, getReturnData as L } from "../utils/returnData.mjs";
|
|
4
4
|
import { useOss as ae, getOssInstance as se } from "../hooks/useOss.mjs";
|
|
@@ -165,32 +165,32 @@ const me = { class: "multiple-file-context" }, de = { key: 0 }, fe = { key: 1 },
|
|
|
165
165
|
);
|
|
166
166
|
return p.splice(t, 1), Promise.resolve(!0);
|
|
167
167
|
}
|
|
168
|
-
return (e, t) => (x(),
|
|
168
|
+
return (e, t) => (x(), k("div", {
|
|
169
169
|
class: K({
|
|
170
170
|
[n(U)()]: !0,
|
|
171
171
|
[n(U)("admin")]: n(R) === "admin"
|
|
172
172
|
})
|
|
173
173
|
}, [
|
|
174
|
-
|
|
174
|
+
C(n(ne), {
|
|
175
175
|
ref_key: "uploadRef",
|
|
176
176
|
ref: l,
|
|
177
177
|
accept: n(h),
|
|
178
178
|
multiple: "",
|
|
179
|
-
|
|
179
|
+
"max-count": n(i),
|
|
180
180
|
progress: {
|
|
181
181
|
strokeWidth: 3,
|
|
182
182
|
showInfo: !1,
|
|
183
183
|
strokeColor: "#0070FF"
|
|
184
184
|
},
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
"before-upload": $,
|
|
186
|
+
"custom-request": j,
|
|
187
187
|
onRemove: V
|
|
188
188
|
}, {
|
|
189
189
|
default: T(() => [
|
|
190
190
|
b("div", me, [
|
|
191
|
-
|
|
191
|
+
C(n(re), { class: "file-btn" }, {
|
|
192
192
|
default: T(() => [
|
|
193
|
-
|
|
193
|
+
C(n(ie)),
|
|
194
194
|
Q(" " + S(n(I)), 1)
|
|
195
195
|
]),
|
|
196
196
|
_: 1
|
|
@@ -200,14 +200,14 @@ const me = { class: "multiple-file-context" }, de = { key: 0 }, fe = { key: 1 },
|
|
|
200
200
|
onClick: t[0] || (t[0] = X(() => {
|
|
201
201
|
}, ["stop"]))
|
|
202
202
|
}, [
|
|
203
|
-
typeof n(f) == "string" ? (x(),
|
|
203
|
+
typeof n(f) == "string" ? (x(), k("div", de, S(n(f) || `${n(r)("ap.apUpload.supportExtension")}:${n(ue)(n(h))}`), 1)) : n(f) ? (x(), k("div", fe, [
|
|
204
204
|
(x(), Y(Z(n(f))))
|
|
205
205
|
])) : ee("", !0)
|
|
206
206
|
])
|
|
207
207
|
])
|
|
208
208
|
]),
|
|
209
209
|
_: 1
|
|
210
|
-
}, 8, ["accept", "
|
|
210
|
+
}, 8, ["accept", "max-count"])
|
|
211
211
|
], 2));
|
|
212
212
|
}
|
|
213
213
|
});
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as X, inject as c, ref as R, watch as Y, nextTick as Z, openBlock as g, createElementBlock as h, normalizeClass as F, unref as i, createElementVNode as d, renderSlot as ee, Fragment as te, renderList as ne, withDirectives as ae, createVNode as
|
|
1
|
+
import { defineComponent as X, inject as c, ref as R, watch as Y, nextTick as Z, openBlock as g, createElementBlock as h, normalizeClass as F, unref as i, createElementVNode as d, renderSlot as ee, Fragment as te, renderList as ne, withDirectives as ae, createVNode as U, createCommentVNode as M, vShow as se, toDisplayString as k } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { getPath as oe, getName as ie, getReturnData as
|
|
3
|
+
import { getPath as oe, getName as ie, getReturnData as $ } from "../utils/returnData.mjs";
|
|
4
4
|
import { CloseOutlined as re, PlusOutlined as ce } from "@ant-design/icons-vue";
|
|
5
|
-
import { useOss as ue, getOssInstance as
|
|
5
|
+
import { useOss as ue, getOssInstance as I } from "../hooks/useOss.mjs";
|
|
6
6
|
import { fileMatchesAccept as le, getAcceptText as pe } from "../utils/accept.mjs";
|
|
7
7
|
import { message as m, Progress as de } from "@aplus-frontend/antdv";
|
|
8
8
|
import { omit as me } from "lodash-unified";
|
|
9
9
|
import { useLocale as fe } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
10
|
import { useNamespace as ge } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
-
const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture-item-box" }, ye = ["src"], _e = { class: "picture-item-shadow" }, we = ["onClick"],
|
|
11
|
+
const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture-item-box" }, ye = ["src"], _e = { class: "picture-item-shadow" }, we = ["onClick"], Ue = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "picture-item-uploading"
|
|
14
|
-
},
|
|
14
|
+
}, ke = { class: "picture-title" }, Ce = { key: 0 }, Se = { key: 1 }, De = /* @__PURE__ */ X({
|
|
15
15
|
__name: "Picture",
|
|
16
16
|
setup(Ee, { expose: T }) {
|
|
17
|
-
const { t: u } = fe(), { b:
|
|
17
|
+
const { t: u } = fe(), { b: C } = ge("ap-upload-picture"), { put: D } = ue(), O = c("theme"), B = c("dirName"), _ = c("accept") || "image/*", w = c("maxSize") ?? 5, S = c("title"), l = c("maxCount") ?? 10, v = c("uploadingCount"), E = c("beforeUpload"), b = c("customRequest"), z = c("getOssAccess"), L = c("maxSizeErrorMsg"), q = c("maxCountErrorMsg"), V = c("acceptErrorMsg"), x = R(null), r = c("value"), y = c("needName");
|
|
18
18
|
let s = R([]);
|
|
19
19
|
const f = [];
|
|
20
20
|
Y(
|
|
@@ -33,7 +33,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
33
33
|
Z(async () => {
|
|
34
34
|
const a = [];
|
|
35
35
|
for (let t of e) {
|
|
36
|
-
const n = oe(y, t), o = ie(y, t), p = await
|
|
36
|
+
const n = oe(y, t), o = ie(y, t), p = await I(z), Q = await p.getSignatureUrl(n), W = {
|
|
37
37
|
...typeof t == "string" ? {} : t,
|
|
38
38
|
...new File([t], o, {}),
|
|
39
39
|
uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
|
|
@@ -125,7 +125,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
125
125
|
const n = s.value.find((o) => o.uid === e.uid);
|
|
126
126
|
n && (n.status = "success", n.path = t), r.value = [
|
|
127
127
|
...r.value || [],
|
|
128
|
-
|
|
128
|
+
$(y, t, a.name)
|
|
129
129
|
], f.push({
|
|
130
130
|
uid: e.uid,
|
|
131
131
|
path: t
|
|
@@ -136,7 +136,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
138
|
try {
|
|
139
|
-
const t = await
|
|
139
|
+
const t = await I(z);
|
|
140
140
|
e.oss = t, s.value.push(e), D({
|
|
141
141
|
file: a,
|
|
142
142
|
dirName: B,
|
|
@@ -145,7 +145,7 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
145
145
|
const o = s.value.find((p) => p.uid === e.uid);
|
|
146
146
|
o && (o.status = "success", o.path = n), r.value = [
|
|
147
147
|
...r.value || [],
|
|
148
|
-
|
|
148
|
+
$(y, n, a.name)
|
|
149
149
|
], f.push({
|
|
150
150
|
uid: e.uid,
|
|
151
151
|
path: n
|
|
@@ -189,15 +189,15 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
189
189
|
}
|
|
190
190
|
return (e, a) => (g(), h("div", {
|
|
191
191
|
class: F({
|
|
192
|
-
[i(
|
|
193
|
-
[i(
|
|
192
|
+
[i(C)()]: !0,
|
|
193
|
+
[i(C)("admin")]: i(O) === "admin"
|
|
194
194
|
})
|
|
195
195
|
}, [
|
|
196
196
|
d("input", {
|
|
197
|
-
style: { display: "none" },
|
|
198
|
-
type: "file",
|
|
199
197
|
ref_key: "fileRef",
|
|
200
198
|
ref: x,
|
|
199
|
+
style: { display: "none" },
|
|
200
|
+
type: "file",
|
|
201
201
|
accept: i(_),
|
|
202
202
|
onChange: G
|
|
203
203
|
}, null, 40, he),
|
|
@@ -228,17 +228,17 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
228
228
|
class: "picture-item-close",
|
|
229
229
|
onClick: (n) => P(t)
|
|
230
230
|
}, [
|
|
231
|
-
|
|
231
|
+
U(i(re))
|
|
232
232
|
], 8, we),
|
|
233
|
-
t.status === "uploading" ? (g(), h("div",
|
|
234
|
-
|
|
233
|
+
t.status === "uploading" ? (g(), h("div", Ue, [
|
|
234
|
+
U(i(de), {
|
|
235
235
|
percent: t.percent,
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
"stroke-color": "#ffffff",
|
|
237
|
+
"trail-color": "rgba(255, 255, 255, 0.3)",
|
|
238
238
|
size: 4,
|
|
239
|
-
|
|
239
|
+
"show-info": !1
|
|
240
240
|
}, null, 8, ["percent"])
|
|
241
|
-
])) :
|
|
241
|
+
])) : M("", !0)
|
|
242
242
|
], 512), [
|
|
243
243
|
[se, t.status === "uploading"]
|
|
244
244
|
])
|
|
@@ -250,12 +250,12 @@ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture
|
|
|
250
250
|
class: "picture-upload",
|
|
251
251
|
onClick: j
|
|
252
252
|
}, [
|
|
253
|
-
|
|
254
|
-
d("div", null,
|
|
255
|
-
])) :
|
|
253
|
+
U(i(ce)),
|
|
254
|
+
d("div", null, k(i(u)("ap.apUpload.update")), 1)
|
|
255
|
+
])) : M("", !0)
|
|
256
256
|
]),
|
|
257
|
-
d("div",
|
|
258
|
-
i(S) ? (g(), h("div",
|
|
257
|
+
d("div", ke, [
|
|
258
|
+
i(S) ? (g(), h("div", Ce, k(i(S)), 1)) : (g(), h("div", Se, k(`${i(u)("ap.apUpload.supportExtension")}:${i(pe)(i(_))},${i(u)(
|
|
259
259
|
"ap.apUpload.maxUploadPictureSize",
|
|
260
260
|
{ maxSize: i(w) }
|
|
261
261
|
)}`), 1))
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { defineComponent as ne, inject as s, ref as h, watch as oe, computed as le, openBlock as _, createElementBlock as x, normalizeClass as se, unref as a, createElementVNode as i, toDisplayString as z, createCommentVNode as A, normalizeStyle as re, createBlock as ie, withModifiers as ce, createVNode as ue } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { getName as pe, getReturnData as
|
|
3
|
+
import { getName as pe, getReturnData as q } from "../utils/returnData.mjs";
|
|
4
4
|
import { useOss as ve, useOssInit as de } from "../hooks/useOss.mjs";
|
|
5
5
|
import { fileMatchesAccept as fe, getAcceptText as me } from "../utils/accept.mjs";
|
|
6
6
|
import { message as u, Progress as ge } from "@aplus-frontend/antdv";
|
|
7
7
|
import { DeleteOutlined as he } from "@ant-design/icons-vue";
|
|
8
|
-
import
|
|
8
|
+
import I from "../assets/single-file-icon.png.mjs";
|
|
9
9
|
import { useLocale as _e } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
10
|
import { useNamespace as ke } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
11
|
const ye = ["accept"], we = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "state-un"
|
|
14
|
-
}, De = ["src"],
|
|
14
|
+
}, De = ["src"], Ue = { class: "state-un-title" }, Fe = { class: "state-un-subtitle" }, Ce = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "state-ing"
|
|
17
|
-
}, Ee = { class: "left" }, Se = ["src"], Ne = { class: "center" }, xe = { class: "center-progress" },
|
|
17
|
+
}, Ee = { class: "left" }, Se = ["src"], Ne = { class: "center" }, xe = { class: "center-progress" }, qe = /* @__PURE__ */ ne({
|
|
18
18
|
__name: "SingleFile",
|
|
19
19
|
setup(ze, { expose: j }) {
|
|
20
|
-
const { t: r } = _e(), { b: k } = ke("ap-upload-single-file"), { put: G, client: b } = ve(), y = s("theme"), W = s("dirName"), w = s("accept") || "*", D = s("maxSize") ?? 500, H = s("title") || r("ap.apUpload.clickOrDragUpload"),
|
|
20
|
+
const { t: r } = _e(), { b: k } = ke("ap-upload-single-file"), { put: G, client: b } = ve(), y = s("theme"), W = s("dirName"), w = s("accept") || "*", D = s("maxSize") ?? 500, H = s("title") || r("ap.apUpload.clickOrDragUpload"), U = s("subTitle"), n = s("value"), F = s("needName"), p = s("uploadingCount"), B = s("beforeUpload"), R = s("customRequest"), J = s("getOssAccess"), K = s("maxSizeErrorMsg"), Q = s("acceptErrorMsg"), o = h(null);
|
|
21
21
|
oe(
|
|
22
22
|
() => n == null ? void 0 : n.value,
|
|
23
23
|
function(e) {
|
|
@@ -27,7 +27,7 @@ const ye = ["accept"], we = {
|
|
|
27
27
|
);
|
|
28
28
|
function M(e) {
|
|
29
29
|
e ? setTimeout(() => {
|
|
30
|
-
const t = pe(
|
|
30
|
+
const t = pe(F, e);
|
|
31
31
|
l.value = 3, o.value = new File([e], t, {}), n.value = e;
|
|
32
32
|
}) : (l.value = 1, o.value = null, n.value = void 0);
|
|
33
33
|
}
|
|
@@ -49,20 +49,20 @@ const ye = ["accept"], we = {
|
|
|
49
49
|
function V(e) {
|
|
50
50
|
if (e.preventDefault(), e.stopPropagation(), l.value !== 1)
|
|
51
51
|
return;
|
|
52
|
-
var t = e.dataTransfer, c = [], L = 0,
|
|
52
|
+
var t = e.dataTransfer, c = [], L = 0, $ = t.files.length;
|
|
53
53
|
function v() {
|
|
54
|
-
L ===
|
|
54
|
+
L === $ - 1 && Z(c), L++;
|
|
55
55
|
}
|
|
56
56
|
if (t.items !== void 0)
|
|
57
|
-
for (var
|
|
58
|
-
var E = t.items[
|
|
57
|
+
for (var C = 0; C < t.items.length; C++) {
|
|
58
|
+
var E = t.items[C];
|
|
59
59
|
if (E.kind === "file" && E.webkitGetAsEntry().isFile) {
|
|
60
60
|
var ae = E.getAsFile();
|
|
61
61
|
c.push(ae), v();
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
else
|
|
65
|
-
for (let N = 0; N <
|
|
65
|
+
for (let N = 0; N < $; N++) {
|
|
66
66
|
var g = t.files[N];
|
|
67
67
|
if (g.type)
|
|
68
68
|
c.push(g), v();
|
|
@@ -118,8 +118,8 @@ const ye = ["accept"], we = {
|
|
|
118
118
|
u.warning(t || r("ap.apUpload.networkAnomaly")), l.value = 1, o.value = null, p.value--;
|
|
119
119
|
},
|
|
120
120
|
onSuccess: (t) => {
|
|
121
|
-
n.value =
|
|
122
|
-
|
|
121
|
+
n.value = q(
|
|
122
|
+
F,
|
|
123
123
|
t,
|
|
124
124
|
o.value.name
|
|
125
125
|
), l.value = 3, p.value--;
|
|
@@ -134,8 +134,8 @@ const ye = ["accept"], we = {
|
|
|
134
134
|
dirName: W,
|
|
135
135
|
oss: b,
|
|
136
136
|
successCallBack(t) {
|
|
137
|
-
n.value =
|
|
138
|
-
|
|
137
|
+
n.value = q(
|
|
138
|
+
F,
|
|
139
139
|
t,
|
|
140
140
|
o.value.name
|
|
141
141
|
), l.value = 3, p.value--;
|
|
@@ -172,28 +172,28 @@ const ye = ["accept"], we = {
|
|
|
172
172
|
onDrop: V
|
|
173
173
|
}, [
|
|
174
174
|
i("input", {
|
|
175
|
-
style: { display: "none" },
|
|
176
|
-
type: "file",
|
|
177
175
|
ref_key: "fileRef",
|
|
178
176
|
ref: m,
|
|
177
|
+
style: { display: "none" },
|
|
178
|
+
type: "file",
|
|
179
179
|
accept: a(w),
|
|
180
180
|
onChange: ee
|
|
181
181
|
}, null, 40, ye),
|
|
182
182
|
l.value === 1 ? (_(), x("div", we, [
|
|
183
183
|
i("img", {
|
|
184
184
|
class: "state-un-icon",
|
|
185
|
-
src: a(
|
|
185
|
+
src: a(I)
|
|
186
186
|
}, null, 8, De),
|
|
187
|
-
i("div",
|
|
188
|
-
i("div",
|
|
187
|
+
i("div", Ue, z(a(H)), 1),
|
|
188
|
+
i("div", Fe, z(typeof a(U) == "string" && a(U).length > 0 ? a(U) : `${a(r)("ap.apUpload.supportExtension")}:${a(me)(
|
|
189
189
|
a(w)
|
|
190
190
|
)},${a(r)("ap.apUpload.maxWarnUploadFileSize", {
|
|
191
191
|
maxSize: a(D)
|
|
192
192
|
})}`), 1)
|
|
193
193
|
])) : A("", !0),
|
|
194
|
-
[2, 3].includes(l.value) ? (_(), x("div",
|
|
194
|
+
[2, 3].includes(l.value) ? (_(), x("div", Ce, [
|
|
195
195
|
i("div", Ee, [
|
|
196
|
-
i("img", { src: a(
|
|
196
|
+
i("img", { src: a(I) }, null, 8, Se)
|
|
197
197
|
]),
|
|
198
198
|
i("div", Ne, [
|
|
199
199
|
i("div", {
|
|
@@ -207,10 +207,10 @@ const ye = ["accept"], we = {
|
|
|
207
207
|
key: 0,
|
|
208
208
|
percent: f.value,
|
|
209
209
|
size: 4,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}, null, 8, ["percent", "
|
|
210
|
+
"show-info": !1,
|
|
211
|
+
"trail-color": a(y) === "admin" ? "#D9D9D9" : "#DEE4ED",
|
|
212
|
+
"stroke-color": a(y) === "admin" ? "#34B77C" : "#0070FF"
|
|
213
|
+
}, null, 8, ["percent", "trail-color", "stroke-color"]))
|
|
214
214
|
])
|
|
215
215
|
]),
|
|
216
216
|
i("div", {
|
|
@@ -225,5 +225,5 @@ const ye = ["accept"], we = {
|
|
|
225
225
|
}
|
|
226
226
|
});
|
|
227
227
|
export {
|
|
228
|
-
|
|
228
|
+
qe as default
|
|
229
229
|
};
|