vft 0.0.511 → 0.0.514
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/dist/index.css +1 -1
- package/es/components/cascader/cascader.vue2.js +202 -203
- package/es/components/cascader-panel/menu.vue2.js +49 -50
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +18 -19
- package/es/components/color-picker/color-picker.vue2.js +133 -134
- package/es/components/config-provider/config-provider.vue.d.ts +0 -2
- package/es/components/config-provider/config-provider.vue2.js +4 -5
- package/es/components/config-provider/constants.d.ts +0 -1
- package/es/components/config-provider/constants.js +2 -3
- package/es/components/config-provider/hooks/use-global-config.js +30 -33
- package/es/components/config-provider/index.d.ts +0 -9
- package/es/components/config-provider/index.js +5 -6
- package/es/components/date-picker/composables/use-basic-date-table.js +82 -83
- package/es/components/date-picker/composables/use-month-range-header.js +14 -15
- package/es/components/date-picker/composables/use-panel-date-range.js +23 -24
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +38 -39
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +38 -39
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +183 -184
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +224 -225
- package/es/components/date-time-select/date-time-select.vue2.js +36 -39
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue2.js +67 -68
- package/es/components/dropdown/index.d.ts +33 -33
- package/es/components/empty/empty.vue2.js +38 -39
- package/es/components/full-screen/full-screen.vue2.js +17 -18
- package/es/components/image/image.vue2.js +59 -60
- package/es/components/image-viewer/image-viewer.vue2.js +44 -45
- package/es/components/index.js +97 -98
- package/es/components/md-container/md-container.vue2.js +74 -75
- package/es/components/md-container/toc.js +36 -37
- package/es/components/message-box/message-box.vue2.js +3 -3
- package/es/components/message-box/method.js +47 -48
- package/es/components/modal/modal-footer-action.vue2.js +24 -25
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +15 -16
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +53 -54
- package/es/components/popconfirm/popconfirm.vue2.js +39 -40
- package/es/components/search/search.vue2.js +50 -51
- package/es/components/select/useSelect.js +231 -232
- package/es/components/super-form/super-form-item.vue2.js +66 -66
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +65 -66
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +133 -134
- package/es/components/transfer/transfer-panel.vue2.js +56 -57
- package/es/components/transfer/transfer.vue2.js +69 -70
- package/es/components/tree/tree.vue2.js +59 -60
- package/es/components/upload/upload-content.vue2.js +49 -50
- package/es/components/upload/upload-list.vue2.js +45 -46
- package/es/components/upload/upload.vue2.js +99 -100
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -5
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue.d.ts +0 -2
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/config-provider/constants.cjs +1 -1
- package/lib/components/config-provider/constants.d.ts +0 -1
- package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
- package/lib/components/config-provider/index.cjs +1 -1
- package/lib/components/config-provider/index.d.ts +0 -9
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/dropdown/index.d.ts +33 -33
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/toc.cjs +1 -1
- package/lib/components/message-box/message-box.vue2.cjs +1 -1
- package/lib/components/message-box/method.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
- package/lib/components/transfer/transfer.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +3 -3
- package/theme-style/index.css +1 -1
- package/theme-style/src/image-viewer.scss +12 -0
- package/theme-style/src/message-box.scss +2 -2
- package/theme-style/src/table.scss +6 -0
- package/theme-style/vft-image-viewer.css +1 -1
- package/theme-style/vft-message-box.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
- package/es/locale/index.d.js +0 -1
- package/es/locale/index.d.ts +0 -26
- package/es/locale/index.js +0 -10
- package/es/locale/lang/en.d.ts +0 -183
- package/es/locale/lang/en.js +0 -241
- package/es/locale/lang/zh-cn.d.ts +0 -183
- package/es/locale/lang/zh-cn.js +0 -241
- package/es/locale/lang/zh-tw.d.ts +0 -183
- package/es/locale/lang/zh-tw.js +0 -241
- package/es/locale/use-locale.d.ts +0 -17
- package/es/locale/use-locale.js +0 -56
- package/lib/locale/index.cjs +0 -1
- package/lib/locale/index.d.cjs +0 -1
- package/lib/locale/index.d.ts +0 -26
- package/lib/locale/lang/en.cjs +0 -1
- package/lib/locale/lang/en.d.ts +0 -183
- package/lib/locale/lang/zh-cn.cjs +0 -1
- package/lib/locale/lang/zh-cn.d.ts +0 -183
- package/lib/locale/lang/zh-tw.cjs +0 -1
- package/lib/locale/lang/zh-tw.d.ts +0 -183
- package/lib/locale/use-locale.cjs +0 -1
- package/lib/locale/use-locale.d.ts +0 -17
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { defineComponent as D, shallowRef as I, computed as
|
|
1
|
+
import { defineComponent as D, shallowRef as I, computed as $, openBlock as q, createElementBlock as A, withKeys as N, withModifiers as T, normalizeClass as w, unref as g, createBlock as X, withCtx as G, renderSlot as L, createElementVNode as J, nextTick as Q } from "vue";
|
|
2
2
|
import "../form/index.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
|
-
import { isObject as O, entriesOf as
|
|
5
|
-
import { debugWarn as
|
|
4
|
+
import { isObject as O, entriesOf as Y } from "@vft/utils";
|
|
5
|
+
import { debugWarn as Z } from "../../utils/error.js";
|
|
6
6
|
import "../config-provider/hooks/use-global-config.js";
|
|
7
|
-
import { cloneDeep as F, isEqual as
|
|
8
|
-
import { useNamespace as
|
|
7
|
+
import { cloneDeep as F, isEqual as _ } from "lodash-es";
|
|
8
|
+
import { useNamespace as ee } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "../../hooks/use-model-toggle/index.js";
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import ne from "./
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
const ce = ["onKeydown"], fe = ["name", "multiple", "accept"], ue = D({
|
|
12
|
+
import { ajaxUpload as te } from "./ajax.js";
|
|
13
|
+
import { genFileId as oe } from "./constants.js";
|
|
14
|
+
import ae from "./upload-dragger.vue2.js";
|
|
15
|
+
import { validateFileType as P, isImageOrVideo as ie, validateFileSize as ne } from "./utils.js";
|
|
16
|
+
import { useFormDisabled as le } from "../form/hooks/use-form-common-props.js";
|
|
17
|
+
import { useFormItem as se } from "../form/hooks/use-form-item.js";
|
|
18
|
+
const re = ["onKeydown"], de = ["name", "multiple", "accept"], fe = D({
|
|
20
19
|
name: "VftUploadContent",
|
|
21
20
|
inheritAttrs: !1
|
|
22
|
-
}),
|
|
23
|
-
...
|
|
21
|
+
}), Ie = /* @__PURE__ */ D({
|
|
22
|
+
...fe,
|
|
24
23
|
props: {
|
|
25
24
|
fileList: { default: [] },
|
|
26
25
|
replaceOnLimit: { type: Boolean, default: !1 },
|
|
@@ -37,7 +36,7 @@ const ce = ["onKeydown"], fe = ["name", "multiple", "accept"], ue = D({
|
|
|
37
36
|
type: { default: "select" },
|
|
38
37
|
autoUpload: { type: Boolean, default: !1 },
|
|
39
38
|
listType: { default: "text" },
|
|
40
|
-
httpRequest: { type: Function, default:
|
|
39
|
+
httpRequest: { type: Function, default: te },
|
|
41
40
|
disabled: { type: Boolean },
|
|
42
41
|
limit: {},
|
|
43
42
|
maxSize: { default: void 0 },
|
|
@@ -56,10 +55,10 @@ const ce = ["onKeydown"], fe = ["name", "multiple", "accept"], ue = D({
|
|
|
56
55
|
onSizeExceed: {}
|
|
57
56
|
},
|
|
58
57
|
setup(r, { expose: K }) {
|
|
59
|
-
const
|
|
58
|
+
const n = r, v = ee("upload"), k = le(), { formItem: M } = se(), u = I(
|
|
60
59
|
{}
|
|
61
60
|
), b = I();
|
|
62
|
-
|
|
61
|
+
$(() => n.sizeExceedMessage || "文件大小超出限制");
|
|
63
62
|
const B = async (e) => {
|
|
64
63
|
if (e.length === 0) return;
|
|
65
64
|
const {
|
|
@@ -74,16 +73,16 @@ const ce = ["onKeydown"], fe = ["name", "multiple", "accept"], ue = D({
|
|
|
74
73
|
onSizeExceed: z,
|
|
75
74
|
sizeWidth: h,
|
|
76
75
|
sizeHeight: y,
|
|
77
|
-
onSizeInvalid:
|
|
76
|
+
onSizeInvalid: f,
|
|
78
77
|
accept: s,
|
|
79
|
-
onTypeInvalid:
|
|
78
|
+
onTypeInvalid: c
|
|
80
79
|
} = n;
|
|
81
80
|
if (s) {
|
|
82
81
|
const i = e.filter(
|
|
83
82
|
(t) => !P(t, s)
|
|
84
83
|
);
|
|
85
84
|
if (i.length > 0 && (i.forEach((t) => {
|
|
86
|
-
|
|
85
|
+
c && c(t, s);
|
|
87
86
|
}), e = e.filter((t) => P(t, s)), e.length === 0))
|
|
88
87
|
return;
|
|
89
88
|
}
|
|
@@ -97,14 +96,14 @@ const ce = ["onKeydown"], fe = ["name", "multiple", "accept"], ue = D({
|
|
|
97
96
|
if (h && y) {
|
|
98
97
|
const i = [];
|
|
99
98
|
for (const t of e)
|
|
100
|
-
if (
|
|
99
|
+
if (ie(t))
|
|
101
100
|
try {
|
|
102
|
-
const { isValid: x, width:
|
|
101
|
+
const { isValid: x, width: H, height: W } = await ne(
|
|
103
102
|
t,
|
|
104
103
|
h,
|
|
105
104
|
y
|
|
106
105
|
);
|
|
107
|
-
x ? i.push(t) :
|
|
106
|
+
x ? i.push(t) : f && f(t, H, W, h, y);
|
|
108
107
|
} catch (x) {
|
|
109
108
|
console.error("Size validation failed:", x);
|
|
110
109
|
}
|
|
@@ -119,7 +118,7 @@ const ce = ["onKeydown"], fe = ["name", "multiple", "accept"], ue = D({
|
|
|
119
118
|
p || (e = e.slice(0, 1));
|
|
120
119
|
for (const i of e) {
|
|
121
120
|
const t = i;
|
|
122
|
-
t.uid =
|
|
121
|
+
t.uid = oe(), m?.(t), o && C(t);
|
|
123
122
|
}
|
|
124
123
|
}, C = async (e) => {
|
|
125
124
|
if (b.value.value = "", !n.beforeUpload)
|
|
@@ -127,7 +126,7 @@ const ce = ["onKeydown"], fe = ["name", "multiple", "accept"], ue = D({
|
|
|
127
126
|
let o, a = {};
|
|
128
127
|
try {
|
|
129
128
|
const p = n.data, m = n.beforeUpload(e);
|
|
130
|
-
a = O(n.data) ? F(n.data) : n.data, o = await m, O(n.data) &&
|
|
129
|
+
a = O(n.data) ? F(n.data) : n.data, o = await m, O(n.data) && _(p, a) && (a = F(n.data));
|
|
131
130
|
} catch {
|
|
132
131
|
o = !1;
|
|
133
132
|
}
|
|
@@ -151,7 +150,7 @@ const ce = ["onKeydown"], fe = ["name", "multiple", "accept"], ue = D({
|
|
|
151
150
|
onSuccess: z,
|
|
152
151
|
onError: h,
|
|
153
152
|
httpRequest: y
|
|
154
|
-
} = n, { uid:
|
|
153
|
+
} = n, { uid: f } = e, s = {
|
|
155
154
|
headers: a || {},
|
|
156
155
|
withCredentials: m,
|
|
157
156
|
file: e,
|
|
@@ -163,63 +162,63 @@ const ce = ["onKeydown"], fe = ["name", "multiple", "accept"], ue = D({
|
|
|
163
162
|
d?.(i, e);
|
|
164
163
|
},
|
|
165
164
|
onSuccess: (i) => {
|
|
166
|
-
z?.(i, e), delete u.value[
|
|
165
|
+
z?.(i, e), delete u.value[f];
|
|
167
166
|
},
|
|
168
167
|
onError: (i) => {
|
|
169
|
-
h?.(i, e), delete u.value[
|
|
168
|
+
h?.(i, e), delete u.value[f];
|
|
170
169
|
}
|
|
171
|
-
},
|
|
172
|
-
u.value[
|
|
173
|
-
},
|
|
170
|
+
}, c = y(s);
|
|
171
|
+
u.value[f] = c, c instanceof Promise && c.then(s.onSuccess, s.onError);
|
|
172
|
+
}, V = async (e) => {
|
|
174
173
|
const o = e.target.files;
|
|
175
|
-
o && (await B(Array.from(o)),
|
|
176
|
-
|
|
174
|
+
o && (await B(Array.from(o)), Q(() => {
|
|
175
|
+
M?.validate("change").catch((a) => Z(a));
|
|
177
176
|
}));
|
|
178
177
|
}, U = () => {
|
|
179
178
|
k.value || (b.value.value = "", b.value.click());
|
|
180
|
-
},
|
|
179
|
+
}, j = () => {
|
|
181
180
|
U();
|
|
182
181
|
};
|
|
183
182
|
return K({
|
|
184
183
|
abort: (e) => {
|
|
185
|
-
|
|
184
|
+
Y(u.value).filter(
|
|
186
185
|
e ? ([a]) => String(e.uid) === a : () => !0
|
|
187
186
|
).forEach(([a, l]) => {
|
|
188
187
|
l instanceof XMLHttpRequest && l.abort(), delete u.value[a];
|
|
189
188
|
});
|
|
190
189
|
},
|
|
191
190
|
upload: C
|
|
192
|
-
}), (e, o) => (q(),
|
|
193
|
-
class:
|
|
191
|
+
}), (e, o) => (q(), A("div", {
|
|
192
|
+
class: w([g(v).b(), g(v).m(r.listType), g(v).is("drag", r.drag)]),
|
|
194
193
|
tabindex: "0",
|
|
195
194
|
onClick: U,
|
|
196
|
-
onKeydown:
|
|
195
|
+
onKeydown: N(T(j, ["self"]), ["enter", "space"])
|
|
197
196
|
}, [
|
|
198
|
-
r.drag ? (q(),
|
|
197
|
+
r.drag ? (q(), X(ae, {
|
|
199
198
|
key: 0,
|
|
200
199
|
disabled: g(k),
|
|
201
200
|
onFile: o[0] || (o[0] = (a) => B(a.file))
|
|
202
201
|
}, {
|
|
203
|
-
default:
|
|
204
|
-
|
|
202
|
+
default: G(() => [
|
|
203
|
+
L(e.$slots, "default")
|
|
205
204
|
]),
|
|
206
205
|
_: 3
|
|
207
|
-
}, 8, ["disabled"])) :
|
|
208
|
-
|
|
206
|
+
}, 8, ["disabled"])) : L(e.$slots, "default", { key: 1 }),
|
|
207
|
+
J("input", {
|
|
209
208
|
ref_key: "inputRef",
|
|
210
209
|
ref: b,
|
|
211
|
-
class:
|
|
210
|
+
class: w(g(v).e("input")),
|
|
212
211
|
name: r.name,
|
|
213
212
|
multiple: r.multiple,
|
|
214
213
|
accept: r.accept,
|
|
215
214
|
type: "file",
|
|
216
|
-
onChange:
|
|
217
|
-
onClick: o[1] || (o[1] =
|
|
215
|
+
onChange: V,
|
|
216
|
+
onClick: o[1] || (o[1] = T(() => {
|
|
218
217
|
}, ["stop"]))
|
|
219
|
-
}, null, 42,
|
|
220
|
-
], 42,
|
|
218
|
+
}, null, 42, de)
|
|
219
|
+
], 42, re));
|
|
221
220
|
}
|
|
222
221
|
});
|
|
223
222
|
export {
|
|
224
|
-
|
|
223
|
+
Ie as default
|
|
225
224
|
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { defineComponent as C, ref as
|
|
1
|
+
import { defineComponent as C, ref as B, openBlock as n, createBlock as p, TransitionGroup as F, unref as e, normalizeClass as t, withCtx as N, createElementBlock as m, Fragment as z, renderList as I, withKeys as P, renderSlot as h, createCommentVNode as a, createElementVNode as b, withModifiers as K, createVNode as f, toDisplayString as L, normalizeStyle as S, nextTick as D } from "vue";
|
|
2
2
|
import "../form/index.js";
|
|
3
3
|
import { VftIcon as u } from "../icon/index.js";
|
|
4
|
-
import { VftProgress as
|
|
4
|
+
import { VftProgress as E } from "../progress/index.js";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "@vft/utils";
|
|
7
|
-
import { debugWarn as
|
|
7
|
+
import { debugWarn as U } from "../../utils/error.js";
|
|
8
8
|
import "../config-provider/hooks/use-global-config.js";
|
|
9
9
|
import "lodash-es";
|
|
10
10
|
import { useNamespace as g } from "../../hooks/use-namespace/index.js";
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
const j = ["onKeydown"], q = ["src"], A = ["onClick"], H = ["onClick"], J = ["onClick"], O = C({
|
|
14
|
+
import { useFormDisabled as G } from "../form/hooks/use-form-common-props.js";
|
|
15
|
+
import { useFormItem as M } from "../form/hooks/use-form-item.js";
|
|
16
|
+
const R = ["onKeydown"], W = ["src"], j = ["onClick"], q = ["onClick"], A = ["onClick"], H = C({
|
|
18
17
|
name: "VftUploadList"
|
|
19
|
-
}),
|
|
20
|
-
...
|
|
18
|
+
}), ae = /* @__PURE__ */ C({
|
|
19
|
+
...H,
|
|
21
20
|
props: {
|
|
22
21
|
files: { default: [] },
|
|
23
22
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -26,23 +25,23 @@ const j = ["onKeydown"], q = ["src"], A = ["onClick"], H = ["onClick"], J = ["on
|
|
|
26
25
|
listType: { default: "text" }
|
|
27
26
|
},
|
|
28
27
|
emits: ["remove"],
|
|
29
|
-
setup(l, { emit:
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
setup(l, { emit: T }) {
|
|
29
|
+
const w = T, i = g("upload"), c = g("icon"), $ = g("list"), d = G(), { formItem: V } = M(), y = B(!1), v = (k) => {
|
|
30
|
+
w("remove", k), D(() => {
|
|
31
|
+
V?.validate("change").catch((o) => U(o));
|
|
33
32
|
});
|
|
34
33
|
};
|
|
35
|
-
return (k,
|
|
34
|
+
return (k, o) => (n(), p(F, {
|
|
36
35
|
tag: "ul",
|
|
37
36
|
class: t([
|
|
38
37
|
e(i).b("list"),
|
|
39
38
|
e(i).bm("list", l.listType),
|
|
40
39
|
e(i).is("disabled", e(d))
|
|
41
40
|
]),
|
|
42
|
-
name: e(
|
|
41
|
+
name: e($).b()
|
|
43
42
|
}, {
|
|
44
|
-
default:
|
|
45
|
-
(n(!0), m(
|
|
43
|
+
default: N(() => [
|
|
44
|
+
(n(!0), m(z, null, I(l.files, (s, x) => (n(), m("li", {
|
|
46
45
|
key: s.uid || s.name,
|
|
47
46
|
class: t([
|
|
48
47
|
e(i).be("list", "item"),
|
|
@@ -50,94 +49,94 @@ const j = ["onKeydown"], q = ["src"], A = ["onClick"], H = ["onClick"], J = ["on
|
|
|
50
49
|
{ focusing: y.value }
|
|
51
50
|
]),
|
|
52
51
|
tabindex: "0",
|
|
53
|
-
onKeydown: P((r) => !e(d) &&
|
|
54
|
-
onFocus:
|
|
55
|
-
onBlur:
|
|
56
|
-
onClick:
|
|
52
|
+
onKeydown: P((r) => !e(d) && v(s), ["delete"]),
|
|
53
|
+
onFocus: o[0] || (o[0] = (r) => y.value = !0),
|
|
54
|
+
onBlur: o[1] || (o[1] = (r) => y.value = !1),
|
|
55
|
+
onClick: o[2] || (o[2] = (r) => y.value = !1)
|
|
57
56
|
}, [
|
|
58
57
|
h(k.$slots, "default", {
|
|
59
58
|
file: s,
|
|
60
|
-
index:
|
|
59
|
+
index: x
|
|
61
60
|
}, () => [
|
|
62
61
|
l.listType === "picture" || s.status !== "uploading" && l.listType === "picture-card" ? (n(), m("img", {
|
|
63
62
|
key: 0,
|
|
64
63
|
class: t(e(i).be("list", "item-thumbnail")),
|
|
65
64
|
src: s.url,
|
|
66
65
|
alt: ""
|
|
67
|
-
}, null, 10,
|
|
66
|
+
}, null, 10, W)) : a("", !0),
|
|
68
67
|
s.status === "uploading" || l.listType !== "picture-card" ? (n(), m("div", {
|
|
69
68
|
key: 1,
|
|
70
69
|
class: t(e(i).be("list", "item-info"))
|
|
71
70
|
}, [
|
|
72
|
-
|
|
71
|
+
b("a", {
|
|
73
72
|
class: t(e(i).be("list", "item-name")),
|
|
74
|
-
onClick:
|
|
73
|
+
onClick: K((r) => l.handlePreview(s), ["prevent"])
|
|
75
74
|
}, [
|
|
76
75
|
f(e(u), {
|
|
77
|
-
class: t(e(
|
|
76
|
+
class: t(e(c).m("document")),
|
|
78
77
|
icon: "icon-document"
|
|
79
78
|
}, null, 8, ["class"]),
|
|
80
|
-
|
|
79
|
+
b("span", {
|
|
81
80
|
class: t(e(i).be("list", "item-file-name"))
|
|
82
|
-
},
|
|
83
|
-
], 10,
|
|
84
|
-
s.status === "uploading" ? (n(), p(e(
|
|
81
|
+
}, L(s.name), 3)
|
|
82
|
+
], 10, j),
|
|
83
|
+
s.status === "uploading" ? (n(), p(e(E), {
|
|
85
84
|
key: 0,
|
|
86
85
|
type: l.listType === "picture-card" ? "circle" : "line",
|
|
87
86
|
"stroke-width": l.listType === "picture-card" ? 6 : 2,
|
|
88
87
|
percentage: Number(s.percentage),
|
|
89
|
-
style:
|
|
88
|
+
style: S(l.listType === "picture-card" ? "" : "margin-top: 0.5rem")
|
|
90
89
|
}, null, 8, ["type", "stroke-width", "percentage", "style"])) : a("", !0)
|
|
91
90
|
], 2)) : a("", !0),
|
|
92
|
-
|
|
91
|
+
b("label", {
|
|
93
92
|
class: t(e(i).be("list", "item-status-label"))
|
|
94
93
|
}, [
|
|
95
94
|
l.listType === "text" ? (n(), p(e(u), {
|
|
96
95
|
key: 0,
|
|
97
96
|
icon: "icon-circle-check",
|
|
98
|
-
class: t([e(
|
|
97
|
+
class: t([e(c).m("upload-success"), e(c).m("circle-check")])
|
|
99
98
|
}, null, 8, ["class"])) : ["picture-card", "picture"].includes(l.listType) ? (n(), p(e(u), {
|
|
100
99
|
key: 1,
|
|
101
100
|
icon: "icon-check",
|
|
102
|
-
class: t([e(
|
|
101
|
+
class: t([e(c).m("upload-success"), e(c).m("check")])
|
|
103
102
|
}, null, 8, ["class"])) : a("", !0)
|
|
104
103
|
], 2),
|
|
105
104
|
e(d) ? a("", !0) : (n(), p(e(u), {
|
|
106
105
|
key: 2,
|
|
107
106
|
icon: "icon-close",
|
|
108
|
-
class: t(e(
|
|
109
|
-
onClick: (r) =>
|
|
107
|
+
class: t(e(c).m("close")),
|
|
108
|
+
onClick: (r) => v(s)
|
|
110
109
|
}, null, 8, ["class", "onClick"])),
|
|
111
110
|
e(d) ? a("", !0) : (n(), m("i", {
|
|
112
111
|
key: 3,
|
|
113
|
-
class: t(e(
|
|
114
|
-
},
|
|
112
|
+
class: t(e(c).m("close-tip"))
|
|
113
|
+
}, " 按 delete 键可删除 ", 2)),
|
|
115
114
|
l.listType === "picture-card" ? (n(), m("span", {
|
|
116
115
|
key: 4,
|
|
117
116
|
class: t(e(i).be("list", "item-actions"))
|
|
118
117
|
}, [
|
|
119
|
-
|
|
118
|
+
b("span", {
|
|
120
119
|
class: t(e(i).be("list", "item-preview")),
|
|
121
120
|
onClick: (r) => l.handlePreview(s)
|
|
122
121
|
}, [
|
|
123
122
|
f(e(u), {
|
|
124
123
|
icon: "icon-zoom-in",
|
|
125
|
-
class: t(e(
|
|
124
|
+
class: t(e(c).m("zoom-in"))
|
|
126
125
|
}, null, 8, ["class"])
|
|
127
|
-
], 10,
|
|
126
|
+
], 10, q),
|
|
128
127
|
e(d) ? a("", !0) : (n(), m("span", {
|
|
129
128
|
key: 0,
|
|
130
129
|
class: t(e(i).be("list", "item-delete")),
|
|
131
|
-
onClick: (r) =>
|
|
130
|
+
onClick: (r) => v(s)
|
|
132
131
|
}, [
|
|
133
132
|
f(e(u), {
|
|
134
133
|
icon: "icon-delete",
|
|
135
|
-
class: t(e(
|
|
134
|
+
class: t(e(c).m("delete"))
|
|
136
135
|
}, null, 8, ["class"])
|
|
137
|
-
], 10,
|
|
136
|
+
], 10, A))
|
|
138
137
|
], 2)) : a("", !0)
|
|
139
138
|
])
|
|
140
|
-
], 42,
|
|
139
|
+
], 42, R))), 128)),
|
|
141
140
|
h(k.$slots, "append")
|
|
142
141
|
]),
|
|
143
142
|
_: 3
|
|
@@ -145,5 +144,5 @@ const j = ["onKeydown"], q = ["src"], A = ["onClick"], H = ["onClick"], J = ["on
|
|
|
145
144
|
}
|
|
146
145
|
});
|
|
147
146
|
export {
|
|
148
|
-
|
|
147
|
+
ae as default
|
|
149
148
|
};
|