@aplus-frontend/ui 6.34.0 → 6.35.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/src/ag-grid/components/tooltip/index.vue2.mjs +1 -1
- package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
- package/es/src/ag-grid/index.vue.mjs +77 -72
- package/es/src/ag-grid/interface.d.ts +5 -1
- package/es/src/ap-form/ap-form.vue.d.ts +2 -6
- package/es/src/ap-form/ap-form.vue2.mjs +71 -69
- package/es/src/ap-form/item/index.vue.mjs +13 -12
- package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
- package/es/src/ap-grid/editable/index.vue.mjs +94 -91
- package/es/src/ap-grid/index.vue.mjs +74 -69
- package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue2.mjs +72 -69
- package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
- package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
- package/es/src/business/ap-copy/ApCopy.mjs +5 -6
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
- package/es/src/business/ap-label/ApLabel.d.ts +1 -1
- package/es/src/business/ap-label/index.d.ts +3 -3
- package/es/src/business/hooks/useKeepAliveFlag.d.ts +3 -0
- package/es/src/business/hooks/useKeepAliveFlag.mjs +10 -7
- package/es/src/business/hooks/usePageListAgGrid.d.ts +1 -2
- package/es/src/business/hooks/usePageListAgGrid.mjs +29 -38
- package/es/src/business/hooks/usePageListApTable.mjs +10 -9
- package/es/src/editable-table/form-item.vue.mjs +75 -72
- package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
- package/es/src/editable-table/index.vue.mjs +68 -65
- package/es/src/utils/warning.d.ts +25 -0
- package/es/src/utils/warning.mjs +74 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
- package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +5 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-copy/ApCopy.js +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
- package/lib/src/business/ap-label/index.d.ts +3 -3
- package/lib/src/business/hooks/useKeepAliveFlag.d.ts +3 -0
- package/lib/src/business/hooks/useKeepAliveFlag.js +1 -1
- package/lib/src/business/hooks/usePageListAgGrid.d.ts +1 -2
- package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/utils/warning.d.ts +25 -0
- package/lib/src/utils/warning.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ne, inject as o, ref as g, watch as le, computed as se, createElementBlock as x, openBlock as h, normalizeClass as re, unref as t, createElementVNode as r, createCommentVNode as z, toDisplayString as A, normalizeStyle as ie, createBlock as ce, withModifiers as ue, createVNode as pe } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { getName as
|
|
4
|
-
import { useOss as
|
|
5
|
-
import { fileMatchesAccept as
|
|
6
|
-
import { message as c, Progress as
|
|
7
|
-
import { DeleteOutlined as
|
|
8
|
-
import
|
|
9
|
-
import { useLocale as
|
|
3
|
+
import { getName as de, getReturnData as q } from "../utils/returnData.mjs";
|
|
4
|
+
import { useOss as ve, useOssInit as fe } from "../hooks/useOss.mjs";
|
|
5
|
+
import { fileMatchesAccept as me, getAcceptText as ge } from "../utils/accept.mjs";
|
|
6
|
+
import { message as c, Progress as he } from "@aplus-frontend/antdv";
|
|
7
|
+
import { DeleteOutlined as _e } from "@ant-design/icons-vue";
|
|
8
|
+
import I from "../assets/single-file-icon.png.mjs";
|
|
9
|
+
import { useLocale as ke } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
10
|
import { useNamespace as ye } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
-
const De = ["accept"],
|
|
11
|
+
const De = ["accept"], we = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "state-un"
|
|
14
|
-
},
|
|
14
|
+
}, Ue = ["src"], Fe = { class: "state-un-title" }, Ce = { class: "state-un-subtitle" }, Ee = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "state-ing"
|
|
17
|
-
},
|
|
17
|
+
}, Se = { class: "left" }, Ne = ["src"], xe = { class: "center" }, ze = { class: "center-progress" }, qe = /* @__PURE__ */ ne({
|
|
18
18
|
__name: "SingleFile",
|
|
19
|
-
setup(
|
|
20
|
-
const { t: s } =
|
|
21
|
-
|
|
19
|
+
setup(Ae, { expose: j }) {
|
|
20
|
+
const { t: s } = ke(), { b: _ } = ye("ap-upload-single-file"), { put: G, client: b } = ve(), k = o("theme"), W = o("dirName"), y = o("accept") || "*", D = o("maxSize") ?? 500, H = o("title") || s("ap.apUpload.clickOrDragUpload"), w = o("subTitle"), i = o("value"), U = o("needName"), u = o("uploadingCount"), R = o("beforeUpload"), B = o("customRequest"), J = o("getOssAccess"), K = o("maxSizeErrorMsg"), Q = o("acceptErrorMsg"), M = o("onRemove"), F = o("showUploadErrorMsg"), n = g(null);
|
|
21
|
+
le(
|
|
22
22
|
() => i?.value,
|
|
23
23
|
function(e) {
|
|
24
|
-
n.value === null && e &&
|
|
24
|
+
n.value === null && e && O(e);
|
|
25
25
|
},
|
|
26
26
|
{ immediate: !0 }
|
|
27
27
|
);
|
|
28
|
-
function
|
|
28
|
+
function O(e) {
|
|
29
29
|
e ? setTimeout(() => {
|
|
30
|
-
const a =
|
|
30
|
+
const a = de(U, e);
|
|
31
31
|
l.value = 3, n.value = new File([e], a, {}), i.value = e;
|
|
32
32
|
}) : (l.value = 1, n.value = null, i.value = void 0);
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
const l =
|
|
36
|
-
function
|
|
37
|
-
l.value === 1 &&
|
|
34
|
+
j({ setValue: O });
|
|
35
|
+
const l = g(1), d = g(0), v = g(null), P = se(() => n.value && i?.value);
|
|
36
|
+
function X() {
|
|
37
|
+
l.value === 1 && v.value?.click();
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function T(e) {
|
|
40
40
|
e.preventDefault(), e.stopPropagation();
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Y(e) {
|
|
43
43
|
e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
45
|
+
function Z(e) {
|
|
46
|
+
L(e);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function ee(e) {
|
|
49
49
|
if (e.preventDefault(), e.stopPropagation(), l.value !== 1)
|
|
50
50
|
return;
|
|
51
|
-
var a = e.dataTransfer,
|
|
51
|
+
var a = e.dataTransfer, f = [], V = 0, $ = a.files.length;
|
|
52
52
|
function p() {
|
|
53
|
-
|
|
53
|
+
V === $ - 1 && Z(f), V++;
|
|
54
54
|
}
|
|
55
55
|
if (a.items !== void 0)
|
|
56
|
-
for (var
|
|
57
|
-
var
|
|
58
|
-
if (
|
|
59
|
-
var
|
|
60
|
-
|
|
56
|
+
for (var C = 0; C < a.items.length; C++) {
|
|
57
|
+
var E = a.items[C];
|
|
58
|
+
if (E.kind === "file" && E.webkitGetAsEntry().isFile) {
|
|
59
|
+
var oe = E.getAsFile();
|
|
60
|
+
f.push(oe), p();
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
else
|
|
64
|
-
for (let
|
|
65
|
-
var
|
|
66
|
-
if (
|
|
67
|
-
|
|
64
|
+
for (let N = 0; N < $; N++) {
|
|
65
|
+
var m = a.files[N];
|
|
66
|
+
if (m.type)
|
|
67
|
+
f.push(m), p();
|
|
68
68
|
else
|
|
69
69
|
try {
|
|
70
|
-
var
|
|
71
|
-
|
|
70
|
+
var S = new FileReader();
|
|
71
|
+
S.readAsDataURL(m.slice(0, 3)), S.addEventListener(
|
|
72
72
|
"load",
|
|
73
|
-
function(
|
|
74
|
-
|
|
73
|
+
function() {
|
|
74
|
+
f.push(m), p();
|
|
75
75
|
},
|
|
76
76
|
!1
|
|
77
|
-
),
|
|
77
|
+
), S.addEventListener(
|
|
78
78
|
"error",
|
|
79
|
-
function(
|
|
80
|
-
|
|
79
|
+
function() {
|
|
80
|
+
c.warning(s("ap.apUpload.foldersNotSupported")), p();
|
|
81
81
|
},
|
|
82
82
|
!1
|
|
83
83
|
);
|
|
84
|
-
} catch
|
|
85
|
-
|
|
84
|
+
} catch {
|
|
85
|
+
c.warning(s("ap.apUpload.foldersNotSupported")), p();
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
async function
|
|
89
|
+
async function ae(e) {
|
|
90
90
|
const a = e.target;
|
|
91
|
-
await
|
|
91
|
+
await L(a?.files), v.value && (v.value.value = "");
|
|
92
92
|
}
|
|
93
|
-
async function
|
|
93
|
+
async function L(e) {
|
|
94
94
|
if (e?.length) {
|
|
95
95
|
if (e[0].size > D * 1024 * 1024) {
|
|
96
96
|
c.warning(
|
|
97
|
-
|
|
97
|
+
K || s("ap.apUpload.maxUploadFileSize", {
|
|
98
98
|
maxSize: D
|
|
99
99
|
})
|
|
100
100
|
);
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
if (!
|
|
103
|
+
if (!me(e[0], y)) {
|
|
104
104
|
c.warning(
|
|
105
|
-
|
|
105
|
+
Q || s("ap.apUpload.fileFormatNotSupported")
|
|
106
106
|
);
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
if (typeof
|
|
109
|
+
if (typeof R == "function" && await R(e[0]) === !1)
|
|
110
110
|
return;
|
|
111
|
-
if (n.value = e[0], l.value = 2,
|
|
112
|
-
|
|
111
|
+
if (n.value = e[0], l.value = 2, d.value = 0, u.value++, typeof B == "function") {
|
|
112
|
+
B({
|
|
113
113
|
onProgress: (a) => {
|
|
114
|
-
|
|
114
|
+
d.value = a;
|
|
115
115
|
},
|
|
116
116
|
onError: (a) => {
|
|
117
|
-
|
|
117
|
+
F && c.warning(a || s("ap.apUpload.networkAnomaly")), l.value = 1, n.value = null, u.value--;
|
|
118
118
|
},
|
|
119
119
|
onSuccess: (a) => {
|
|
120
|
-
i.value =
|
|
121
|
-
|
|
120
|
+
i.value = q(
|
|
121
|
+
U,
|
|
122
122
|
a,
|
|
123
123
|
n.value.name
|
|
124
124
|
), l.value = 3, u.value--;
|
|
@@ -128,98 +128,98 @@ const De = ["accept"], Ue = {
|
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
try {
|
|
131
|
-
await
|
|
131
|
+
await fe(J), G({
|
|
132
132
|
file: n.value,
|
|
133
|
-
dirName:
|
|
134
|
-
oss:
|
|
133
|
+
dirName: W,
|
|
134
|
+
oss: b,
|
|
135
135
|
successCallBack(a) {
|
|
136
|
-
i.value =
|
|
137
|
-
|
|
136
|
+
i.value = q(
|
|
137
|
+
U,
|
|
138
138
|
a,
|
|
139
139
|
n.value.name
|
|
140
140
|
), l.value = 3, u.value--;
|
|
141
141
|
},
|
|
142
142
|
errorCallBack(a) {
|
|
143
|
-
|
|
143
|
+
F && c.warning(a || s("ap.apUpload.networkAnomaly")), l.value = 1, n.value = null, u.value--;
|
|
144
144
|
},
|
|
145
145
|
progressCallBack(a) {
|
|
146
|
-
|
|
146
|
+
d.value = a;
|
|
147
147
|
}
|
|
148
148
|
});
|
|
149
149
|
} catch (a) {
|
|
150
|
-
|
|
150
|
+
F && c.warning(
|
|
151
151
|
typeof a?.message == "string" ? a.message : s("ap.apUpload.networkAnomaly")
|
|
152
152
|
), l.value = 1, n.value = null, u.value--;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
|
|
156
|
+
function te() {
|
|
157
|
+
M && M?.(n.value), n.value && !i?.value && b.pauseUpload(), l.value = 1, n.value = null, i.value = void 0;
|
|
158
158
|
}
|
|
159
|
-
return (e, a) => (
|
|
160
|
-
class:
|
|
161
|
-
[t(
|
|
162
|
-
[t(
|
|
163
|
-
[t(
|
|
159
|
+
return (e, a) => (h(), x("div", {
|
|
160
|
+
class: re({
|
|
161
|
+
[t(_)()]: !0,
|
|
162
|
+
[t(_)("admin")]: t(k) === "admin",
|
|
163
|
+
[t(_)("un")]: l.value === 1
|
|
164
164
|
}),
|
|
165
|
-
onClick:
|
|
166
|
-
onDragenter:
|
|
167
|
-
onDragover:
|
|
168
|
-
onDragleave:
|
|
169
|
-
onDrop:
|
|
165
|
+
onClick: X,
|
|
166
|
+
onDragenter: T,
|
|
167
|
+
onDragover: Y,
|
|
168
|
+
onDragleave: T,
|
|
169
|
+
onDrop: ee
|
|
170
170
|
}, [
|
|
171
171
|
r("input", {
|
|
172
172
|
ref_key: "fileRef",
|
|
173
|
-
ref:
|
|
173
|
+
ref: v,
|
|
174
174
|
style: { display: "none" },
|
|
175
175
|
type: "file",
|
|
176
176
|
accept: t(y),
|
|
177
|
-
onChange:
|
|
177
|
+
onChange: ae
|
|
178
178
|
}, null, 40, De),
|
|
179
|
-
l.value === 1 ? (
|
|
179
|
+
l.value === 1 ? (h(), x("div", we, [
|
|
180
180
|
r("img", {
|
|
181
181
|
class: "state-un-icon",
|
|
182
|
-
src: t(
|
|
183
|
-
}, null, 8,
|
|
184
|
-
r("div",
|
|
185
|
-
r("div",
|
|
182
|
+
src: t(I)
|
|
183
|
+
}, null, 8, Ue),
|
|
184
|
+
r("div", Fe, A(t(H)), 1),
|
|
185
|
+
r("div", Ce, A(typeof t(w) == "string" && t(w).length > 0 ? t(w) : `${t(s)("ap.apUpload.supportExtension")}:${t(ge)(
|
|
186
186
|
t(y)
|
|
187
187
|
)},${t(s)("ap.apUpload.maxWarnUploadFileSize", {
|
|
188
188
|
maxSize: t(D)
|
|
189
189
|
})}`), 1)
|
|
190
|
-
])) :
|
|
191
|
-
[2, 3].includes(l.value) ? (
|
|
192
|
-
r("div",
|
|
193
|
-
r("img", { src: t(
|
|
190
|
+
])) : z("", !0),
|
|
191
|
+
[2, 3].includes(l.value) ? (h(), x("div", Ee, [
|
|
192
|
+
r("div", Se, [
|
|
193
|
+
r("img", { src: t(I) }, null, 8, Ne)
|
|
194
194
|
]),
|
|
195
|
-
r("div",
|
|
195
|
+
r("div", xe, [
|
|
196
196
|
r("div", {
|
|
197
197
|
class: "center-title",
|
|
198
|
-
style:
|
|
199
|
-
color:
|
|
198
|
+
style: ie({
|
|
199
|
+
color: P.value ? "#0070FF" : "#182948"
|
|
200
200
|
})
|
|
201
|
-
},
|
|
202
|
-
r("div",
|
|
203
|
-
|
|
201
|
+
}, A(n.value?.name), 5),
|
|
202
|
+
r("div", ze, [
|
|
203
|
+
P.value ? z("", !0) : (h(), ce(t(he), {
|
|
204
204
|
key: 0,
|
|
205
|
-
percent:
|
|
205
|
+
percent: d.value,
|
|
206
206
|
size: 4,
|
|
207
207
|
"show-info": !1,
|
|
208
|
-
"trail-color": t(
|
|
209
|
-
"stroke-color": t(
|
|
208
|
+
"trail-color": t(k) === "admin" ? "#D9D9D9" : "#DEE4ED",
|
|
209
|
+
"stroke-color": t(k) === "admin" ? "#34B77C" : "#0070FF"
|
|
210
210
|
}, null, 8, ["percent", "trail-color", "stroke-color"]))
|
|
211
211
|
])
|
|
212
212
|
]),
|
|
213
213
|
r("div", {
|
|
214
214
|
class: "right",
|
|
215
|
-
onClick:
|
|
215
|
+
onClick: ue(te, ["stop"])
|
|
216
216
|
}, [
|
|
217
|
-
|
|
217
|
+
pe(t(_e))
|
|
218
218
|
])
|
|
219
|
-
])) :
|
|
219
|
+
])) : z("", !0)
|
|
220
220
|
], 34));
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
export {
|
|
224
|
-
|
|
224
|
+
qe as default
|
|
225
225
|
};
|
|
@@ -2,28 +2,29 @@ import { defineComponent as M, ref as C, useSlots as U, computed as n, cloneVNod
|
|
|
2
2
|
import { Tooltip as B, Popover as G } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
4
|
import { ApAttachmentProps as H } from "./constans.mjs";
|
|
5
|
-
import { getHexWithOpacity as R, getFileInfo as
|
|
5
|
+
import { getHexWithOpacity as R, getFileInfo as w } from "../../ap-download/utils/getFileInfo.mjs";
|
|
6
6
|
import { useOssInit as W } from "../../ap-download/hooks/index.mjs";
|
|
7
7
|
import { debounce as q, isArray as D } from "lodash-unified";
|
|
8
8
|
import { LoadingOutlined as v } from "@ant-design/icons-vue";
|
|
9
|
-
import {
|
|
9
|
+
import { warning as E } from "../../utils/warning.mjs";
|
|
10
|
+
import { useNamespace as J } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
11
|
import { useGlobalConfig as g } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
|
-
import { useLocale as
|
|
12
|
-
const
|
|
12
|
+
import { useLocale as Q } from "../../config-provider/hooks/use-locale.mjs";
|
|
13
|
+
const se = /* @__PURE__ */ M({
|
|
13
14
|
name: "ApAttachment",
|
|
14
15
|
props: H(),
|
|
15
16
|
setup(e) {
|
|
16
17
|
const {
|
|
17
|
-
b:
|
|
18
|
+
b: y,
|
|
18
19
|
e: l
|
|
19
|
-
} =
|
|
20
|
+
} = J("ap-attachment"), F = g("uiMode"), b = g("apUpload"), h = g("downloadCenterTriggerConfig"), {
|
|
20
21
|
lang: O,
|
|
21
22
|
t: r
|
|
22
|
-
} =
|
|
23
|
+
} = Q(), i = C(!1), c = C(""), m = U(), T = n(() => O.value === "zh-cn" ? "zh_CN" : "en_US"), u = n(() => e.attachmentList.length === 1), p = n(() => e.needName ? e.attachmentList.length > 0 && e.needName && e.needName.nameKey ? e.attachmentList[0][e.needName.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), x = n(() => u.value ? p.value : r("ap.apAttachment.downloadall")), N = n(() => e.color ? e.color : F.value === "aplus" ? "#0070FF" : "#1890FF"), P = n(() => ({
|
|
23
24
|
width: u.value ? "auto" : "266px"
|
|
24
25
|
})), A = n(() => ({
|
|
25
|
-
"--download-main-color":
|
|
26
|
-
"--download-main-color-opacity": R(
|
|
26
|
+
"--download-main-color": N.value,
|
|
27
|
+
"--download-main-color-opacity": R(N.value, 0.6)
|
|
27
28
|
})), k = n(() => e.getOssAccess || b.value?.getOssAccess), S = n(() => {
|
|
28
29
|
const a = m.default ? m.default()[0] : null;
|
|
29
30
|
return a ? _(a, {
|
|
@@ -37,15 +38,15 @@ const ie = /* @__PURE__ */ M({
|
|
|
37
38
|
try {
|
|
38
39
|
const o = D(f(a)) ? f(a) : [f(a)];
|
|
39
40
|
if (h.value?.trigger) {
|
|
40
|
-
const I =
|
|
41
|
+
const I = w(e.needName, o).map((L) => ({
|
|
41
42
|
objectName: L.path,
|
|
42
43
|
fileName: L.fileName
|
|
43
44
|
}));
|
|
44
45
|
h.value?.trigger(I);
|
|
45
46
|
} else
|
|
46
|
-
await (await W(k.value, j(T))).downloadFile(
|
|
47
|
+
await (await W(k.value, j(T))).downloadFile(w(e.needName, o));
|
|
47
48
|
} catch (o) {
|
|
48
|
-
|
|
49
|
+
E(!1, o);
|
|
49
50
|
} finally {
|
|
50
51
|
i.value = !1, c.value = "";
|
|
51
52
|
}
|
|
@@ -70,7 +71,7 @@ const ie = /* @__PURE__ */ M({
|
|
|
70
71
|
spin: !0
|
|
71
72
|
}, null)]) : null, r("ap.apAttachment.downloadall")])]) : null;
|
|
72
73
|
return () => e.attachmentList?.length > 0 && t("div", {
|
|
73
|
-
class: [
|
|
74
|
+
class: [y()],
|
|
74
75
|
style: [P.value, A.value]
|
|
75
76
|
}, [t(B, {
|
|
76
77
|
title: x.value,
|
|
@@ -88,7 +89,7 @@ const ie = /* @__PURE__ */ M({
|
|
|
88
89
|
class: [l("text-render")]
|
|
89
90
|
}, [S.value, K(" ")]) : null, t("div", {
|
|
90
91
|
class: [l("text-inner")]
|
|
91
|
-
}, [
|
|
92
|
+
}, [p.value])])]
|
|
92
93
|
}), t(G, {
|
|
93
94
|
content: V(e.attachmentList),
|
|
94
95
|
placement: e.fileMorePopoverPlacement,
|
|
@@ -101,5 +102,5 @@ const ie = /* @__PURE__ */ M({
|
|
|
101
102
|
}
|
|
102
103
|
});
|
|
103
104
|
export {
|
|
104
|
-
|
|
105
|
+
se as default
|
|
105
106
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, Text as f, isVNode as y, computed as m, createVNode as r, Fragment as k } from "vue";
|
|
2
2
|
import { ApCopyProps as T } from "./constans.mjs";
|
|
3
3
|
import { IconApAdLineCopy as h } from "@aplus-frontend/icon";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
@@ -6,24 +6,23 @@ import { message as d } from "@aplus-frontend/antdv";
|
|
|
6
6
|
import { isNull as P, isUndefined as j, isString as A, isBoolean as N } from "lodash-unified";
|
|
7
7
|
import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
8
|
import { useLocale as w } from "../../config-provider/hooks/use-locale.mjs";
|
|
9
|
-
const D = /* @__PURE__ */
|
|
9
|
+
const D = /* @__PURE__ */ b({
|
|
10
10
|
name: "CopyBtn",
|
|
11
11
|
props: T(),
|
|
12
12
|
setup(e, {
|
|
13
13
|
slots: p
|
|
14
14
|
}) {
|
|
15
|
-
console.log("props.link", e.link);
|
|
16
15
|
const {
|
|
17
16
|
b: x,
|
|
18
17
|
e: l,
|
|
19
18
|
m: a
|
|
20
19
|
} = V("ap-copy"), {
|
|
21
20
|
t: s
|
|
22
|
-
} = w(), g = (t, n,
|
|
21
|
+
} = w(), g = (t, n, C) => {
|
|
23
22
|
t.stopPropagation(), t.preventDefault(), t.stopImmediatePropagation(), navigator.clipboard.writeText(e.text || c() || "").then(() => {
|
|
24
23
|
d.success(n || s("ap.apCopy.copySuccess"));
|
|
25
24
|
}).catch(() => {
|
|
26
|
-
d.error(
|
|
25
|
+
d.error(C || s("ap.apCopy.copyError"));
|
|
27
26
|
});
|
|
28
27
|
}, v = (t) => {
|
|
29
28
|
if (t.length === 1) {
|
|
@@ -57,7 +56,7 @@ const D = /* @__PURE__ */ C({
|
|
|
57
56
|
};
|
|
58
57
|
return {};
|
|
59
58
|
}), i = m(() => c() || e.text || "");
|
|
60
|
-
return () => r(
|
|
59
|
+
return () => r(k, null, [r("div", {
|
|
61
60
|
class: [x()]
|
|
62
61
|
}, [r("div", {
|
|
63
62
|
class: [l("text"), typeof o.value == "string" && a(o.value)],
|