@aplus-frontend/ui 7.0.0 → 7.1.0
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 +108 -106
- package/es/src/ag-grid/style/custom-header.mjs +1 -1
- package/es/src/ag-grid/style/index.mjs +0 -1
- package/es/src/ap-action/item-dropdown/index.vue.mjs +12 -12
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +39 -39
- package/es/src/ap-descriptions/style/index.mjs +16 -43
- package/es/src/ap-download/ap-download.vue.mjs +43 -43
- package/es/src/ap-download/hooks/useStyle.d.ts +1 -1
- package/es/src/ap-download/hooks/useStyle.mjs +17 -14
- package/es/src/ap-download/style/index.mjs +6 -13
- package/es/src/ap-form/modal-form/index.vue.mjs +59 -60
- package/es/src/ap-form/style/item.mjs +5 -4
- package/es/src/ap-form/style/modal-form.mjs +11 -12
- package/es/src/ap-form/style/search-form-sorter.mjs +31 -27
- package/es/src/ap-form/style/token.d.ts +8 -0
- package/es/src/ap-grid/style/index.mjs +3 -3
- package/es/src/ap-pro-card/style/statistic.mjs +3 -3
- package/es/src/ap-pro-card/style/token.mjs +1 -1
- package/es/src/ap-table/style/index.mjs +2 -2
- package/es/src/ap-table/style/setting.mjs +2 -2
- package/es/src/ap-tag/ap-tag-group.vue.mjs +61 -61
- package/es/src/ap-tag/ap-tag.vue.mjs +19 -20
- package/es/src/ap-tag/style/group.mjs +2 -8
- package/es/src/ap-tag/style/index.mjs +14 -23
- package/es/src/ap-upload/apUpload.vue.mjs +42 -41
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +60 -61
- package/es/src/ap-upload/components/Picture.vue2.mjs +90 -91
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +72 -72
- package/es/src/ap-upload/style/multiple-file.mjs +13 -40
- package/es/src/ap-upload/style/picture.mjs +12 -30
- package/es/src/ap-upload/style/single-file.mjs +5 -16
- package/es/src/business/ag-grid-modal/interface.d.ts +1 -1
- package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +29 -12
- package/es/src/business/ap-appendix/style/index.mjs +1 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +42 -39
- package/es/src/business/ap-copy/style/index.mjs +1 -1
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +45 -46
- package/es/src/business/ap-ladder/ApLadder.mjs +20 -22
- package/es/src/business/ap-ladder/style/index.mjs +11 -39
- package/es/src/business/ap-product-info/ApProductInfo.mjs +21 -22
- package/es/src/business/ap-product-info/style/index.mjs +8 -24
- package/es/src/business/ap-radio-group/style/index.mjs +1 -1
- package/es/src/business/ap-size-input/ApSizeInput.d.ts +20 -4
- package/es/src/business/ap-size-input/ApSizeInput.mjs +37 -40
- package/es/src/business/ap-size-input/constans.d.ts +10 -2
- package/es/src/business/ap-size-input/constans.mjs +9 -1
- package/es/src/business/ap-size-input/form-item.vue.d.ts +13 -0
- package/es/src/business/ap-size-input/form-item.vue.mjs +65 -0
- package/es/src/business/ap-size-input/form-item.vue2.mjs +4 -0
- package/es/src/business/ap-size-input/index.d.ts +33 -8
- package/es/src/business/ap-size-input/index.mjs +3 -2
- package/es/src/business/ap-size-input/interface.d.ts +7 -0
- package/es/src/business/ap-size-input/style/index.mjs +2 -1
- package/es/src/business/ap-table-modal/hooks/use-table-modal.mjs +18 -19
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +13 -13
- package/es/src/business/ap-title/style/index.mjs +1 -1
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +38 -37
- package/es/src/business/ap-value-select-card/index.vue2.mjs +36 -37
- package/es/src/business/ap-value-select-card/style/index.mjs +7 -29
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +61 -64
- package/es/src/business/ap-view/style/index.mjs +1 -1
- package/es/src/business/batch-input-group/style/index.mjs +1 -1
- package/es/src/check-card/style/index.mjs +46 -51
- package/es/src/config-provider/hooks/use-token.d.ts +2 -2
- package/es/src/design-token/constants.mjs +4 -2
- package/es/src/design-token/interface.d.ts +39 -19
- package/es/src/index.mjs +95 -93
- package/es/src/scroll-bar/style/index.mjs +12 -12
- package/es/src/splitter/style/index.mjs +6 -6
- package/es/src/style/index.mjs +1 -1
- package/es/src/text/style/index.mjs +1 -1
- package/es/src/utils/cssinjs/TokenUtil.d.ts +11 -0
- package/es/src/utils/cssinjs/TokenUtil.mjs +26 -0
- package/es/src/utils/cssinjs/index.d.ts +1 -1
- package/es/src/utils/cssinjs/index.mjs +51 -50
- 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/style/custom-header.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-descriptions/style/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/hooks/useStyle.d.ts +1 -1
- package/lib/src/ap-download/hooks/useStyle.js +1 -1
- package/lib/src/ap-download/style/index.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/ap-form/style/modal-form.js +1 -1
- package/lib/src/ap-form/style/search-form-sorter.js +1 -1
- package/lib/src/ap-form/style/token.d.ts +8 -0
- package/lib/src/ap-grid/style/index.js +1 -1
- package/lib/src/ap-pro-card/style/statistic.js +1 -1
- package/lib/src/ap-pro-card/style/token.js +1 -1
- package/lib/src/ap-table/style/index.js +1 -1
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/ap-tag/style/group.js +1 -1
- package/lib/src/ap-tag/style/index.js +1 -1
- 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/ap-upload/style/multiple-file.js +1 -1
- package/lib/src/ap-upload/style/picture.js +1 -1
- package/lib/src/ap-upload/style/single-file.js +1 -1
- package/lib/src/business/ag-grid-modal/interface.d.ts +1 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
- 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-copy/style/index.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-ladder/ApLadder.js +1 -1
- package/lib/src/business/ap-ladder/style/index.js +1 -1
- package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
- package/lib/src/business/ap-product-info/style/index.js +1 -1
- package/lib/src/business/ap-radio-group/style/index.js +1 -1
- package/lib/src/business/ap-size-input/ApSizeInput.d.ts +20 -4
- package/lib/src/business/ap-size-input/ApSizeInput.js +1 -1
- package/lib/src/business/ap-size-input/constans.d.ts +10 -2
- package/lib/src/business/ap-size-input/constans.js +1 -1
- package/lib/src/business/ap-size-input/form-item.vue.d.ts +13 -0
- package/lib/src/business/ap-size-input/form-item.vue.js +1 -0
- package/lib/src/business/ap-size-input/form-item.vue2.js +1 -0
- package/lib/src/business/ap-size-input/index.d.ts +33 -8
- package/lib/src/business/ap-size-input/index.js +1 -1
- package/lib/src/business/ap-size-input/interface.d.ts +7 -0
- package/lib/src/business/ap-size-input/style/index.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.js +1 -1
- package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
- package/lib/src/business/ap-title/style/index.js +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/style/index.js +1 -1
- 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/hooks/use-token.d.ts +2 -2
- package/lib/src/design-token/constants.js +1 -1
- package/lib/src/design-token/interface.d.ts +39 -19
- package/lib/src/index.js +1 -1
- package/lib/src/scroll-bar/style/index.js +1 -1
- package/lib/src/splitter/style/index.js +1 -1
- package/lib/src/style/index.js +1 -1
- package/lib/src/text/style/index.js +1 -1
- package/lib/src/utils/cssinjs/TokenUtil.d.ts +11 -0
- package/lib/src/utils/cssinjs/TokenUtil.js +1 -0
- package/lib/src/utils/cssinjs/index.d.ts +1 -1
- package/lib/src/utils/cssinjs/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, ref as m, computed as c, provide as t, createElementBlock as N, openBlock as d, normalizeClass as U, unref as a, 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
|
-
import { injectLocaleToAccept as
|
|
7
|
-
import { injectLocaleToOss as
|
|
8
|
-
import { Form as
|
|
9
|
-
import
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { useGlobalConfig as
|
|
16
|
-
const me = /* @__PURE__ */
|
|
6
|
+
import { injectLocaleToAccept as w } from "./utils/accept.mjs";
|
|
7
|
+
import { injectLocaleToOss as I } from "./hooks/useOss.mjs";
|
|
8
|
+
import { Form as L } from "@aplus-frontend/antdv";
|
|
9
|
+
import q from "./style/index.mjs";
|
|
10
|
+
import { useLocale as P } from "../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as V } from "../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import D from "./components/Picture.vue2.mjs";
|
|
13
|
+
import G from "./components/MultipleFile.vue2.mjs";
|
|
14
|
+
import H from "./components/SingleFile.vue2.mjs";
|
|
15
|
+
import { useGlobalConfig as J } from "../config-provider/hooks/use-global-config.mjs";
|
|
16
|
+
const K = ["id"], me = /* @__PURE__ */ h({
|
|
17
17
|
name: "AplusFileUpload",
|
|
18
18
|
__name: "apUpload",
|
|
19
19
|
props: {
|
|
@@ -92,54 +92,55 @@ const me = /* @__PURE__ */ U({
|
|
|
92
92
|
},
|
|
93
93
|
emits: ["update:value"],
|
|
94
94
|
setup(f, { expose: g, emit: v }) {
|
|
95
|
-
const { t:
|
|
96
|
-
|
|
97
|
-
const { b: C } =
|
|
98
|
-
singleFile:
|
|
99
|
-
multipleFile:
|
|
100
|
-
picture:
|
|
101
|
-
},
|
|
95
|
+
const { t: n, lang: y } = P();
|
|
96
|
+
w(n), I(n, y);
|
|
97
|
+
const { b: C } = V("ap-upload"), S = q("ap-upload"), s = m(null), e = f, x = v, b = {
|
|
98
|
+
singleFile: H,
|
|
99
|
+
multipleFile: G,
|
|
100
|
+
picture: D
|
|
101
|
+
}, i = L.useInjectFormItemContext(), E = c({
|
|
102
102
|
get() {
|
|
103
103
|
return e.value;
|
|
104
104
|
},
|
|
105
105
|
set(o) {
|
|
106
|
-
x("update:value", o),
|
|
106
|
+
x("update:value", o), i?.onFieldChange(), e.onChange?.(o);
|
|
107
107
|
}
|
|
108
|
-
}),
|
|
109
|
-
t("
|
|
108
|
+
}), r = J("apUpload");
|
|
109
|
+
t("value", E), t("dirName", e.dirName ?? r.value?.dirName), t(
|
|
110
110
|
"needName",
|
|
111
111
|
e.needName ?? r.value?.needName ?? !1
|
|
112
112
|
), t("accept", e.accept ?? r.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(
|
|
113
113
|
"getOssAccess",
|
|
114
114
|
e.getOssAccess ?? r.value?.getOssAccess
|
|
115
115
|
), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg), t("onRemove", e.onRemove), t("showUploadErrorMsg", e.showUploadErrorMsg);
|
|
116
|
-
const
|
|
117
|
-
t("uploadingCount",
|
|
118
|
-
function
|
|
119
|
-
|
|
116
|
+
const F = c(() => l.value === 0), l = m(0);
|
|
117
|
+
t("uploadingCount", l);
|
|
118
|
+
function M() {
|
|
119
|
+
p(void 0);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
121
|
+
function p(o) {
|
|
122
|
+
s?.value?.setValue?.(o);
|
|
123
123
|
}
|
|
124
124
|
return g({
|
|
125
|
-
done:
|
|
126
|
-
clear:
|
|
127
|
-
setValue:
|
|
128
|
-
}), (o, Q) => (
|
|
129
|
-
|
|
125
|
+
done: F,
|
|
126
|
+
clear: M,
|
|
127
|
+
setValue: p
|
|
128
|
+
}), (o, Q) => (d(), N("div", {
|
|
129
|
+
id: a(i)?.id.value,
|
|
130
|
+
class: U([a(C)(), a(S)])
|
|
130
131
|
}, [
|
|
131
|
-
(
|
|
132
|
+
(d(), O(R(b[e.type]), z(o.$attrs, {
|
|
132
133
|
ref_key: "uploadRef",
|
|
133
|
-
ref:
|
|
134
|
-
}),
|
|
135
|
-
|
|
136
|
-
name:
|
|
137
|
-
fn:
|
|
138
|
-
|
|
134
|
+
ref: s
|
|
135
|
+
}), j({ _: 2 }, [
|
|
136
|
+
A(Object.keys(o.$slots), (u) => ({
|
|
137
|
+
name: u,
|
|
138
|
+
fn: $((_) => [
|
|
139
|
+
k(o.$slots, u, B(T(_ || {})))
|
|
139
140
|
])
|
|
140
141
|
}))
|
|
141
142
|
]), 1040))
|
|
142
|
-
],
|
|
143
|
+
], 10, K));
|
|
143
144
|
}
|
|
144
145
|
});
|
|
145
146
|
export {
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Q, inject as a, ref as X, watch as Y, nextTick as Z, createElementBlock as U, openBlock as w, normalizeClass as ee, unref as s, createVNode as x, withCtx as k, createElementVNode as I, createTextVNode as oe, toDisplayString as M, withModifiers as te, createCommentVNode as ae, createBlock as se, resolveDynamicComponent as ne } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { getPath as
|
|
4
|
-
import { useOss as
|
|
5
|
-
import { message as c, Upload as
|
|
6
|
-
import { UploadOutlined as
|
|
7
|
-
import { fileMatchesAccept as
|
|
8
|
-
import
|
|
9
|
-
import { useGlobalConfig as
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
const
|
|
3
|
+
import { getPath as re, getName as le, getReturnData as S } from "../utils/returnData.mjs";
|
|
4
|
+
import { useOss as ie, getOssInstance as L } from "../hooks/useOss.mjs";
|
|
5
|
+
import { message as c, Upload as ue, Button as ce } from "@aplus-frontend/antdv";
|
|
6
|
+
import { UploadOutlined as pe, VerticalAlignBottomOutlined as de } from "@ant-design/icons-vue";
|
|
7
|
+
import { fileMatchesAccept as me, getAcceptText as fe } from "../utils/accept.mjs";
|
|
8
|
+
import ge from "../style/index.mjs";
|
|
9
|
+
import { useGlobalConfig as he } from "../../config-provider/hooks/use-global-config.mjs";
|
|
10
|
+
import { useLocale as ve } from "../../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as we } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
const xe = { class: "multiple-file-context" }, ye = { key: 0 }, Ce = { key: 1 }, Se = /* @__PURE__ */ Q({
|
|
13
13
|
__name: "MultipleFile",
|
|
14
|
-
setup(
|
|
15
|
-
const E =
|
|
14
|
+
setup(Ue, { expose: z }) {
|
|
15
|
+
const E = he(
|
|
16
16
|
"downloadCenterTriggerConfig"
|
|
17
|
-
), { t: r } =
|
|
18
|
-
|
|
17
|
+
), { t: r } = ve(), { b: B } = we("ap-upload-multiple-file"), O = ge("ap-upload"), { put: P } = ie(), D = a("dirName"), y = a("accept") || "*", N = a("maxSize") ?? 500, V = a("title") || r("ap.apUpload.uploadFile"), m = a("subTitle"), l = a("maxCount") ?? 10, p = a("uploadingCount"), _ = a("beforeUpload"), b = a("customRequest"), F = a("getOssAccess"), q = a("maxSizeErrorMsg"), j = a("maxCountErrorMsg"), $ = a("acceptErrorMsg"), T = a("onRemove"), C = a("showUploadErrorMsg"), n = a("value"), i = [], f = a("needName"), d = X(null);
|
|
18
|
+
Y(
|
|
19
19
|
() => n?.value,
|
|
20
20
|
function(e) {
|
|
21
|
-
!d?.value?.fileList?.length && e &&
|
|
21
|
+
!d?.value?.fileList?.length && e && A(e);
|
|
22
22
|
},
|
|
23
23
|
{ immediate: !0 }
|
|
24
24
|
);
|
|
25
|
-
function
|
|
25
|
+
function A(e) {
|
|
26
26
|
if (!e) {
|
|
27
27
|
u = [], d.value.fileList = [], n.value = void 0, i.splice(0, i.length);
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
Z(() => {
|
|
31
31
|
const o = e.map((t) => {
|
|
32
|
-
const h =
|
|
32
|
+
const h = re(f, t), K = le(f, t), v = new File(
|
|
33
33
|
[t],
|
|
34
|
-
|
|
34
|
+
K,
|
|
35
35
|
{}
|
|
36
36
|
);
|
|
37
37
|
return v.response = h, v.uid = h, v.status = "done", v;
|
|
@@ -52,8 +52,8 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
52
52
|
}), d.value.fileList = o, n.value = e;
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
let u = [],
|
|
55
|
+
z({ setValue: A });
|
|
56
|
+
let u = [], R;
|
|
57
57
|
function g(e) {
|
|
58
58
|
setTimeout(() => {
|
|
59
59
|
const o = d.value.fileList.findIndex(
|
|
@@ -62,32 +62,32 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
62
62
|
o >= 0 && d.value.fileList.splice(o, 1);
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
async function
|
|
65
|
+
async function G(e) {
|
|
66
66
|
if (l && l > 1 && u.length >= l)
|
|
67
|
-
return clearTimeout(
|
|
67
|
+
return clearTimeout(R), R = setTimeout(() => {
|
|
68
68
|
c.warning(
|
|
69
|
-
|
|
69
|
+
j || r("ap.apUpload.maxUploadFiles", {
|
|
70
70
|
maxCount: l
|
|
71
71
|
})
|
|
72
72
|
);
|
|
73
73
|
}), g(e), !1;
|
|
74
|
-
if (e.size >
|
|
74
|
+
if (e.size > N * 1024 * 1024)
|
|
75
75
|
return c.warning(
|
|
76
|
-
|
|
77
|
-
maxSize:
|
|
76
|
+
q || r("ap.apUpload.maxUploadFileSize", {
|
|
77
|
+
maxSize: N
|
|
78
78
|
})
|
|
79
79
|
), g(e), !1;
|
|
80
|
-
if (!
|
|
80
|
+
if (!me(e, y))
|
|
81
81
|
return c.warning(
|
|
82
|
-
|
|
82
|
+
$ || r("ap.apUpload.fileFormatNotSupported")
|
|
83
83
|
), g(e), !1;
|
|
84
|
-
if (typeof
|
|
84
|
+
if (typeof _ == "function" && await _(e) === !1)
|
|
85
85
|
return g(e), !1;
|
|
86
86
|
l && l === 1 && (u = [], n.value = void 0), u.push(e);
|
|
87
87
|
}
|
|
88
|
-
async function
|
|
89
|
-
if (p.value++, typeof
|
|
90
|
-
|
|
88
|
+
async function W(e) {
|
|
89
|
+
if (p.value++, typeof b == "function") {
|
|
90
|
+
b({
|
|
91
91
|
onProgress: (o) => {
|
|
92
92
|
setTimeout(() => {
|
|
93
93
|
e.onProgress({
|
|
@@ -108,7 +108,7 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
108
108
|
e.onSuccess(o);
|
|
109
109
|
}), n.value = [
|
|
110
110
|
...n.value || [],
|
|
111
|
-
|
|
111
|
+
S(f, o, e.file.name)
|
|
112
112
|
], i.push({
|
|
113
113
|
uid: e.file.uid,
|
|
114
114
|
path: o
|
|
@@ -119,15 +119,15 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
try {
|
|
122
|
-
const o = await
|
|
122
|
+
const o = await L(F);
|
|
123
123
|
e.file.oss = o, P({
|
|
124
124
|
file: e.file,
|
|
125
|
-
dirName:
|
|
125
|
+
dirName: D,
|
|
126
126
|
oss: o,
|
|
127
127
|
successCallBack(t) {
|
|
128
128
|
e.onSuccess(t), n.value = [
|
|
129
129
|
...n.value || [],
|
|
130
|
-
|
|
130
|
+
S(f, t, e.file.name)
|
|
131
131
|
], i.push({
|
|
132
132
|
uid: e.file.uid,
|
|
133
133
|
path: t
|
|
@@ -154,8 +154,8 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
154
154
|
}), p.value--;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
if (
|
|
157
|
+
function H(e) {
|
|
158
|
+
if (T && T?.(e), e.response) {
|
|
159
159
|
if (Array.isArray(n.value)) {
|
|
160
160
|
const t = i.findIndex((h) => h.uid === e.uid);
|
|
161
161
|
t >= 0 && (n?.value.splice(t, 1), i.splice(t, 1)), n.value.length === 0 && (n.value = void 0);
|
|
@@ -167,7 +167,7 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
167
167
|
);
|
|
168
168
|
return u.splice(o, 1), Promise.resolve(!0);
|
|
169
169
|
}
|
|
170
|
-
const
|
|
170
|
+
const J = async (e) => {
|
|
171
171
|
if (E.value?.trigger) {
|
|
172
172
|
let o = [e].map((t) => ({
|
|
173
173
|
objectName: t.response,
|
|
@@ -175,7 +175,7 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
175
175
|
}));
|
|
176
176
|
E.value?.trigger?.(o);
|
|
177
177
|
} else
|
|
178
|
-
(await
|
|
178
|
+
(await L(F)).downloadFile([
|
|
179
179
|
{
|
|
180
180
|
path: e.response,
|
|
181
181
|
fileName: e.name
|
|
@@ -183,13 +183,12 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
183
183
|
]);
|
|
184
184
|
};
|
|
185
185
|
return (e, o) => (w(), U("div", {
|
|
186
|
-
class:
|
|
187
|
-
[s(
|
|
188
|
-
[s(N)("admin")]: s(D) === "admin",
|
|
186
|
+
class: ee({
|
|
187
|
+
[s(B)()]: !0,
|
|
189
188
|
[s(O) ?? ""]: !0
|
|
190
189
|
})
|
|
191
190
|
}, [
|
|
192
|
-
x(s(
|
|
191
|
+
x(s(ue), {
|
|
193
192
|
ref_key: "uploadRef",
|
|
194
193
|
ref: d,
|
|
195
194
|
accept: s(y),
|
|
@@ -200,32 +199,32 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
200
199
|
showInfo: !1,
|
|
201
200
|
strokeColor: "#0070FF"
|
|
202
201
|
},
|
|
203
|
-
"before-upload":
|
|
204
|
-
"custom-request":
|
|
202
|
+
"before-upload": G,
|
|
203
|
+
"custom-request": W,
|
|
205
204
|
"show-upload-list": { showDownloadIcon: !0, showRemoveIcon: !0 },
|
|
206
|
-
onRemove:
|
|
207
|
-
onDownload:
|
|
205
|
+
onRemove: H,
|
|
206
|
+
onDownload: J
|
|
208
207
|
}, {
|
|
209
208
|
downloadIcon: k(() => [
|
|
210
|
-
x(s(
|
|
209
|
+
x(s(de))
|
|
211
210
|
]),
|
|
212
211
|
default: k(() => [
|
|
213
|
-
|
|
214
|
-
x(s(
|
|
212
|
+
I("div", xe, [
|
|
213
|
+
x(s(ce), { class: "file-btn" }, {
|
|
215
214
|
default: k(() => [
|
|
216
|
-
x(s(
|
|
217
|
-
|
|
215
|
+
x(s(pe)),
|
|
216
|
+
oe(" " + M(s(V)), 1)
|
|
218
217
|
]),
|
|
219
218
|
_: 1
|
|
220
219
|
}),
|
|
221
|
-
|
|
220
|
+
I("div", {
|
|
222
221
|
class: "sub-title",
|
|
223
|
-
onClick: o[0] || (o[0] =
|
|
222
|
+
onClick: o[0] || (o[0] = te(() => {
|
|
224
223
|
}, ["stop"]))
|
|
225
224
|
}, [
|
|
226
|
-
typeof s(m) == "string" ? (w(), U("div",
|
|
227
|
-
(w(), ne(
|
|
228
|
-
])) :
|
|
225
|
+
typeof s(m) == "string" ? (w(), U("div", ye, M(s(m) || `${s(r)("ap.apUpload.supportExtension")}:${s(fe)(s(y))}`), 1)) : s(m) ? (w(), U("div", Ce, [
|
|
226
|
+
(w(), se(ne(s(m))))
|
|
227
|
+
])) : ae("", !0)
|
|
229
228
|
])
|
|
230
229
|
])
|
|
231
230
|
]),
|
|
@@ -235,5 +234,5 @@ const ye = { class: "multiple-file-context" }, Ce = { key: 0 }, Ue = { key: 1 },
|
|
|
235
234
|
}
|
|
236
235
|
});
|
|
237
236
|
export {
|
|
238
|
-
|
|
237
|
+
Se as default
|
|
239
238
|
};
|