@aplus-frontend/ui 7.10.6 → 7.11.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/index.mjs +93 -91
- package/es/src/ag-grid/editable/form-item.vue.mjs +75 -63
- package/es/src/ag-grid/editable/index.vue.mjs +80 -72
- package/es/src/ag-grid/editable/interface.d.ts +2 -1
- package/es/src/ag-grid/editable/utils.d.ts +7 -0
- package/es/src/ag-grid/editable/utils.mjs +32 -17
- package/es/src/ap-form/ap-form.vue2.mjs +144 -153
- package/es/src/ap-form/utils/transform.d.ts +6 -0
- package/es/src/ap-form/utils/transform.mjs +30 -0
- package/es/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +129 -93
- package/es/src/business/ap-appendix/interface.d.ts +4 -0
- package/es/src/business/ap-appendix/style/index.mjs +56 -34
- package/es/src/business/ap-attachment/ApAttachment.mjs +112 -89
- package/es/src/business/ap-attachment/style/index.mjs +21 -7
- package/es/src/business/ap-download/ap-download.vue.d.ts +1 -0
- package/es/src/business/ap-download/ap-download.vue.mjs +86 -45
- package/es/src/business/ap-download/interface.d.ts +4 -0
- package/es/src/business/ap-download/style/index.mjs +8 -4
- package/es/src/business/ap-file-preview/ap-file-preview.vue.d.ts +4 -0
- package/es/src/business/ap-file-preview/ap-file-preview.vue.mjs +4 -0
- package/es/src/business/ap-file-preview/ap-file-preview.vue2.mjs +104 -0
- package/es/src/business/ap-file-preview/components/error-result/index.vue.d.ts +6 -0
- package/es/src/business/ap-file-preview/components/error-result/index.vue.mjs +4 -0
- package/es/src/business/ap-file-preview/components/error-result/index.vue2.mjs +40 -0
- package/es/src/business/ap-file-preview/icons/not-exist-icon.vue.d.ts +3 -0
- package/es/src/business/ap-file-preview/icons/not-exist-icon.vue.mjs +20 -0
- package/es/src/business/ap-file-preview/icons/not-preview-icon.vue.d.ts +3 -0
- package/es/src/business/ap-file-preview/icons/not-preview-icon.vue.mjs +20 -0
- package/es/src/business/ap-file-preview/index.d.ts +7 -0
- package/es/src/business/ap-file-preview/index.mjs +8 -0
- package/es/src/business/ap-file-preview/interface.d.ts +45 -0
- package/es/src/business/ap-file-preview/style/index.d.ts +5 -0
- package/es/src/business/ap-file-preview/style/index.mjs +46 -0
- package/es/src/business/ap-file-preview/utils/create-file-preview-modal.d.ts +2 -0
- package/es/src/business/ap-file-preview/utils/create-file-preview-modal.mjs +18 -0
- package/es/src/business/ap-file-preview/utils/default-parser-plugin.d.ts +4 -0
- package/es/src/business/ap-file-preview/utils/default-parser-plugin.mjs +48 -0
- package/es/src/business/ap-image/ApImage.vue2.mjs +16 -16
- package/es/src/business/ap-upload/apUpload.vue.d.ts +1 -1
- package/es/src/business/ap-upload/apUploadTypes.d.ts +2 -2
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +94 -82
- package/es/src/business/ap-upload/style/multiple-file.mjs +6 -3
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +16 -14
- package/es/src/config-provider/config-provider-props.d.ts +6 -0
- package/es/src/config-provider/config-provider-props.mjs +6 -2
- package/es/src/config-provider/config-provider.d.ts +17 -1
- package/es/src/config-provider/config-provider.mjs +24 -23
- package/es/src/config-provider/hooks/use-global-config.d.ts +7 -0
- package/es/src/config-provider/index.d.ts +31 -3
- package/es/src/index.mjs +74 -72
- package/es/src/locale/lang/en.mjs +5 -0
- package/es/src/locale/lang/zh-cn.mjs +5 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/editable/interface.d.ts +2 -1
- package/lib/src/ag-grid/editable/utils.d.ts +7 -0
- package/lib/src/ag-grid/editable/utils.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/utils/transform.d.ts +6 -0
- package/lib/src/ap-form/utils/transform.js +1 -0
- package/lib/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-appendix/interface.d.ts +4 -0
- package/lib/src/business/ap-appendix/style/index.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style/index.js +1 -1
- package/lib/src/business/ap-download/ap-download.vue.d.ts +1 -0
- package/lib/src/business/ap-download/ap-download.vue.js +1 -1
- package/lib/src/business/ap-download/interface.d.ts +4 -0
- package/lib/src/business/ap-download/style/index.js +1 -1
- package/lib/src/business/ap-file-preview/ap-file-preview.vue.d.ts +4 -0
- package/lib/src/business/ap-file-preview/ap-file-preview.vue.js +1 -0
- package/lib/src/business/ap-file-preview/ap-file-preview.vue2.js +1 -0
- package/lib/src/business/ap-file-preview/components/error-result/index.vue.d.ts +6 -0
- package/lib/src/business/ap-file-preview/components/error-result/index.vue.js +1 -0
- package/lib/src/business/ap-file-preview/components/error-result/index.vue2.js +1 -0
- package/lib/src/business/ap-file-preview/icons/not-exist-icon.vue.d.ts +3 -0
- package/lib/src/business/ap-file-preview/icons/not-exist-icon.vue.js +1 -0
- package/lib/src/business/ap-file-preview/icons/not-preview-icon.vue.d.ts +3 -0
- package/lib/src/business/ap-file-preview/icons/not-preview-icon.vue.js +1 -0
- package/lib/src/business/ap-file-preview/index.d.ts +7 -0
- package/lib/src/business/ap-file-preview/index.js +1 -0
- package/lib/src/business/ap-file-preview/interface.d.ts +45 -0
- package/lib/src/business/ap-file-preview/style/index.d.ts +5 -0
- package/lib/src/business/ap-file-preview/style/index.js +1 -0
- package/lib/src/business/ap-file-preview/utils/create-file-preview-modal.d.ts +2 -0
- package/lib/src/business/ap-file-preview/utils/create-file-preview-modal.js +1 -0
- package/lib/src/business/ap-file-preview/utils/default-parser-plugin.d.ts +4 -0
- package/lib/src/business/ap-file-preview/utils/default-parser-plugin.js +1 -0
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-upload/apUpload.vue.d.ts +1 -1
- package/lib/src/business/ap-upload/apUploadTypes.d.ts +2 -2
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/style/multiple-file.js +1 -1
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +6 -0
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +17 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +7 -0
- package/lib/src/config-provider/index.d.ts +31 -3
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { UploadOutlined as
|
|
1
|
+
import { defineComponent as Z, inject as a, ref as ee, watch as oe, nextTick as te, createElementBlock as C, openBlock as x, normalizeClass as ae, unref as n, createVNode as y, withCtx as N, createElementVNode as P, createTextVNode as se, toDisplayString as L, withModifiers as ne, createCommentVNode as re, createBlock as ie, resolveDynamicComponent as le } from "vue";
|
|
2
|
+
import { UploadOutlined as ce } from "@ant-design/icons-vue";
|
|
3
3
|
import { message as p, Upload as ue, Button as pe } from "@aplus-frontend/antdv";
|
|
4
|
+
import { IconApAdLineDownload as me } from "@aplus-frontend/icon";
|
|
5
|
+
import { ApFilePreview as de } from "../../ap-file-preview/index.mjs";
|
|
4
6
|
import "../../../config-provider/index.mjs";
|
|
5
|
-
import { useOss as
|
|
6
|
-
import
|
|
7
|
-
import { fileMatchesAccept as
|
|
8
|
-
import { getPath as he, getName as
|
|
9
|
-
import { useGlobalConfig as
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
const
|
|
7
|
+
import { useOss as fe, getOssInstance as S } from "../hooks/useOss.mjs";
|
|
8
|
+
import ge from "../style/index.mjs";
|
|
9
|
+
import { fileMatchesAccept as ve, getAcceptText as we } from "../utils/accept.mjs";
|
|
10
|
+
import { getPath as he, getName as xe, getReturnData as D } from "../utils/returnData.mjs";
|
|
11
|
+
import { useGlobalConfig as ye } from "../../../config-provider/hooks/use-global-config.mjs";
|
|
12
|
+
import { useLocale as ke } from "../../../config-provider/hooks/use-locale.mjs";
|
|
13
|
+
import { useNamespace as be } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
const Ce = { class: "multiple-file-context" }, Ne = { key: 0 }, Ue = { key: 1 }, Oe = /* @__PURE__ */ Z({
|
|
13
15
|
__name: "MultipleFile",
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
+
setup(Ee, { expose: z }) {
|
|
17
|
+
const U = ye(
|
|
16
18
|
"downloadCenterTriggerConfig"
|
|
17
|
-
), { t:
|
|
18
|
-
|
|
19
|
+
), { t: i } = ke(), { b: B } = be("ap-upload-multiple-file"), O = ge("ap-upload"), { put: V } = fe(), q = a("dirName"), j = a("baseDirName"), k = a("accept") || "*", E = a("maxSize") ?? 500, $ = a("title") || i("ap.apUpload.uploadFile"), f = a("subTitle"), l = a("maxCount") ?? 10, m = a("uploadingCount"), F = a("beforeUpload"), A = a("customRequest"), g = a("getOssAccess"), G = a("maxSizeErrorMsg"), W = a("maxCountErrorMsg"), H = a("acceptErrorMsg"), _ = a("onRemove"), b = a("showUploadErrorMsg"), T = a("bucket"), r = a("value"), c = [], v = a("needName"), d = ee(null);
|
|
20
|
+
oe(
|
|
19
21
|
() => r?.value,
|
|
20
22
|
function(e) {
|
|
21
|
-
!
|
|
23
|
+
!d?.value?.fileList?.length && e && I(e);
|
|
22
24
|
},
|
|
23
25
|
{ immediate: !0 }
|
|
24
26
|
);
|
|
25
|
-
function
|
|
27
|
+
function I(e) {
|
|
26
28
|
if (!e) {
|
|
27
|
-
u = [],
|
|
29
|
+
u = [], d.value.fileList = [], r.value = void 0, c.splice(0, c.length);
|
|
28
30
|
return;
|
|
29
31
|
}
|
|
30
|
-
|
|
32
|
+
te(() => {
|
|
31
33
|
const o = e.map((t) => {
|
|
32
|
-
const s = he(
|
|
34
|
+
const s = he(v, t), M = xe(v, t), h = new File(
|
|
33
35
|
[t],
|
|
34
36
|
M,
|
|
35
37
|
{}
|
|
36
38
|
);
|
|
37
|
-
return
|
|
39
|
+
return h.response = s, h.uid = s, h.status = "done", h;
|
|
38
40
|
});
|
|
39
|
-
if (
|
|
41
|
+
if (l && o.length > l) {
|
|
40
42
|
p.warning(
|
|
41
|
-
|
|
42
|
-
maxCount:
|
|
43
|
+
i("ap.apUpload.fileInitializationException", {
|
|
44
|
+
maxCount: l
|
|
43
45
|
})
|
|
44
46
|
);
|
|
45
47
|
return;
|
|
@@ -49,45 +51,45 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
|
|
|
49
51
|
uid: t.uid,
|
|
50
52
|
path: t.response
|
|
51
53
|
});
|
|
52
|
-
}),
|
|
54
|
+
}), d.value.fileList = o, r.value = e;
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
|
-
|
|
56
|
-
let u = [],
|
|
57
|
-
function
|
|
57
|
+
z({ setValue: I });
|
|
58
|
+
let u = [], R;
|
|
59
|
+
function w(e) {
|
|
58
60
|
setTimeout(() => {
|
|
59
|
-
const o =
|
|
61
|
+
const o = d.value.fileList.findIndex(
|
|
60
62
|
(t) => t.uid === e.uid
|
|
61
63
|
);
|
|
62
|
-
o >= 0 &&
|
|
64
|
+
o >= 0 && d.value.fileList.splice(o, 1);
|
|
63
65
|
});
|
|
64
66
|
}
|
|
65
67
|
async function J(e) {
|
|
66
|
-
if (
|
|
67
|
-
return clearTimeout(
|
|
68
|
+
if (l && l > 1 && u.length >= l)
|
|
69
|
+
return clearTimeout(R), R = setTimeout(() => {
|
|
68
70
|
p.warning(
|
|
69
|
-
W ||
|
|
70
|
-
maxCount:
|
|
71
|
+
W || i("ap.apUpload.maxUploadFiles", {
|
|
72
|
+
maxCount: l
|
|
71
73
|
})
|
|
72
74
|
);
|
|
73
|
-
}),
|
|
75
|
+
}), w(e), !1;
|
|
74
76
|
if (e.size > E * 1024 * 1024)
|
|
75
77
|
return p.warning(
|
|
76
|
-
G ||
|
|
78
|
+
G || i("ap.apUpload.maxUploadFileSize", {
|
|
77
79
|
maxSize: E
|
|
78
80
|
})
|
|
79
|
-
),
|
|
80
|
-
if (!
|
|
81
|
+
), w(e), !1;
|
|
82
|
+
if (!ve(e, k))
|
|
81
83
|
return p.warning(
|
|
82
|
-
H ||
|
|
83
|
-
),
|
|
84
|
-
if (typeof
|
|
85
|
-
return
|
|
86
|
-
|
|
84
|
+
H || i("ap.apUpload.fileFormatNotSupported")
|
|
85
|
+
), w(e), !1;
|
|
86
|
+
if (typeof F == "function" && await F(e) === !1)
|
|
87
|
+
return w(e), !1;
|
|
88
|
+
l && l === 1 && (u = [], r.value = void 0), u.push(e);
|
|
87
89
|
}
|
|
88
90
|
async function K(e) {
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
+
if (m.value++, typeof A == "function") {
|
|
92
|
+
A({
|
|
91
93
|
onProgress: (o) => {
|
|
92
94
|
setTimeout(() => {
|
|
93
95
|
e.onProgress({
|
|
@@ -96,30 +98,30 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
|
|
|
96
98
|
});
|
|
97
99
|
},
|
|
98
100
|
onError: (o) => {
|
|
99
|
-
|
|
101
|
+
b && p.warning(o || i("ap.apUpload.networkAnomaly")), setTimeout(() => {
|
|
100
102
|
e.onError({
|
|
101
103
|
name: o,
|
|
102
104
|
message: o
|
|
103
105
|
});
|
|
104
|
-
}),
|
|
106
|
+
}), m.value--;
|
|
105
107
|
},
|
|
106
108
|
onSuccess: (o) => {
|
|
107
109
|
setTimeout(() => {
|
|
108
110
|
e.onSuccess(o);
|
|
109
111
|
}), r.value = [
|
|
110
112
|
...r.value || [],
|
|
111
|
-
|
|
113
|
+
D(v, o, e.file.name)
|
|
112
114
|
], c.push({
|
|
113
115
|
uid: e.file.uid,
|
|
114
116
|
path: o
|
|
115
|
-
}),
|
|
117
|
+
}), m.value--;
|
|
116
118
|
},
|
|
117
119
|
file: e.file
|
|
118
120
|
});
|
|
119
121
|
return;
|
|
120
122
|
}
|
|
121
123
|
try {
|
|
122
|
-
const o = await (
|
|
124
|
+
const o = await (T ? g(T) : g()), t = await S(async () => o);
|
|
123
125
|
e.file.oss = t, V({
|
|
124
126
|
file: e.file,
|
|
125
127
|
dirName: q,
|
|
@@ -127,17 +129,17 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
|
|
|
127
129
|
successCallBack(s) {
|
|
128
130
|
e.onSuccess(s), r.value = [
|
|
129
131
|
...r.value || [],
|
|
130
|
-
|
|
132
|
+
D(v, s, e.file.name)
|
|
131
133
|
], c.push({
|
|
132
134
|
uid: e.file.uid,
|
|
133
135
|
path: s
|
|
134
|
-
}),
|
|
136
|
+
}), m.value--;
|
|
135
137
|
},
|
|
136
138
|
errorCallBack(s) {
|
|
137
|
-
|
|
139
|
+
b && p.warning(s || i("ap.apUpload.networkAnomaly")), e.onError({
|
|
138
140
|
name: s,
|
|
139
141
|
message: s
|
|
140
|
-
}),
|
|
142
|
+
}), m.value--;
|
|
141
143
|
},
|
|
142
144
|
progressCallBack(s) {
|
|
143
145
|
e.onProgress({
|
|
@@ -148,16 +150,16 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
|
|
|
148
150
|
bucket: o?.bucket
|
|
149
151
|
});
|
|
150
152
|
} catch (o) {
|
|
151
|
-
|
|
152
|
-
typeof o?.message == "string" ? o.message :
|
|
153
|
+
b && p.warning(
|
|
154
|
+
typeof o?.message == "string" ? o.message : i("ap.apUpload.networkAnomaly")
|
|
153
155
|
), e.onError({
|
|
154
|
-
name: o?.message ||
|
|
155
|
-
message: o?.message ||
|
|
156
|
-
}),
|
|
156
|
+
name: o?.message || i("ap.apUpload.networkAnomaly"),
|
|
157
|
+
message: o?.message || i("ap.apUpload.networkAnomaly")
|
|
158
|
+
}), m.value--;
|
|
157
159
|
}
|
|
158
160
|
}
|
|
159
161
|
function Q(e) {
|
|
160
|
-
if (
|
|
162
|
+
if (_ && _?.(e), e.response) {
|
|
161
163
|
if (Array.isArray(r.value)) {
|
|
162
164
|
const t = c.findIndex((s) => s.uid === e.uid);
|
|
163
165
|
t >= 0 && (r?.value.splice(t, 1), c.splice(t, 1)), r.value.length === 0 && (r.value = void 0);
|
|
@@ -170,15 +172,15 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
|
|
|
170
172
|
return u.splice(o, 1), Promise.resolve(!0);
|
|
171
173
|
}
|
|
172
174
|
const X = async (e) => {
|
|
173
|
-
if (
|
|
175
|
+
if (U.value?.trigger) {
|
|
174
176
|
let o = [e].map((t) => ({
|
|
175
177
|
objectName: t.response,
|
|
176
178
|
fileName: t.name
|
|
177
179
|
}));
|
|
178
|
-
|
|
180
|
+
U.value?.trigger?.(o);
|
|
179
181
|
} else {
|
|
180
182
|
const o = e.response?.match(/^([^:]+):(.*)$/), t = o?.[1], s = o?.[2] ?? e.response;
|
|
181
|
-
(await
|
|
183
|
+
(await S(
|
|
182
184
|
() => t ? g?.(t) : g?.()
|
|
183
185
|
)).downloadFile([
|
|
184
186
|
{
|
|
@@ -187,19 +189,24 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
|
|
|
187
189
|
}
|
|
188
190
|
]);
|
|
189
191
|
}
|
|
192
|
+
}, Y = (e) => {
|
|
193
|
+
de.createFilePreviewModal({
|
|
194
|
+
src: e.response,
|
|
195
|
+
fileName: e.name
|
|
196
|
+
});
|
|
190
197
|
};
|
|
191
|
-
return (e, o) => (x(),
|
|
192
|
-
class:
|
|
193
|
-
[n(
|
|
194
|
-
[n(
|
|
198
|
+
return (e, o) => (x(), C("div", {
|
|
199
|
+
class: ae({
|
|
200
|
+
[n(B)()]: !0,
|
|
201
|
+
[n(O) ?? ""]: !0
|
|
195
202
|
})
|
|
196
203
|
}, [
|
|
197
204
|
y(n(ue), {
|
|
198
205
|
ref_key: "uploadRef",
|
|
199
|
-
ref:
|
|
206
|
+
ref: d,
|
|
200
207
|
accept: n(k),
|
|
201
208
|
multiple: "",
|
|
202
|
-
"max-count": n(
|
|
209
|
+
"max-count": n(l),
|
|
203
210
|
progress: {
|
|
204
211
|
strokeWidth: 3,
|
|
205
212
|
showInfo: !1,
|
|
@@ -207,30 +214,35 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
|
|
|
207
214
|
},
|
|
208
215
|
"before-upload": J,
|
|
209
216
|
"custom-request": K,
|
|
210
|
-
"show-upload-list": {
|
|
217
|
+
"show-upload-list": {
|
|
218
|
+
showDownloadIcon: !0,
|
|
219
|
+
showRemoveIcon: !0,
|
|
220
|
+
showPreviewIcon: !0
|
|
221
|
+
},
|
|
222
|
+
onPreview: Y,
|
|
211
223
|
onRemove: Q,
|
|
212
224
|
onDownload: X
|
|
213
225
|
}, {
|
|
214
|
-
downloadIcon:
|
|
215
|
-
y(n(
|
|
226
|
+
downloadIcon: N(() => [
|
|
227
|
+
y(n(me), { class: "anticon anticon-vertical-align-bottom" })
|
|
216
228
|
]),
|
|
217
|
-
default:
|
|
218
|
-
|
|
229
|
+
default: N(() => [
|
|
230
|
+
P("div", Ce, [
|
|
219
231
|
y(n(pe), { class: "file-btn" }, {
|
|
220
|
-
default:
|
|
221
|
-
y(n(
|
|
222
|
-
|
|
232
|
+
default: N(() => [
|
|
233
|
+
y(n(ce)),
|
|
234
|
+
se(" " + L(n($)), 1)
|
|
223
235
|
]),
|
|
224
236
|
_: 1
|
|
225
237
|
}),
|
|
226
|
-
|
|
238
|
+
P("div", {
|
|
227
239
|
class: "sub-title",
|
|
228
|
-
onClick: o[0] || (o[0] =
|
|
240
|
+
onClick: o[0] || (o[0] = ne(() => {
|
|
229
241
|
}, ["stop"]))
|
|
230
242
|
}, [
|
|
231
|
-
typeof n(f) == "string" ? (x(),
|
|
232
|
-
(x(),
|
|
233
|
-
])) :
|
|
243
|
+
typeof n(f) == "string" ? (x(), C("div", Ne, L(n(f) || `${n(i)("ap.apUpload.supportExtension")}:${n(we)(n(k))}`), 1)) : n(f) ? (x(), C("div", Ue, [
|
|
244
|
+
(x(), ie(le(n(f))))
|
|
245
|
+
])) : re("", !0)
|
|
234
246
|
])
|
|
235
247
|
])
|
|
236
248
|
]),
|
|
@@ -240,5 +252,5 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
|
|
|
240
252
|
}
|
|
241
253
|
});
|
|
242
254
|
export {
|
|
243
|
-
|
|
255
|
+
Oe as default
|
|
244
256
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = (l) => {
|
|
2
2
|
const { componentCls: o } = l;
|
|
3
3
|
return {
|
|
4
4
|
[`${o}-multiple-file`]: {
|
|
@@ -54,7 +54,10 @@ const t = (l) => {
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
".ant-upload-list-item-done": {
|
|
57
|
-
color: l.colorLink
|
|
57
|
+
color: l.colorLink,
|
|
58
|
+
".ant-upload-list-item-name": {
|
|
59
|
+
cursor: "pointer"
|
|
60
|
+
}
|
|
58
61
|
},
|
|
59
62
|
".ant-upload-list-item-undefined": {
|
|
60
63
|
color: l.colorLink
|
|
@@ -63,5 +66,5 @@ const t = (l) => {
|
|
|
63
66
|
};
|
|
64
67
|
};
|
|
65
68
|
export {
|
|
66
|
-
|
|
69
|
+
i as multipleFileStyle
|
|
67
70
|
};
|
|
@@ -8,13 +8,13 @@ import "./ap-expand-alert/index.mjs";
|
|
|
8
8
|
import { ApExportGroup as h } from "./ap-export-group/index.mjs";
|
|
9
9
|
import { ApImage as B } from "./ap-image/index.mjs";
|
|
10
10
|
import { ApInputRadio as T } from "./ap-input-radio/index.mjs";
|
|
11
|
-
import { ApLabel as
|
|
12
|
-
import { ApLadder as
|
|
13
|
-
import { ApSelectLayout as
|
|
14
|
-
import { ApStatus as
|
|
15
|
-
import { ApTitle as
|
|
11
|
+
import { ApLabel as w, ApLabelGroup as D } from "./ap-label/index.mjs";
|
|
12
|
+
import { ApLadder as R } from "./ap-ladder/index.mjs";
|
|
13
|
+
import { ApSelectLayout as z } from "./ap-select-layout/index.mjs";
|
|
14
|
+
import { ApStatus as F, ApStatusGroup as H } from "./ap-status/index.mjs";
|
|
15
|
+
import { ApTitle as M } from "./ap-title/index.mjs";
|
|
16
16
|
import "./hooks/index.mjs";
|
|
17
|
-
import { ApSummary as
|
|
17
|
+
import { ApSummary as k } from "./ap-summary/index.mjs";
|
|
18
18
|
import { ApAppendix as J } from "./ap-appendix/index.mjs";
|
|
19
19
|
import "./ap-upload-file/index.mjs";
|
|
20
20
|
import "./batch-input-group/index.mjs";
|
|
@@ -32,6 +32,7 @@ import "./ap-tag/index.mjs";
|
|
|
32
32
|
import "./ap-upload/index.mjs";
|
|
33
33
|
import "./ap-download/index.mjs";
|
|
34
34
|
import "./ap-descriptions/index.mjs";
|
|
35
|
+
import { ApFilePreview as ao } from "./ap-file-preview/index.mjs";
|
|
35
36
|
export {
|
|
36
37
|
J as ApAppendix,
|
|
37
38
|
d as ApAttachment,
|
|
@@ -42,21 +43,22 @@ export {
|
|
|
42
43
|
X as ApCopy,
|
|
43
44
|
to as ApDraggableGrid,
|
|
44
45
|
h as ApExportGroup,
|
|
46
|
+
ao as ApFilePreview,
|
|
45
47
|
B as ApImage,
|
|
46
48
|
T as ApInputRadio,
|
|
47
49
|
ro as ApKeepAlive,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
w as ApLabel,
|
|
51
|
+
D as ApLabelGroup,
|
|
52
|
+
R as ApLadder,
|
|
51
53
|
U as ApProductInfo,
|
|
52
54
|
$ as ApRadioGroup,
|
|
53
|
-
|
|
55
|
+
z as ApSelectLayout,
|
|
54
56
|
O as ApSizeInput,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
F as ApStatus,
|
|
58
|
+
H as ApStatusGroup,
|
|
59
|
+
k as ApSummary,
|
|
58
60
|
u as ApTableModal,
|
|
59
|
-
|
|
61
|
+
M as ApTitle,
|
|
60
62
|
fo as ApTransformDataHelper,
|
|
61
63
|
mo as ApValueSelectCard,
|
|
62
64
|
Z as ApView
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import { ApFilePreviewProps } from '../business/ap-file-preview/interface';
|
|
2
3
|
import { AgGridProps } from '../ag-grid';
|
|
3
4
|
import { ApGridProps } from '../ap-grid';
|
|
4
5
|
import { ApImageProps, ApTitleProps, ViewCacheOption } from '../business';
|
|
@@ -19,6 +20,7 @@ type ApProCardConfig = {
|
|
|
19
20
|
};
|
|
20
21
|
type ApImageConfig = Pick<ApImageProps, 'uiMode'>;
|
|
21
22
|
type ApTitleConfig = Pick<ApTitleProps, 'uiMode'>;
|
|
23
|
+
type ApFilePreviewConfig = Pick<ApFilePreviewProps, 'parserPlugin'>;
|
|
22
24
|
export declare const configProviderProps: () => {
|
|
23
25
|
iconPrefixCls: StringConstructor;
|
|
24
26
|
getTargetContainer: {
|
|
@@ -178,6 +180,10 @@ export declare const configProviderProps: () => {
|
|
|
178
180
|
type: PropType<ApDescriptionsConfig>;
|
|
179
181
|
default: () => {};
|
|
180
182
|
};
|
|
183
|
+
apFilePreview: {
|
|
184
|
+
type: PropType<ApFilePreviewConfig>;
|
|
185
|
+
default: () => {};
|
|
186
|
+
};
|
|
181
187
|
/**
|
|
182
188
|
* @description aplus-ui的locale
|
|
183
189
|
*/
|
|
@@ -26,8 +26,12 @@ const t = () => ({
|
|
|
26
26
|
apDescriptions: {
|
|
27
27
|
type: Object,
|
|
28
28
|
default: () => ({})
|
|
29
|
+
},
|
|
30
|
+
apFilePreview: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => ({})
|
|
29
33
|
}
|
|
30
|
-
}),
|
|
34
|
+
}), a = () => ({
|
|
31
35
|
/**
|
|
32
36
|
* @description aplus-ui的locale
|
|
33
37
|
*/
|
|
@@ -76,5 +80,5 @@ const t = () => ({
|
|
|
76
80
|
...e()
|
|
77
81
|
});
|
|
78
82
|
export {
|
|
79
|
-
|
|
83
|
+
a as configProviderProps
|
|
80
84
|
};
|
|
@@ -8,6 +8,7 @@ import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
|
8
8
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
9
9
|
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '..';
|
|
10
10
|
import { UiModeType, SearchFormGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ApiType, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
|
|
11
|
+
import { ApFilePreviewParser } from '../business/ap-file-preview/interface';
|
|
11
12
|
import { LocaleType } from '../locale';
|
|
12
13
|
import { RecursivePartial } from '../type';
|
|
13
14
|
export declare const globalConfigCached: Ref<ConfigProviderProps>;
|
|
@@ -180,6 +181,12 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
180
181
|
type: PropType<ApDescriptionsConfig>;
|
|
181
182
|
default: () => {};
|
|
182
183
|
};
|
|
184
|
+
apFilePreview: {
|
|
185
|
+
type: PropType<{
|
|
186
|
+
parserPlugin?: ApFilePreviewParser[] | undefined;
|
|
187
|
+
}>;
|
|
188
|
+
default: () => {};
|
|
189
|
+
};
|
|
183
190
|
aplusLocale: {
|
|
184
191
|
type: PropType<LocaleType>;
|
|
185
192
|
};
|
|
@@ -384,6 +391,12 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
384
391
|
type: PropType<ApDescriptionsConfig>;
|
|
385
392
|
default: () => {};
|
|
386
393
|
};
|
|
394
|
+
apFilePreview: {
|
|
395
|
+
type: PropType<{
|
|
396
|
+
parserPlugin?: ApFilePreviewParser[] | undefined;
|
|
397
|
+
}>;
|
|
398
|
+
default: () => {};
|
|
399
|
+
};
|
|
387
400
|
aplusLocale: {
|
|
388
401
|
type: PropType<LocaleType>;
|
|
389
402
|
};
|
|
@@ -450,9 +463,12 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
450
463
|
mentions: MentionsConfig;
|
|
451
464
|
timePicker: TimePickerConfig;
|
|
452
465
|
card: CardConfig;
|
|
453
|
-
apUpload: ApUploadConfig;
|
|
454
466
|
searchForm: SearchFormGlobalConfig;
|
|
467
|
+
apUpload: ApUploadConfig;
|
|
455
468
|
apDescriptions: ApDescriptionsConfig;
|
|
469
|
+
apFilePreview: {
|
|
470
|
+
parserPlugin?: ApFilePreviewParser[] | undefined;
|
|
471
|
+
};
|
|
456
472
|
api: ApiType;
|
|
457
473
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
458
474
|
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { useDevWarning as
|
|
1
|
+
import { isVNode as c, ref as m, defineComponent as f, computed as s, watch as v, onActivated as C, createVNode as P, renderSlot as h } from "vue";
|
|
2
|
+
import { ConfigProvider as w } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useDevWarning as T } from "../utils/warning.mjs";
|
|
4
4
|
import { mergeAntdProviderConfigWithCache as t, mergeAntdProvideConfig as n } from "../utils/config-provider-preset.mjs";
|
|
5
|
-
import { configProviderProps as
|
|
6
|
-
import { DEFAULT_NAMESPACE as
|
|
7
|
-
import { useGlobalConfig as
|
|
5
|
+
import { configProviderProps as b } from "./config-provider-props.mjs";
|
|
6
|
+
import { DEFAULT_NAMESPACE as F } from "./constants.mjs";
|
|
7
|
+
import { useGlobalConfig as A, provideGlobalConfig as D } from "./hooks/use-global-config.mjs";
|
|
8
8
|
function G(e) {
|
|
9
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
9
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !c(e);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const a = m({}), E = /* @__PURE__ */ f({
|
|
12
12
|
name: "AplusConfigProvider",
|
|
13
|
-
props:
|
|
13
|
+
props: b(),
|
|
14
14
|
setup(e, {
|
|
15
15
|
slots: l
|
|
16
16
|
}) {
|
|
17
|
-
|
|
18
|
-
function o(
|
|
19
|
-
return e[
|
|
17
|
+
T("ConfigProvider")(!e.uiMode, "breaking", "uiMode has been remove, see migrate guild https://aplus.aplnk.com/aplus-ui/guild/migrate-7.2.html");
|
|
18
|
+
function o(i, p) {
|
|
19
|
+
return e[i] ?? d.value?.[i] ?? p;
|
|
20
20
|
}
|
|
21
|
-
const d =
|
|
22
|
-
namespace: o("namespace",
|
|
21
|
+
const d = A(), u = s(() => ({
|
|
22
|
+
namespace: o("namespace", F),
|
|
23
23
|
apGrid: o("apGrid"),
|
|
24
24
|
agGrid: o("agGrid"),
|
|
25
25
|
apProCard: o("apProCard"),
|
|
@@ -28,6 +28,7 @@ const i = f({}), E = /* @__PURE__ */ p({
|
|
|
28
28
|
searchForm: o("searchForm"),
|
|
29
29
|
apUpload: o("apUpload"),
|
|
30
30
|
apDescriptions: o("apDescriptions"),
|
|
31
|
+
apFilePreview: o("apFilePreview"),
|
|
31
32
|
aplusLocale: e.aplusLocale,
|
|
32
33
|
aplusToken: e.aplusToken,
|
|
33
34
|
api: e.api,
|
|
@@ -36,10 +37,10 @@ const i = f({}), E = /* @__PURE__ */ p({
|
|
|
36
37
|
exportField: e.exportField,
|
|
37
38
|
scrollYDomName: e.scrollYDomName,
|
|
38
39
|
viewCacheOption: e.viewCacheOption
|
|
39
|
-
})), g =
|
|
40
|
+
})), g = D(u);
|
|
40
41
|
let r = !0;
|
|
41
|
-
return v(() => e, (
|
|
42
|
-
|
|
42
|
+
return v(() => e, (i) => {
|
|
43
|
+
a.value = t(n(i), a.value);
|
|
43
44
|
}, {
|
|
44
45
|
deep: !0,
|
|
45
46
|
immediate: !0
|
|
@@ -48,18 +49,18 @@ const i = f({}), E = /* @__PURE__ */ p({
|
|
|
48
49
|
r = !1;
|
|
49
50
|
return;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
a.value = t(n(e), a.value);
|
|
52
53
|
}), () => {
|
|
53
|
-
let
|
|
54
|
-
return P(
|
|
54
|
+
let i;
|
|
55
|
+
return P(w, a.value, G(i = h(l, "default", {
|
|
55
56
|
config: g?.value
|
|
56
|
-
})) ?
|
|
57
|
-
default: () => [
|
|
57
|
+
})) ? i : {
|
|
58
|
+
default: () => [i]
|
|
58
59
|
});
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
62
|
});
|
|
62
63
|
export {
|
|
63
64
|
E as ConfigProvider,
|
|
64
|
-
|
|
65
|
+
a as globalConfigCached
|
|
65
66
|
};
|
|
@@ -9,6 +9,7 @@ import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
|
9
9
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
10
10
|
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '../..';
|
|
11
11
|
import { UiModeType, SearchFormGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ApiType, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from '..';
|
|
12
|
+
import { ApFilePreviewParser } from '../../business/ap-file-preview/interface';
|
|
12
13
|
import { LocaleType } from '../../locale';
|
|
13
14
|
import { RecursivePartial } from '../../type';
|
|
14
15
|
export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
|
|
@@ -183,6 +184,12 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
183
184
|
type: PropType<ApDescriptionsConfig>;
|
|
184
185
|
default: () => {};
|
|
185
186
|
};
|
|
187
|
+
apFilePreview: {
|
|
188
|
+
type: PropType<{
|
|
189
|
+
parserPlugin?: ApFilePreviewParser[] | undefined;
|
|
190
|
+
}>;
|
|
191
|
+
default: () => {};
|
|
192
|
+
};
|
|
186
193
|
aplusLocale: {
|
|
187
194
|
type: PropType<LocaleType>;
|
|
188
195
|
};
|