@aplus-frontend/ui 7.7.4 → 7.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-action/group/index.vue.d.ts +1 -0
- package/es/src/ap-action/group/index.vue.mjs +28 -28
- package/es/src/ap-action/item-popconfirm/index.vue.d.ts +25 -1
- package/es/src/ap-button/ap-action-button.vue.d.ts +2 -1
- package/es/src/ap-button/ap-button.vue.d.ts +2 -1
- package/es/src/ap-field/number/index.vue.d.ts +20 -0
- package/es/src/ap-field/number/index.vue.mjs +11 -10
- package/es/src/ap-field/number/read.vue2.mjs +3 -2
- package/es/src/ap-field/select/index.vue.d.ts +12 -4
- package/es/src/ap-field/tree-select/index.vue.d.ts +2 -0
- package/es/src/ap-form/items/number/index.vue.d.ts +22 -0
- package/es/src/ap-form/items/select/index.vue.d.ts +18 -6
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -0
- package/es/src/ap-form/modal-form/index.vue.d.ts +25 -1
- package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +19 -1
- package/es/src/ap-table/constants.d.ts +22 -3
- package/es/src/business/ap-batch-action-group/index.d.ts +34 -4
- package/es/src/business/ap-descriptions/ap-descriptions.vue.d.ts +3 -10
- package/es/src/business/ap-descriptions/ap-descriptions.vue.mjs +58 -79
- package/es/src/business/ap-descriptions/interface.d.ts +2 -3
- package/es/src/business/ap-upload/apUpload.vue.d.ts +9 -0
- package/es/src/business/ap-upload/apUpload.vue.mjs +33 -29
- package/es/src/business/ap-upload/apUploadTypes.d.ts +4 -0
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +50 -49
- package/es/src/business/ap-upload/components/Picture.vue2.mjs +66 -65
- package/es/src/business/ap-upload/components/SingleFile.vue2.mjs +95 -94
- package/es/src/business/ap-upload/hooks/useOss.d.ts +2 -1
- package/es/src/business/ap-upload/hooks/useOss.mjs +26 -24
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-action/group/index.vue.d.ts +1 -0
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +25 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +2 -1
- package/lib/src/ap-button/ap-button.vue.d.ts +2 -1
- package/lib/src/ap-field/number/index.vue.d.ts +20 -0
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/number/read.vue2.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +12 -4
- package/lib/src/ap-field/tree-select/index.vue.d.ts +2 -0
- package/lib/src/ap-form/items/number/index.vue.d.ts +22 -0
- package/lib/src/ap-form/items/select/index.vue.d.ts +18 -6
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -0
- package/lib/src/ap-form/modal-form/index.vue.d.ts +25 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +19 -1
- package/lib/src/ap-table/constants.d.ts +22 -3
- package/lib/src/business/ap-batch-action-group/index.d.ts +34 -4
- package/lib/src/business/ap-descriptions/ap-descriptions.vue.d.ts +3 -10
- package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/business/ap-descriptions/interface.d.ts +2 -3
- package/lib/src/business/ap-upload/apUpload.vue.d.ts +9 -0
- package/lib/src/business/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/business/ap-upload/apUploadTypes.d.ts +4 -0
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/business/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/hooks/useOss.d.ts +2 -1
- package/lib/src/business/ap-upload/hooks/useOss.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as se, inject as o, ref as g, watch as re, computed as ie, createElementBlock as N, openBlock as h, normalizeClass as ce, unref as t, createElementVNode as r, createCommentVNode as E, toDisplayString as b, normalizeStyle as ue, createBlock as pe, withModifiers as de, createVNode as ve } 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
|
|
3
|
+
import { getName as fe, getReturnData as $ } from "../utils/returnData.mjs";
|
|
4
|
+
import { useOss as me, useOssInit as ge } from "../hooks/useOss.mjs";
|
|
5
|
+
import { fileMatchesAccept as he, getAcceptText as _e } from "../utils/accept.mjs";
|
|
6
|
+
import { message as c, Progress as ke } from "@aplus-frontend/antdv";
|
|
7
|
+
import { DeleteOutlined as ye } from "@ant-design/icons-vue";
|
|
8
8
|
import q from "../assets/single-file-icon.png.mjs";
|
|
9
|
-
import
|
|
10
|
-
import { useToken as
|
|
11
|
-
import { useLocale as
|
|
9
|
+
import we from "../style/index.mjs";
|
|
10
|
+
import { useToken as Ue } from "../../../config-provider/hooks/use-token.mjs";
|
|
11
|
+
import { useLocale as De } from "../../../config-provider/hooks/use-locale.mjs";
|
|
12
12
|
import { useNamespace as Ce } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
-
const
|
|
13
|
+
const Fe = ["accept"], Se = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "state-un"
|
|
16
|
-
},
|
|
16
|
+
}, Ne = ["src"], Ee = { class: "state-un-title" }, be = { class: "state-un-subtitle" }, xe = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "state-ing"
|
|
19
|
-
}, ze = { class: "left" },
|
|
19
|
+
}, ze = { class: "left" }, Ae = ["src"], Re = { class: "center" }, Be = { class: "center-progress" }, Je = /* @__PURE__ */ se({
|
|
20
20
|
__name: "SingleFile",
|
|
21
|
-
setup(
|
|
22
|
-
const { t: s } =
|
|
23
|
-
|
|
21
|
+
setup(Me, { expose: j }) {
|
|
22
|
+
const { t: s } = De(), { b: x } = Ce("ap-upload-single-file"), G = we("ap-upload"), { put: W, client: z } = me(), H = o("dirName"), J = o("baseDirName"), _ = o("accept") || "*", k = o("maxSize") ?? 500, K = o("title") || s("ap.apUpload.clickOrDragUpload"), y = o("subTitle"), { token: A } = Ue(), i = o("value"), w = o("needName"), u = o("uploadingCount"), R = o("beforeUpload"), B = o("customRequest"), Q = o("getOssAccess"), X = o("maxSizeErrorMsg"), Y = o("acceptErrorMsg"), M = o("onRemove"), U = o("showUploadErrorMsg"), l = g(null);
|
|
23
|
+
re(
|
|
24
24
|
() => i?.value,
|
|
25
25
|
function(e) {
|
|
26
|
-
|
|
26
|
+
l.value === null && e && P(e);
|
|
27
27
|
},
|
|
28
28
|
{ immediate: !0 }
|
|
29
29
|
);
|
|
30
30
|
function P(e) {
|
|
31
31
|
e ? setTimeout(() => {
|
|
32
|
-
const
|
|
33
|
-
n.value = 3,
|
|
34
|
-
}) : (n.value = 1,
|
|
32
|
+
const a = fe(w, e);
|
|
33
|
+
n.value = 3, l.value = new File([e], a, {}), i.value = e;
|
|
34
|
+
}) : (n.value = 1, l.value = null, i.value = void 0);
|
|
35
35
|
}
|
|
36
36
|
j({ setValue: P });
|
|
37
|
-
const n = g(1), d = g(0), v = g(null), T =
|
|
38
|
-
function
|
|
37
|
+
const n = g(1), d = g(0), v = g(null), T = ie(() => l.value && i?.value);
|
|
38
|
+
function Z() {
|
|
39
39
|
n.value === 1 && v.value?.click();
|
|
40
40
|
}
|
|
41
41
|
function O(e) {
|
|
42
42
|
e.preventDefault(), e.stopPropagation();
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ee(e) {
|
|
45
45
|
e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function ae(e) {
|
|
48
48
|
L(e);
|
|
49
49
|
}
|
|
50
50
|
function te(e) {
|
|
51
51
|
if (e.preventDefault(), e.stopPropagation(), n.value !== 1)
|
|
52
52
|
return;
|
|
53
|
-
var
|
|
53
|
+
var a = e.dataTransfer, f = [], V = 0, I = a.files.length;
|
|
54
54
|
function p() {
|
|
55
|
-
V === I - 1 &&
|
|
55
|
+
V === I - 1 && ae(f), V++;
|
|
56
56
|
}
|
|
57
|
-
if (
|
|
58
|
-
for (var
|
|
59
|
-
var
|
|
60
|
-
if (
|
|
61
|
-
var
|
|
62
|
-
f.push(
|
|
57
|
+
if (a.items !== void 0)
|
|
58
|
+
for (var D = 0; D < a.items.length; D++) {
|
|
59
|
+
var C = a.items[D];
|
|
60
|
+
if (C.kind === "file" && C.webkitGetAsEntry().isFile) {
|
|
61
|
+
var ne = C.getAsFile();
|
|
62
|
+
f.push(ne), p();
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
else
|
|
66
66
|
for (let S = 0; S < I; S++) {
|
|
67
|
-
var m =
|
|
67
|
+
var m = a.files[S];
|
|
68
68
|
if (m.type)
|
|
69
69
|
f.push(m), p();
|
|
70
70
|
else
|
|
@@ -88,41 +88,41 @@ const De = ["accept"], Fe = {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
async function
|
|
92
|
-
const
|
|
93
|
-
await L(
|
|
91
|
+
async function oe(e) {
|
|
92
|
+
const a = e.target;
|
|
93
|
+
await L(a?.files), v.value && (v.value.value = "");
|
|
94
94
|
}
|
|
95
95
|
async function L(e) {
|
|
96
96
|
if (e?.length) {
|
|
97
97
|
if (e[0].size > k * 1024 * 1024) {
|
|
98
98
|
c.warning(
|
|
99
|
-
|
|
99
|
+
X || s("ap.apUpload.maxUploadFileSize", {
|
|
100
100
|
maxSize: k
|
|
101
101
|
})
|
|
102
102
|
);
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
-
if (!
|
|
105
|
+
if (!he(e[0], _)) {
|
|
106
106
|
c.warning(
|
|
107
|
-
|
|
107
|
+
Y || s("ap.apUpload.fileFormatNotSupported")
|
|
108
108
|
);
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
if (typeof R == "function" && await R(e[0]) === !1)
|
|
112
112
|
return;
|
|
113
|
-
if (
|
|
113
|
+
if (l.value = e[0], n.value = 2, d.value = 0, u.value++, typeof B == "function") {
|
|
114
114
|
B({
|
|
115
|
-
onProgress: (
|
|
116
|
-
d.value =
|
|
115
|
+
onProgress: (a) => {
|
|
116
|
+
d.value = a;
|
|
117
117
|
},
|
|
118
|
-
onError: (
|
|
119
|
-
U && c.warning(
|
|
118
|
+
onError: (a) => {
|
|
119
|
+
U && c.warning(a || s("ap.apUpload.networkAnomaly")), n.value = 1, l.value = null, u.value--;
|
|
120
120
|
},
|
|
121
|
-
onSuccess: (
|
|
121
|
+
onSuccess: (a) => {
|
|
122
122
|
i.value = $(
|
|
123
123
|
w,
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
a,
|
|
125
|
+
l.value.name
|
|
126
126
|
), n.value = 3, u.value--;
|
|
127
127
|
},
|
|
128
128
|
file: e[0]
|
|
@@ -130,43 +130,44 @@ const De = ["accept"], Fe = {
|
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
132
|
try {
|
|
133
|
-
await
|
|
134
|
-
file:
|
|
133
|
+
await ge(Q), W({
|
|
134
|
+
file: l.value,
|
|
135
135
|
dirName: H,
|
|
136
|
-
oss:
|
|
137
|
-
successCallBack(
|
|
136
|
+
oss: z,
|
|
137
|
+
successCallBack(a) {
|
|
138
138
|
i.value = $(
|
|
139
139
|
w,
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
a,
|
|
141
|
+
l.value.name
|
|
142
142
|
), n.value = 3, u.value--;
|
|
143
143
|
},
|
|
144
|
-
errorCallBack(
|
|
145
|
-
U && c.warning(
|
|
144
|
+
errorCallBack(a) {
|
|
145
|
+
U && c.warning(a || s("ap.apUpload.networkAnomaly")), n.value = 1, l.value = null, u.value--;
|
|
146
146
|
},
|
|
147
|
-
progressCallBack(
|
|
148
|
-
d.value =
|
|
149
|
-
}
|
|
147
|
+
progressCallBack(a) {
|
|
148
|
+
d.value = a;
|
|
149
|
+
},
|
|
150
|
+
baseDirName: J
|
|
150
151
|
});
|
|
151
|
-
} catch (
|
|
152
|
+
} catch (a) {
|
|
152
153
|
U && c.warning(
|
|
153
|
-
typeof
|
|
154
|
-
), n.value = 1,
|
|
154
|
+
typeof a?.message == "string" ? a.message : s("ap.apUpload.networkAnomaly")
|
|
155
|
+
), n.value = 1, l.value = null, u.value--;
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
|
-
function
|
|
159
|
-
M && M?.(
|
|
159
|
+
function le() {
|
|
160
|
+
M && M?.(l.value), l.value && !i?.value && z.pauseUpload(), n.value = 1, l.value = null, i.value = void 0;
|
|
160
161
|
}
|
|
161
|
-
return (e,
|
|
162
|
-
class:
|
|
163
|
-
[
|
|
164
|
-
[
|
|
165
|
-
[
|
|
162
|
+
return (e, a) => (h(), N("div", {
|
|
163
|
+
class: ce({
|
|
164
|
+
[t(x)()]: !0,
|
|
165
|
+
[t(x)("un")]: n.value === 1,
|
|
166
|
+
[t(G) ?? ""]: !0
|
|
166
167
|
}),
|
|
167
|
-
onClick:
|
|
168
|
+
onClick: Z,
|
|
168
169
|
onDragenter: O,
|
|
169
|
-
onDragover:
|
|
170
|
+
onDragover: ee,
|
|
170
171
|
onDragleave: O,
|
|
171
172
|
onDrop: te
|
|
172
173
|
}, [
|
|
@@ -175,53 +176,53 @@ const De = ["accept"], Fe = {
|
|
|
175
176
|
ref: v,
|
|
176
177
|
style: { display: "none" },
|
|
177
178
|
type: "file",
|
|
178
|
-
accept:
|
|
179
|
-
onChange:
|
|
180
|
-
}, null, 40,
|
|
181
|
-
n.value === 1 ? (h(),
|
|
179
|
+
accept: t(_),
|
|
180
|
+
onChange: oe
|
|
181
|
+
}, null, 40, Fe),
|
|
182
|
+
n.value === 1 ? (h(), N("div", Se, [
|
|
182
183
|
r("img", {
|
|
183
184
|
class: "state-un-icon",
|
|
184
|
-
src:
|
|
185
|
-
}, null, 8,
|
|
186
|
-
r("div", Ee,
|
|
187
|
-
r("div",
|
|
188
|
-
|
|
189
|
-
)},${
|
|
190
|
-
maxSize:
|
|
185
|
+
src: t(q)
|
|
186
|
+
}, null, 8, Ne),
|
|
187
|
+
r("div", Ee, b(t(K)), 1),
|
|
188
|
+
r("div", be, b(typeof t(y) == "string" && t(y).length > 0 ? t(y) : `${t(s)("ap.apUpload.supportExtension")}:${t(_e)(
|
|
189
|
+
t(_)
|
|
190
|
+
)},${t(s)("ap.apUpload.maxWarnUploadFileSize", {
|
|
191
|
+
maxSize: t(k)
|
|
191
192
|
})}`), 1)
|
|
192
|
-
])) :
|
|
193
|
-
[2, 3].includes(n.value) ? (h(),
|
|
193
|
+
])) : E("", !0),
|
|
194
|
+
[2, 3].includes(n.value) ? (h(), N("div", xe, [
|
|
194
195
|
r("div", ze, [
|
|
195
|
-
r("img", { src:
|
|
196
|
+
r("img", { src: t(q) }, null, 8, Ae)
|
|
196
197
|
]),
|
|
197
|
-
r("div",
|
|
198
|
+
r("div", Re, [
|
|
198
199
|
r("div", {
|
|
199
200
|
class: "center-title",
|
|
200
|
-
style:
|
|
201
|
+
style: ue({
|
|
201
202
|
color: T.value ? "#0070FF" : "#182948"
|
|
202
203
|
})
|
|
203
|
-
},
|
|
204
|
-
r("div",
|
|
205
|
-
T.value ?
|
|
204
|
+
}, b(l.value?.name), 5),
|
|
205
|
+
r("div", Be, [
|
|
206
|
+
T.value ? E("", !0) : (h(), pe(t(ke), {
|
|
206
207
|
key: 0,
|
|
207
208
|
percent: d.value,
|
|
208
209
|
size: 4,
|
|
209
210
|
"show-info": !1,
|
|
210
|
-
"trail-color":
|
|
211
|
-
"stroke-color":
|
|
211
|
+
"trail-color": t(A).borderColorBase,
|
|
212
|
+
"stroke-color": t(A).colorPrimary
|
|
212
213
|
}, null, 8, ["percent", "trail-color", "stroke-color"]))
|
|
213
214
|
])
|
|
214
215
|
]),
|
|
215
216
|
r("div", {
|
|
216
217
|
class: "right",
|
|
217
|
-
onClick:
|
|
218
|
+
onClick: de(le, ["stop"])
|
|
218
219
|
}, [
|
|
219
|
-
|
|
220
|
+
ve(t(ye))
|
|
220
221
|
])
|
|
221
|
-
])) :
|
|
222
|
+
])) : E("", !0)
|
|
222
223
|
], 34));
|
|
223
224
|
}
|
|
224
225
|
});
|
|
225
226
|
export {
|
|
226
|
-
|
|
227
|
+
Je as default
|
|
227
228
|
};
|
|
@@ -4,13 +4,14 @@ import { Ref } from 'vue';
|
|
|
4
4
|
export type { Oss } from '@aplus-frontend/oss';
|
|
5
5
|
export type GetOssAccess = () => Promise<accessCreate>;
|
|
6
6
|
export declare function injectLocaleToOss(tValue: Translator, langValue: Ref<string>): void;
|
|
7
|
-
declare function put({ file, dirName, oss, successCallBack, errorCallBack, progressCallBack }: {
|
|
7
|
+
declare function put({ file, dirName, oss, successCallBack, errorCallBack, progressCallBack, baseDirName }: {
|
|
8
8
|
file: File;
|
|
9
9
|
dirName: string;
|
|
10
10
|
oss: Oss;
|
|
11
11
|
successCallBack: (saveUrl: string, previewUrl: string) => void;
|
|
12
12
|
errorCallBack: (msg: string) => void;
|
|
13
13
|
progressCallBack: (p: number) => void;
|
|
14
|
+
baseDirName?: string;
|
|
14
15
|
}): Promise<void>;
|
|
15
16
|
export declare function useOss(): {
|
|
16
17
|
client: Oss;
|
|
@@ -1,80 +1,82 @@
|
|
|
1
|
-
import { client as i, createOssInstance as
|
|
2
|
-
let
|
|
3
|
-
function
|
|
4
|
-
|
|
1
|
+
import { client as i, createOssInstance as w } from "@aplus-frontend/oss";
|
|
2
|
+
let n, l;
|
|
3
|
+
function U(e, s) {
|
|
4
|
+
n = e, l = s;
|
|
5
5
|
}
|
|
6
|
-
const
|
|
6
|
+
const g = {
|
|
7
7
|
"zh-cn": "zh_CN",
|
|
8
8
|
en: "en_US"
|
|
9
9
|
};
|
|
10
10
|
function p() {
|
|
11
|
-
return
|
|
11
|
+
return g[l.value] ?? "zh_CN";
|
|
12
12
|
}
|
|
13
|
-
async function
|
|
13
|
+
async function d({
|
|
14
14
|
file: e,
|
|
15
15
|
dirName: s,
|
|
16
|
-
oss:
|
|
16
|
+
oss: t,
|
|
17
17
|
successCallBack: c,
|
|
18
18
|
errorCallBack: o,
|
|
19
|
-
progressCallBack: u
|
|
19
|
+
progressCallBack: u,
|
|
20
|
+
baseDirName: f = "Frontend-Upload"
|
|
20
21
|
}) {
|
|
21
22
|
if (!s) {
|
|
22
23
|
o("required dirName");
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
26
|
try {
|
|
26
|
-
const a = await
|
|
27
|
+
const a = await t.put({
|
|
27
28
|
fileName: e.name,
|
|
28
29
|
dirName: s,
|
|
29
30
|
data: e,
|
|
30
31
|
progressCallBack: (r) => {
|
|
31
32
|
u(r);
|
|
32
|
-
}
|
|
33
|
+
},
|
|
34
|
+
baseDirName: f
|
|
33
35
|
});
|
|
34
36
|
if (a.status === 204)
|
|
35
37
|
return;
|
|
36
38
|
if (a.status === 200) {
|
|
37
|
-
const { saveUrl: r, previewUrl:
|
|
38
|
-
c(r,
|
|
39
|
+
const { saveUrl: r, previewUrl: m } = a;
|
|
40
|
+
c(r, m);
|
|
39
41
|
} else
|
|
40
|
-
o(a?.message ||
|
|
42
|
+
o(a?.message || n("ap.apUpload.networkAnomaly"));
|
|
41
43
|
} catch (a) {
|
|
42
44
|
o(a);
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
function O() {
|
|
46
|
-
return { client: i, put:
|
|
48
|
+
return { client: i, put: d };
|
|
47
49
|
}
|
|
48
50
|
async function h(e) {
|
|
49
51
|
if (!e)
|
|
50
|
-
throw new Error(`${
|
|
52
|
+
throw new Error(`${n("ap.apUpload.pleasePass")}getOssAccess`);
|
|
51
53
|
return await i.initOssClient({
|
|
52
54
|
getOssAccess: e,
|
|
53
55
|
locale: p(),
|
|
54
56
|
onFailure: (s) => {
|
|
55
57
|
throw new Error(
|
|
56
|
-
typeof s?.message == "string" ? s.message :
|
|
58
|
+
typeof s?.message == "string" ? s.message : n("ap.apUpload.FailedToObtainOssTemporaryPermissions")
|
|
57
59
|
);
|
|
58
60
|
}
|
|
59
61
|
}), O();
|
|
60
62
|
}
|
|
61
|
-
async function
|
|
63
|
+
async function F(e) {
|
|
62
64
|
if (!e)
|
|
63
|
-
throw new Error(`${
|
|
64
|
-
const s =
|
|
65
|
+
throw new Error(`${n("ap.apUpload.pleasePass")}getOssAccess`);
|
|
66
|
+
const s = w();
|
|
65
67
|
return await s.initOssClient({
|
|
66
68
|
getOssAccess: e,
|
|
67
69
|
locale: p(),
|
|
68
|
-
onFailure: (
|
|
70
|
+
onFailure: (t) => {
|
|
69
71
|
throw new Error(
|
|
70
|
-
typeof
|
|
72
|
+
typeof t?.message == "string" ? t.message : n("ap.apUpload.FailedToObtainOssTemporaryPermissions")
|
|
71
73
|
);
|
|
72
74
|
}
|
|
73
75
|
}), s;
|
|
74
76
|
}
|
|
75
77
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
F as getOssInstance,
|
|
79
|
+
U as injectLocaleToOss,
|
|
78
80
|
O as useOss,
|
|
79
81
|
h as useOssInit
|
|
80
82
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.7.
|
|
1
|
+
declare const _default: "7.7.5";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -7,5 +7,6 @@ declare const _default: DefineComponent<ApActionGroupProps, {}, {}, {}, {}, Comp
|
|
|
7
7
|
actions: GroupActionTypes[];
|
|
8
8
|
trigger: Trigger | Trigger[];
|
|
9
9
|
count: number;
|
|
10
|
+
iconFirst: boolean;
|
|
10
11
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
11
12
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("@aplus-frontend/antdv");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");require("../item-dropdown/index.vue2.js");require("../../config-provider/index.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("@aplus-frontend/antdv");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");require("../item-dropdown/index.vue2.js");require("../../config-provider/index.js");const d=require("lodash-unified"),f=require("../../config-provider/hooks/use-locale.js"),l=require("../item-dropdown/index.vue.js"),m=require("../item-modal/index.vue.js"),g=require("../item-popconfirm/index.vue.js"),k=require("../item/index.vue2.js"),v=e.defineComponent({name:"ApActionGroup",__name:"index",props:{count:{default:3},trigger:{default:()=>["hover"]},placement:{default:"bottomRight"},actions:{default:()=>[]},iconFirst:{type:Boolean,default:void 0}},setup(i){const o=i,{t:s}=f.useLocale(),u=e.computed(()=>o.actions.filter(r=>r.visible||d.isUndefined(r.visible))),a=e.computed(()=>e.unref(u).length>o.count),c=e.computed(()=>{const r=e.unref(u);if(r.length<=o.count)return{showActions:r.map(t=>({...t,iconFirst:t.iconFirst??o.iconFirst??!0})),menuActions:[]};let n=r.slice(0,o.count-1);return o.iconFirst&&(n=n.map(t=>({...t,iconFirst:!0}))),{showActions:n,menuActions:r.slice(o.count-1)}});return(r,n)=>(e.openBlock(),e.createBlock(e.unref(_.Space),{size:16,align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.showActions,(t,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:p},[t.actions?(e.openBlock(),e.createBlock(l.default,e.mergeProps({key:0,ref_for:!0},t),null,16)):t.modalProps?(e.openBlock(),e.createBlock(m.default,e.mergeProps({key:1,ref_for:!0},t),null,16)):t.popconfirmProps?(e.openBlock(),e.createBlock(g.default,e.mergeProps({key:2,ref_for:!0},t),null,16)):(e.openBlock(),e.createBlock(k.default,e.mergeProps({key:3,ref_for:!0},t),null,16))],64))),128)),a.value?(e.openBlock(),e.createBlock(l.default,{key:0,actions:c.value.menuActions,placement:r.placement,trigger:r.trigger,text:e.unref(s)("ap.common.more")},null,8,["actions","placement","trigger","text"])):e.createCommentVNode("",!0)]),_:1}))}});exports.default=v;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApActionItemPopconfirmProps, ApActionItemSlots } from '../interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, HTMLAttributes, CSSProperties, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, VNode, RendererNode, RendererElement, HTMLAttributes, CSSProperties, ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { ActionColor } from '..';
|
|
4
4
|
import { LegacyButtonType, ButtonHTMLType, ButtonIconPosition, ButtonVariantType } from '@aplus-frontend/antdv/es/button/buttonTypes';
|
|
5
5
|
import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
@@ -73,9 +73,15 @@ declare const __VLS_component: DefineComponent<ApActionItemPopconfirmProps, {},
|
|
|
73
73
|
loading: {
|
|
74
74
|
type: PropType<boolean | {
|
|
75
75
|
delay?: number;
|
|
76
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
}>;
|
|
76
79
|
}>;
|
|
77
80
|
default: () => boolean | {
|
|
78
81
|
delay?: number;
|
|
82
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
}>;
|
|
79
85
|
};
|
|
80
86
|
};
|
|
81
87
|
disabled: {
|
|
@@ -128,9 +134,15 @@ declare const __VLS_component: DefineComponent<ApActionItemPopconfirmProps, {},
|
|
|
128
134
|
loading: {
|
|
129
135
|
type: PropType<boolean | {
|
|
130
136
|
delay?: number;
|
|
137
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
138
|
+
[key: string]: any;
|
|
139
|
+
}>;
|
|
131
140
|
}>;
|
|
132
141
|
default: () => boolean | {
|
|
133
142
|
delay?: number;
|
|
143
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
144
|
+
[key: string]: any;
|
|
145
|
+
}>;
|
|
134
146
|
};
|
|
135
147
|
};
|
|
136
148
|
disabled: {
|
|
@@ -185,9 +197,15 @@ declare const __VLS_component: DefineComponent<ApActionItemPopconfirmProps, {},
|
|
|
185
197
|
loading: {
|
|
186
198
|
type: PropType<boolean | {
|
|
187
199
|
delay?: number;
|
|
200
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
201
|
+
[key: string]: any;
|
|
202
|
+
}>;
|
|
188
203
|
}>;
|
|
189
204
|
default: () => boolean | {
|
|
190
205
|
delay?: number;
|
|
206
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
207
|
+
[key: string]: any;
|
|
208
|
+
}>;
|
|
191
209
|
};
|
|
192
210
|
};
|
|
193
211
|
disabled: {
|
|
@@ -240,9 +258,15 @@ declare const __VLS_component: DefineComponent<ApActionItemPopconfirmProps, {},
|
|
|
240
258
|
loading: {
|
|
241
259
|
type: PropType<boolean | {
|
|
242
260
|
delay?: number;
|
|
261
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
262
|
+
[key: string]: any;
|
|
263
|
+
}>;
|
|
243
264
|
}>;
|
|
244
265
|
default: () => boolean | {
|
|
245
266
|
delay?: number;
|
|
267
|
+
icon?: VNode<RendererNode, RendererElement, {
|
|
268
|
+
[key: string]: any;
|
|
269
|
+
}>;
|
|
246
270
|
};
|
|
247
271
|
};
|
|
248
272
|
disabled: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApButtonSlots, ApButtonProps } from './interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, VNode, ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { ButtonType } from '@aplus-frontend/antdv/es/button';
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
attrs: Partial<{}>;
|
|
@@ -13,6 +13,7 @@ declare const __VLS_component: DefineComponent<ApButtonProps, {}, {}, {}, {}, Co
|
|
|
13
13
|
minWidth: boolean | number | string;
|
|
14
14
|
loading: boolean | {
|
|
15
15
|
delay?: number;
|
|
16
|
+
icon?: VNode;
|
|
16
17
|
};
|
|
17
18
|
lazy: boolean | number;
|
|
18
19
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApButtonSlots, ApButtonProps } from './interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, VNode, ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { ButtonType } from '@aplus-frontend/antdv/es/button';
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
attrs: Partial<{}>;
|
|
@@ -13,6 +13,7 @@ declare const __VLS_component: DefineComponent<ApButtonProps, {}, {}, {}, {}, Co
|
|
|
13
13
|
minWidth: boolean | number | string;
|
|
14
14
|
loading: boolean | {
|
|
15
15
|
delay?: number;
|
|
16
|
+
icon?: VNode;
|
|
16
17
|
};
|
|
17
18
|
lazy: boolean | number;
|
|
18
19
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
@@ -51,6 +51,10 @@ declare function __VLS_template(): {
|
|
|
51
51
|
type: BooleanConstructor;
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
|
+
changeOnBlur: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
54
58
|
stringMode: {
|
|
55
59
|
type: BooleanConstructor;
|
|
56
60
|
default: boolean;
|
|
@@ -167,6 +171,7 @@ declare function __VLS_template(): {
|
|
|
167
171
|
defaultValue: ValueType;
|
|
168
172
|
step: ValueType;
|
|
169
173
|
changeOnWheel: boolean;
|
|
174
|
+
changeOnBlur: boolean;
|
|
170
175
|
stringMode: boolean;
|
|
171
176
|
controls: boolean;
|
|
172
177
|
keyboard: boolean;
|
|
@@ -228,6 +233,10 @@ declare function __VLS_template(): {
|
|
|
228
233
|
type: BooleanConstructor;
|
|
229
234
|
default: boolean;
|
|
230
235
|
};
|
|
236
|
+
changeOnBlur: {
|
|
237
|
+
type: BooleanConstructor;
|
|
238
|
+
default: boolean;
|
|
239
|
+
};
|
|
231
240
|
stringMode: {
|
|
232
241
|
type: BooleanConstructor;
|
|
233
242
|
default: boolean;
|
|
@@ -344,6 +353,7 @@ declare function __VLS_template(): {
|
|
|
344
353
|
defaultValue: ValueType;
|
|
345
354
|
step: ValueType;
|
|
346
355
|
changeOnWheel: boolean;
|
|
356
|
+
changeOnBlur: boolean;
|
|
347
357
|
stringMode: boolean;
|
|
348
358
|
controls: boolean;
|
|
349
359
|
keyboard: boolean;
|
|
@@ -413,6 +423,10 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
413
423
|
type: BooleanConstructor;
|
|
414
424
|
default: boolean;
|
|
415
425
|
};
|
|
426
|
+
changeOnBlur: {
|
|
427
|
+
type: BooleanConstructor;
|
|
428
|
+
default: boolean;
|
|
429
|
+
};
|
|
416
430
|
stringMode: {
|
|
417
431
|
type: BooleanConstructor;
|
|
418
432
|
default: boolean;
|
|
@@ -529,6 +543,7 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
529
543
|
defaultValue: ValueType;
|
|
530
544
|
step: ValueType;
|
|
531
545
|
changeOnWheel: boolean;
|
|
546
|
+
changeOnBlur: boolean;
|
|
532
547
|
stringMode: boolean;
|
|
533
548
|
controls: boolean;
|
|
534
549
|
keyboard: boolean;
|
|
@@ -590,6 +605,10 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
590
605
|
type: BooleanConstructor;
|
|
591
606
|
default: boolean;
|
|
592
607
|
};
|
|
608
|
+
changeOnBlur: {
|
|
609
|
+
type: BooleanConstructor;
|
|
610
|
+
default: boolean;
|
|
611
|
+
};
|
|
593
612
|
stringMode: {
|
|
594
613
|
type: BooleanConstructor;
|
|
595
614
|
default: boolean;
|
|
@@ -706,6 +725,7 @@ declare const __VLS_component: DefineComponent<ApFieldNumberProps, {
|
|
|
706
725
|
defaultValue: ValueType;
|
|
707
726
|
step: ValueType;
|
|
708
727
|
changeOnWheel: boolean;
|
|
728
|
+
changeOnBlur: boolean;
|
|
709
729
|
stringMode: boolean;
|
|
710
730
|
controls: boolean;
|
|
711
731
|
keyboard: boolean;
|