@aplus-frontend/ui 7.19.0-beta.1 → 7.19.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/src/ag-grid/context.mjs +1 -1
- package/es/src/ag-grid/editable/form-item.vue.d.ts +2 -4
- package/es/src/ag-grid/editable/form-item.vue.mjs +88 -77
- package/es/src/ag-grid/editable/index.vue.d.ts +2 -4
- package/es/src/ag-grid/editable/index.vue.mjs +9 -8
- package/es/src/ag-grid/editable/interface.d.ts +15 -1
- package/es/src/ag-grid/hooks/use-columns.mjs +31 -23
- package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
- package/es/src/ag-grid/index.vue.d.ts +2 -4
- package/es/src/ag-grid/index.vue.mjs +353 -335
- package/es/src/ag-grid/interface.d.ts +40 -1
- package/es/src/ag-grid/utils.d.ts +18 -0
- package/es/src/ag-grid/utils.mjs +39 -18
- package/es/src/ap-field/cascader/use-options.d.ts +4 -4
- package/es/src/ap-field/date/index.vue.d.ts +0 -1
- package/es/src/ap-field/date-range/index.vue.d.ts +0 -1
- package/es/src/ap-field/select/use-select-options.d.ts +2 -2
- package/es/src/ap-field/text/password.vue.d.ts +4 -4
- package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/es/src/ap-form/ap-form.vue.d.ts +1 -2
- package/es/src/ap-form/ap-form.vue2.mjs +63 -61
- package/es/src/ap-form/context.mjs +1 -1
- package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -4
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/item/index.vue.d.ts +6 -6
- package/es/src/ap-form/item-group/helper.mjs +2 -2
- package/es/src/ap-form/items/date/index.vue.d.ts +9 -11
- package/es/src/ap-form/items/date-range/index.vue.d.ts +13 -15
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -3
- package/es/src/ap-form/items/select/index.vue.d.ts +8 -8
- package/es/src/ap-form/modal-form/index.vue.d.ts +3 -4
- package/es/src/ap-form/provider/context.mjs +1 -1
- package/es/src/ap-form/search-form/index.vue.d.ts +3 -4
- package/es/src/ap-grid/editable/form-item.vue.d.ts +2 -4
- package/es/src/ap-grid/editable/index.vue.d.ts +2 -4
- package/es/src/ap-grid/index.vue.d.ts +2 -4
- package/es/src/ap-grid/utils/table.mjs +2 -2
- package/es/src/ap-list/index.vue.d.ts +2 -4
- package/es/src/ap-modal/utils/confirm.d.ts +1 -1
- package/es/src/ap-pro-card/components/card/index.vue2.mjs +2 -2
- package/es/src/ap-table/ap-table.vue.d.ts +2 -4
- package/es/src/ap-table/components/setting/context.d.ts +1 -1
- package/es/src/ap-table/components/setting/context.mjs +1 -1
- package/es/src/ap-table/components/setting/modal/index.vue.mjs +127 -117
- package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -3
- package/es/src/ap-table/constants.d.ts +20 -22
- package/es/src/ap-table/context.mjs +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +9 -9
- package/es/src/ap-table/hooks/use-table-template-storage.d.ts +9 -9
- package/es/src/ap-table/hooks/use-table-template-storage.mjs +102 -95
- package/es/src/ap-table/utils.mjs +1 -1
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
- package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/es/src/business/ap-download/hooks/index.mjs +1 -1
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +1 -3
- package/es/src/business/ap-draggable-grid/index.d.ts +1 -1
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
- package/es/src/business/ap-keep-alive/hook.mjs +1 -1
- package/es/src/business/ap-keep-alive/utils.mjs +1 -1
- package/es/src/business/ap-select-layout/index.d.ts +2 -4
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
- package/es/src/business/ap-table-modal/index.d.ts +17 -5
- package/es/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +128 -112
- package/es/src/business/ap-value-select-card/index.vue.d.ts +2 -4
- package/es/src/business/ap-view/ap-view.vue.d.ts +1 -1
- package/es/src/business/ap-view/ap-view.vue2.mjs +87 -81
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +2 -3
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
- package/es/src/business/ap-view/hooks/use-send-to-url.d.ts +2 -0
- package/es/src/business/ap-view/hooks/use-send-to-url.mjs +46 -30
- package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
- package/es/src/business/ap-view/index.d.ts +3 -3
- package/es/src/business/ap-view/interface.d.ts +7 -1
- package/es/src/check-card/context.mjs +1 -1
- package/es/src/config-provider/constants.mjs +1 -1
- package/es/src/config-provider/hooks/use-locale.mjs +1 -1
- package/es/src/config-provider/hooks/use-namespace.d.ts +5 -1
- package/es/src/config-provider/hooks/use-namespace.mjs +1 -1
- package/es/src/config-provider/hooks/use-token.mjs +1 -1
- package/es/src/editable-table/form-item.vue.d.ts +2 -4
- package/es/src/editable-table/index.vue.d.ts +2 -4
- package/es/src/editable-table/utils.mjs +1 -1
- package/es/src/scroll-view/index.vue.d.ts +5 -5
- package/es/src/tests/wrapper.d.ts +4 -4
- package/es/src/text/context.mjs +1 -1
- package/es/src/time-ago/useTimeAgo.mjs +1 -1
- package/es/src/type.d.ts +1 -0
- package/es/src/utils/slot.mjs +1 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.d.ts +2 -4
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.d.ts +2 -4
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/editable/interface.d.ts +15 -1
- package/lib/src/ag-grid/hooks/use-columns.js +1 -1
- package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
- package/lib/src/ag-grid/index.vue.d.ts +2 -4
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +40 -1
- package/lib/src/ag-grid/utils.d.ts +18 -0
- package/lib/src/ag-grid/utils.js +1 -1
- package/lib/src/ap-field/cascader/use-options.d.ts +4 -4
- package/lib/src/ap-field/date/index.vue.d.ts +0 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +0 -1
- package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
- package/lib/src/ap-field/text/password.vue.d.ts +4 -4
- package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -2
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -4
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/item/index.vue.d.ts +6 -6
- package/lib/src/ap-form/items/date/index.vue.d.ts +9 -11
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +13 -15
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -3
- package/lib/src/ap-form/items/select/index.vue.d.ts +8 -8
- package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -4
- package/lib/src/ap-form/search-form/index.vue.d.ts +3 -4
- package/lib/src/ap-grid/editable/form-item.vue.d.ts +2 -4
- package/lib/src/ap-grid/editable/index.vue.d.ts +2 -4
- package/lib/src/ap-grid/index.vue.d.ts +2 -4
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-list/index.vue.d.ts +2 -4
- package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +2 -4
- package/lib/src/ap-table/components/setting/context.d.ts +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -1
- package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -3
- package/lib/src/ap-table/constants.d.ts +20 -22
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +9 -9
- package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -1
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-draggable-grid/index.d.ts +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
- package/lib/src/business/ap-select-layout/index.d.ts +2 -4
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
- package/lib/src/business/ap-table-modal/index.d.ts +17 -5
- package/lib/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue.d.ts +2 -4
- package/lib/src/business/ap-view/ap-view.vue.d.ts +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +2 -3
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
- package/lib/src/business/ap-view/hooks/use-send-to-url.d.ts +2 -0
- package/lib/src/business/ap-view/hooks/use-send-to-url.js +1 -1
- package/lib/src/business/ap-view/index.d.ts +3 -3
- package/lib/src/business/ap-view/interface.d.ts +7 -1
- package/lib/src/config-provider/hooks/use-namespace.d.ts +5 -1
- package/lib/src/editable-table/form-item.vue.d.ts +2 -4
- package/lib/src/editable-table/index.vue.d.ts +2 -4
- package/lib/src/scroll-view/index.vue.d.ts +5 -5
- package/lib/src/tests/wrapper.d.ts +4 -4
- package/lib/src/time-ago/useTimeAgo.js +1 -1
- package/lib/src/type.d.ts +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { UploadOutlined as
|
|
3
|
-
import { message as
|
|
4
|
-
import { IconApAdLineDownload as
|
|
5
|
-
import { ApFilePreview as
|
|
1
|
+
import { defineComponent as ne, inject as s, ref as re, watch as ie, nextTick as le, createElementBlock as N, openBlock as g, normalizeClass as ce, unref as a, createVNode as h, withCtx as w, createElementVNode as D, createTextVNode as L, toDisplayString as U, withModifiers as ue, createCommentVNode as pe, createBlock as z, resolveDynamicComponent as B, createSlots as de } from "vue";
|
|
2
|
+
import { UploadOutlined as me } from "@ant-design/icons-vue";
|
|
3
|
+
import { message as d, Upload as fe, Button as we, Tooltip as ge } from "@aplus-frontend/antdv";
|
|
4
|
+
import { IconApAdLineDownload as he } from "@aplus-frontend/icon";
|
|
5
|
+
import { ApFilePreview as ve } from "../../ap-file-preview/index.mjs";
|
|
6
6
|
import "../../../config-provider/index.mjs";
|
|
7
|
-
import { randomStr as
|
|
8
|
-
import { useOss as
|
|
9
|
-
import
|
|
10
|
-
import { fileMatchesAccept as
|
|
11
|
-
import { getPath as
|
|
12
|
-
import { useGlobalConfig as
|
|
13
|
-
import { useLocale as
|
|
14
|
-
import { useNamespace as
|
|
15
|
-
const
|
|
7
|
+
import { randomStr as xe } from "../../../utils/index.mjs";
|
|
8
|
+
import { useOss as ye, getOssInstance as O } from "../hooks/useOss.mjs";
|
|
9
|
+
import ke from "../style/index.mjs";
|
|
10
|
+
import { fileMatchesAccept as be, getAcceptText as Ce } from "../utils/accept.mjs";
|
|
11
|
+
import { getPath as _e, getName as Ne, getReturnData as V } from "../utils/returnData.mjs";
|
|
12
|
+
import { useGlobalConfig as Ue } from "../../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
import { useLocale as Ee } from "../../../config-provider/hooks/use-locale.mjs";
|
|
14
|
+
import { useNamespace as Fe } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
15
|
+
const Ae = { class: "multiple-file-context" }, Te = { key: 0 }, Pe = { key: 1 }, He = /* @__PURE__ */ ne({
|
|
16
16
|
__name: "MultipleFile",
|
|
17
|
-
setup(
|
|
18
|
-
const E =
|
|
17
|
+
setup(Re, { expose: q }) {
|
|
18
|
+
const E = Ue(
|
|
19
19
|
"downloadCenterTriggerConfig"
|
|
20
|
-
), { t:
|
|
21
|
-
|
|
22
|
-
() =>
|
|
20
|
+
), { t: r } = Ee(), { b: j } = Fe("ap-upload-multiple-file"), $ = ke("ap-upload"), { put: G } = ye(), W = s("dirName"), H = s("baseDirName"), C = s("accept") || "*", F = s("maxSize") ?? 500, J = s("title") || r("ap.apUpload.uploadFile"), v = s("subTitle"), l = s("maxCount") ?? 10, m = s("uploadingCount"), A = s("beforeUpload"), T = s("customRequest"), x = s("getOssAccess"), K = s("maxSizeErrorMsg"), Q = s("maxCountErrorMsg"), X = s("acceptErrorMsg"), P = s("onRemove"), _ = s("showUploadErrorMsg"), R = s("bucket"), Y = s("showDownload") ?? !0, c = s("showPreview") ?? !0, i = s("value"), u = [], y = s("needName"), f = re(null);
|
|
21
|
+
ie(
|
|
22
|
+
() => i?.value,
|
|
23
23
|
function(e) {
|
|
24
|
-
!
|
|
24
|
+
!f?.value?.fileList?.length && e && I(e);
|
|
25
25
|
},
|
|
26
26
|
{ immediate: !0 }
|
|
27
27
|
);
|
|
28
28
|
function I(e) {
|
|
29
29
|
if (!e) {
|
|
30
|
-
|
|
30
|
+
p = [], f.value.fileList = [], i.value = void 0, u.splice(0, u.length);
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
le(() => {
|
|
34
34
|
const o = e.map((t) => {
|
|
35
|
-
const n =
|
|
35
|
+
const n = _e(y, t), M = Ne(y, t), b = new File(
|
|
36
36
|
[t],
|
|
37
37
|
M,
|
|
38
38
|
{}
|
|
39
39
|
);
|
|
40
|
-
return
|
|
40
|
+
return b.response = n, b.uid = xe(18), b.status = "done", b;
|
|
41
41
|
});
|
|
42
42
|
if (l && o.length > l) {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
d.warning(
|
|
44
|
+
r("ap.apUpload.fileInitializationException", {
|
|
45
45
|
maxCount: l
|
|
46
46
|
})
|
|
47
47
|
);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
o.forEach((t) => {
|
|
51
|
-
|
|
51
|
+
p.push(t), u.push({
|
|
52
52
|
uid: t.uid,
|
|
53
53
|
path: t.response
|
|
54
54
|
});
|
|
55
|
-
}),
|
|
55
|
+
}), f.value.fileList = o, i.value = e;
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
let
|
|
60
|
-
function
|
|
58
|
+
q({ setValue: I });
|
|
59
|
+
let p = [], S;
|
|
60
|
+
function k(e) {
|
|
61
61
|
setTimeout(() => {
|
|
62
|
-
const o =
|
|
62
|
+
const o = f.value.fileList.findIndex(
|
|
63
63
|
(t) => t.uid === e.uid
|
|
64
64
|
);
|
|
65
|
-
o >= 0 &&
|
|
65
|
+
o >= 0 && f.value.fileList.splice(o, 1);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
69
|
-
if (l && l > 1 &&
|
|
70
|
-
return clearTimeout(
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
async function Z(e) {
|
|
69
|
+
if (l && l > 1 && p.length >= l)
|
|
70
|
+
return clearTimeout(S), S = setTimeout(() => {
|
|
71
|
+
d.warning(
|
|
72
|
+
Q || r("ap.apUpload.maxUploadFiles", {
|
|
73
73
|
maxCount: l
|
|
74
74
|
})
|
|
75
75
|
);
|
|
76
|
-
}),
|
|
77
|
-
if (e.size >
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
maxSize:
|
|
76
|
+
}), k(e), !1;
|
|
77
|
+
if (e.size > F * 1024 * 1024)
|
|
78
|
+
return d.warning(
|
|
79
|
+
K || r("ap.apUpload.maxUploadFileSize", {
|
|
80
|
+
maxSize: F
|
|
81
81
|
})
|
|
82
|
-
),
|
|
83
|
-
if (!
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
),
|
|
87
|
-
if (typeof
|
|
88
|
-
return
|
|
89
|
-
l && l === 1 && (
|
|
82
|
+
), k(e), !1;
|
|
83
|
+
if (!be(e, C))
|
|
84
|
+
return d.warning(
|
|
85
|
+
X || r("ap.apUpload.fileFormatNotSupported")
|
|
86
|
+
), k(e), !1;
|
|
87
|
+
if (typeof A == "function" && await A(e) === !1)
|
|
88
|
+
return k(e), !1;
|
|
89
|
+
l && l === 1 && (p = [], i.value = void 0), p.push(e);
|
|
90
90
|
}
|
|
91
|
-
async function
|
|
92
|
-
if (m.value++, typeof
|
|
93
|
-
|
|
91
|
+
async function ee(e) {
|
|
92
|
+
if (m.value++, typeof T == "function") {
|
|
93
|
+
T({
|
|
94
94
|
onProgress: (o) => {
|
|
95
95
|
setTimeout(() => {
|
|
96
96
|
e.onProgress({
|
|
@@ -99,7 +99,7 @@ const Ee = { class: "multiple-file-context" }, _e = { key: 0 }, Fe = { key: 1 },
|
|
|
99
99
|
});
|
|
100
100
|
},
|
|
101
101
|
onError: (o) => {
|
|
102
|
-
|
|
102
|
+
_ && d.warning(o || r("ap.apUpload.networkAnomaly")), setTimeout(() => {
|
|
103
103
|
e.onError({
|
|
104
104
|
name: o,
|
|
105
105
|
message: o
|
|
@@ -109,10 +109,10 @@ const Ee = { class: "multiple-file-context" }, _e = { key: 0 }, Fe = { key: 1 },
|
|
|
109
109
|
onSuccess: (o) => {
|
|
110
110
|
setTimeout(() => {
|
|
111
111
|
e.onSuccess(o);
|
|
112
|
-
}),
|
|
113
|
-
...
|
|
114
|
-
|
|
115
|
-
],
|
|
112
|
+
}), i.value = [
|
|
113
|
+
...i.value || [],
|
|
114
|
+
V(y, o, e.file.name)
|
|
115
|
+
], u.push({
|
|
116
116
|
uid: e.file.uid,
|
|
117
117
|
path: o
|
|
118
118
|
}), m.value--;
|
|
@@ -122,22 +122,22 @@ const Ee = { class: "multiple-file-context" }, _e = { key: 0 }, Fe = { key: 1 },
|
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
try {
|
|
125
|
-
const o = await (
|
|
126
|
-
e.file.oss = t,
|
|
125
|
+
const o = await (R ? x(R) : x()), t = await O(async () => o);
|
|
126
|
+
e.file.oss = t, G({
|
|
127
127
|
file: e.file,
|
|
128
|
-
dirName:
|
|
128
|
+
dirName: W,
|
|
129
129
|
oss: t,
|
|
130
130
|
successCallBack(n) {
|
|
131
|
-
e.onSuccess(n),
|
|
132
|
-
...
|
|
133
|
-
|
|
134
|
-
],
|
|
131
|
+
e.onSuccess(n), i.value = [
|
|
132
|
+
...i.value || [],
|
|
133
|
+
V(y, n, e.file.name)
|
|
134
|
+
], u.push({
|
|
135
135
|
uid: e.file.uid,
|
|
136
136
|
path: n
|
|
137
137
|
}), m.value--;
|
|
138
138
|
},
|
|
139
139
|
errorCallBack(n) {
|
|
140
|
-
|
|
140
|
+
_ && d.warning(n || r("ap.apUpload.networkAnomaly")), e.onError({
|
|
141
141
|
name: n,
|
|
142
142
|
message: n
|
|
143
143
|
}), m.value--;
|
|
@@ -147,32 +147,32 @@ const Ee = { class: "multiple-file-context" }, _e = { key: 0 }, Fe = { key: 1 },
|
|
|
147
147
|
percent: n
|
|
148
148
|
});
|
|
149
149
|
},
|
|
150
|
-
baseDirName:
|
|
150
|
+
baseDirName: H,
|
|
151
151
|
bucket: o?.bucket
|
|
152
152
|
});
|
|
153
153
|
} catch (o) {
|
|
154
|
-
|
|
155
|
-
typeof o?.message == "string" ? o.message :
|
|
154
|
+
_ && d.warning(
|
|
155
|
+
typeof o?.message == "string" ? o.message : r("ap.apUpload.networkAnomaly")
|
|
156
156
|
), e.onError({
|
|
157
|
-
name: o?.message ||
|
|
158
|
-
message: o?.message ||
|
|
157
|
+
name: o?.message || r("ap.apUpload.networkAnomaly"),
|
|
158
|
+
message: o?.message || r("ap.apUpload.networkAnomaly")
|
|
159
159
|
}), m.value--;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function oe(e) {
|
|
163
163
|
if (P && P?.(e), e.response) {
|
|
164
|
-
if (Array.isArray(
|
|
165
|
-
const t =
|
|
166
|
-
t >= 0 && (
|
|
164
|
+
if (Array.isArray(i.value)) {
|
|
165
|
+
const t = u.findIndex((n) => n.uid === e.uid);
|
|
166
|
+
t >= 0 && (i?.value.splice(t, 1), u.splice(t, 1)), i.value.length === 0 && (i.value = void 0);
|
|
167
167
|
}
|
|
168
168
|
} else
|
|
169
169
|
e?.oss?.pauseUpload();
|
|
170
|
-
const o =
|
|
170
|
+
const o = p.findIndex(
|
|
171
171
|
(t) => t.uid === e.uid
|
|
172
172
|
);
|
|
173
|
-
return
|
|
173
|
+
return p.splice(o, 1), Promise.resolve(!0);
|
|
174
174
|
}
|
|
175
|
-
const
|
|
175
|
+
const te = async (e) => {
|
|
176
176
|
if (E.value?.trigger) {
|
|
177
177
|
let o = [e].map((t) => ({
|
|
178
178
|
objectName: t.response,
|
|
@@ -181,8 +181,8 @@ const Ee = { class: "multiple-file-context" }, _e = { key: 0 }, Fe = { key: 1 },
|
|
|
181
181
|
E.value?.trigger?.(o);
|
|
182
182
|
} else {
|
|
183
183
|
const o = e.response?.match(/^([^:]+):(.*)$/), t = o?.[1], n = o?.[2] ?? e.response;
|
|
184
|
-
(await
|
|
185
|
-
() => t ?
|
|
184
|
+
(await O(
|
|
185
|
+
() => t ? x?.(t) : x?.()
|
|
186
186
|
)).downloadFile([
|
|
187
187
|
{
|
|
188
188
|
path: n,
|
|
@@ -190,22 +190,22 @@ const Ee = { class: "multiple-file-context" }, _e = { key: 0 }, Fe = { key: 1 },
|
|
|
190
190
|
}
|
|
191
191
|
]);
|
|
192
192
|
}
|
|
193
|
-
},
|
|
194
|
-
(typeof
|
|
193
|
+
}, se = (e) => {
|
|
194
|
+
(typeof c == "function" ? c(e) : c) && ve.createFilePreviewModal({
|
|
195
195
|
src: e.response,
|
|
196
196
|
fileName: e.name
|
|
197
197
|
});
|
|
198
|
-
};
|
|
199
|
-
return (e, o) => (
|
|
200
|
-
class:
|
|
201
|
-
[a(
|
|
202
|
-
[a(
|
|
198
|
+
}, ae = (e) => (typeof c == "function" ? c(e) : c) ? ["done"].includes(e.status) : !1;
|
|
199
|
+
return (e, o) => (g(), N("div", {
|
|
200
|
+
class: ce({
|
|
201
|
+
[a(j)()]: !0,
|
|
202
|
+
[a($) ?? ""]: !0
|
|
203
203
|
})
|
|
204
204
|
}, [
|
|
205
|
-
|
|
205
|
+
h(a(fe), {
|
|
206
206
|
ref_key: "uploadRef",
|
|
207
|
-
ref:
|
|
208
|
-
accept: a(
|
|
207
|
+
ref: f,
|
|
208
|
+
accept: a(C),
|
|
209
209
|
multiple: "",
|
|
210
210
|
"max-count": a(l),
|
|
211
211
|
progress: {
|
|
@@ -213,37 +213,53 @@ const Ee = { class: "multiple-file-context" }, _e = { key: 0 }, Fe = { key: 1 },
|
|
|
213
213
|
showInfo: !1,
|
|
214
214
|
strokeColor: "#0070FF"
|
|
215
215
|
},
|
|
216
|
-
"before-upload":
|
|
217
|
-
"custom-request":
|
|
216
|
+
"before-upload": Z,
|
|
217
|
+
"custom-request": ee,
|
|
218
218
|
"show-upload-list": {
|
|
219
|
-
showDownloadIcon: a(
|
|
219
|
+
showDownloadIcon: a(Y),
|
|
220
220
|
showRemoveIcon: !0,
|
|
221
|
-
showPreviewIcon: a(
|
|
221
|
+
showPreviewIcon: a(c)
|
|
222
222
|
},
|
|
223
|
-
onPreview:
|
|
224
|
-
onRemove:
|
|
225
|
-
onDownload:
|
|
223
|
+
onPreview: se,
|
|
224
|
+
onRemove: oe,
|
|
225
|
+
onDownload: te
|
|
226
226
|
}, {
|
|
227
|
-
downloadIcon:
|
|
228
|
-
|
|
227
|
+
downloadIcon: w(() => [
|
|
228
|
+
h(a(he), { class: "anticon anticon-vertical-align-bottom" })
|
|
229
229
|
]),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
230
|
+
itemRender: w(({ originNode: t, file: n }) => [
|
|
231
|
+
h(a(ge), null, de({
|
|
232
|
+
default: w(() => [
|
|
233
|
+
(g(), z(B(t)))
|
|
234
|
+
]),
|
|
235
|
+
_: 2
|
|
236
|
+
}, [
|
|
237
|
+
ae(n) ? {
|
|
238
|
+
name: "title",
|
|
239
|
+
fn: w(() => [
|
|
240
|
+
L(U(a(r)("ap.apAppendix.previewFile")), 1)
|
|
241
|
+
]),
|
|
242
|
+
key: "0"
|
|
243
|
+
} : void 0
|
|
244
|
+
]), 1024)
|
|
245
|
+
]),
|
|
246
|
+
default: w(() => [
|
|
247
|
+
D("div", Ae, [
|
|
248
|
+
h(a(we), { class: "file-btn" }, {
|
|
249
|
+
default: w(() => [
|
|
250
|
+
h(a(me)),
|
|
251
|
+
L(" " + U(a(J)), 1)
|
|
236
252
|
]),
|
|
237
253
|
_: 1
|
|
238
254
|
}),
|
|
239
|
-
|
|
255
|
+
D("div", {
|
|
240
256
|
class: "sub-title",
|
|
241
|
-
onClick: o[0] || (o[0] =
|
|
257
|
+
onClick: o[0] || (o[0] = ue(() => {
|
|
242
258
|
}, ["stop"]))
|
|
243
259
|
}, [
|
|
244
|
-
typeof a(
|
|
245
|
-
(
|
|
246
|
-
])) :
|
|
260
|
+
typeof a(v) == "string" ? (g(), N("div", Te, U(a(v) || `${a(r)("ap.apUpload.supportExtension")}:${a(Ce)(a(C))}`), 1)) : a(v) ? (g(), N("div", Pe, [
|
|
261
|
+
(g(), z(B(a(v))))
|
|
262
|
+
])) : pe("", !0)
|
|
247
263
|
])
|
|
248
264
|
])
|
|
249
265
|
]),
|
|
@@ -253,5 +269,5 @@ const Ee = { class: "multiple-file-context" }, _e = { key: 0 }, Fe = { key: 1 },
|
|
|
253
269
|
}
|
|
254
270
|
});
|
|
255
271
|
export {
|
|
256
|
-
|
|
272
|
+
He as default
|
|
257
273
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApValueSelectCardProps, ApValueSelectCardOption } from './interface';
|
|
2
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, ComputedRef, VNode
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, ComputedRef, VNode } from 'vue';
|
|
3
3
|
declare const _default: <T extends Record<string, any> = Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly onChange?: ((keys: (string | number)[]) => any) | undefined;
|
|
@@ -45,9 +45,7 @@ declare const _default: <T extends Record<string, any> = Record<string, any>>(__
|
|
|
45
45
|
(e: "remove", key: string | number): void;
|
|
46
46
|
(e: "highlight", keys: (string | number)[]): void;
|
|
47
47
|
};
|
|
48
|
-
}>) => VNode
|
|
49
|
-
[key: string]: any;
|
|
50
|
-
}> & {
|
|
48
|
+
}>) => VNode & {
|
|
51
49
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
52
50
|
};
|
|
53
51
|
export default _default;
|
|
@@ -4,7 +4,7 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
4
4
|
declare const _default: DefineComponent<ApViewProps, {
|
|
5
5
|
setFirstDefaultSystemView: (value: boolean) => void;
|
|
6
6
|
setInitToUrl: (value: boolean) => void;
|
|
7
|
-
|
|
7
|
+
getMountedData: () => Recordable;
|
|
8
8
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApViewProps> & Readonly<{}>, {
|
|
9
9
|
manual: boolean;
|
|
10
10
|
maxViewNum: number;
|