disguise-ui 0.2.8 → 0.3.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/README.md +20 -0
- package/dist/{avatar-cell-BPzpEjQT.js → avatar-cell-CSanGG5Y.js} +1 -1
- package/dist/disguise-ui.js +221 -199
- package/dist/{file-upload-BkRSvBlx.js → file-upload-ClPojHbE.js} +1 -1
- package/dist/{file-upload-CeqibzK8.js → file-upload-D7N0tsLF.js} +2 -2
- package/dist/{i18n-DejVnxC8.js → i18n-_x6RCAst.js} +36 -2
- package/dist/{picture-cell-DApeh9FW.js → picture-cell-BhKqFZUx.js} +31 -32
- package/dist/picture-upload-BrrTtaCc.js +649 -0
- package/dist/{picture-upload-uc9FsqEo.js → picture-upload-VK7YOAr4.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/images-view/index.vue.d.ts +13 -1
- package/dist/types/components/picture-upload/image-crop-dialog.vue.d.ts +18 -0
- package/dist/types/components/picture-upload/index.d.ts +1 -0
- package/dist/types/components/picture-upload/picture-upload.type.d.ts +65 -0
- package/dist/types/components/picture-upload/picture-upload.vue.d.ts +30 -21
- package/dist/types/components/schema-form/schema-form.type.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/{use-multiple-file-upload-BFNkLVy-.js → use-multiple-file-upload-Cv2dfA07.js} +7 -5
- package/dist/{user-avatar-info-SD6OE607.js → user-avatar-info-BruEfYy4.js} +1 -1
- package/package.json +3 -2
- package/dist/picture-upload-E97PfpUU.js +0 -320
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./modal-CHOpDVLd.js";
|
|
2
|
-
import { n as t } from "./i18n-
|
|
2
|
+
import { n as t } from "./i18n-_x6RCAst.js";
|
|
3
3
|
import { t as n } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
4
4
|
import { t as r } from "./use-image-url-Bs5WMZ6L.js";
|
|
5
|
-
import { n as i, t as ee } from "./use-multiple-file-upload-
|
|
5
|
+
import { n as i, t as ee } from "./use-multiple-file-upload-Cv2dfA07.js";
|
|
6
6
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as te, createVNode as d, defineComponent as f, h as p, normalizeClass as m, normalizeStyle as h, openBlock as g, ref as _, renderList as v, resolveComponent as ne, resolveDynamicComponent as y, toDisplayString as b, toRefs as re, unref as x, withCtx as S } from "vue";
|
|
7
7
|
import { ElIcon as C, ElTooltip as w, ElUpload as ie } from "element-plus";
|
|
8
8
|
import { Delete as T, Download as E, Upload as ae, View as D } from "@element-plus/icons-vue";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { a as e, c as t } from "./context-DqlD6qDJ.js";
|
|
2
2
|
var n = {
|
|
3
3
|
pleaseSelect: "Please select",
|
|
4
|
-
close: "Close"
|
|
4
|
+
close: "Close",
|
|
5
|
+
cancel: "Cancel",
|
|
6
|
+
confirm: "Confirm"
|
|
5
7
|
}, r = {
|
|
6
8
|
components: {
|
|
7
9
|
title: "Components",
|
|
@@ -200,6 +202,21 @@ var n = {
|
|
|
200
202
|
remove: "Remove",
|
|
201
203
|
typeNotAllowed: "Only {types} is supported",
|
|
202
204
|
sizeLimitExceeded: "Image size cannot exceed {size}MB"
|
|
205
|
+
},
|
|
206
|
+
pictureUpload: {
|
|
207
|
+
cropTitle: "Crop image",
|
|
208
|
+
cropHint: "Drag the crop area and resize it from the corners",
|
|
209
|
+
resultSize: "Crop size",
|
|
210
|
+
aspectRatio: "Aspect ratio",
|
|
211
|
+
selectAspectRatio: "Crop ratio",
|
|
212
|
+
cropFailed: "Failed to crop the image",
|
|
213
|
+
readFailed: "Unable to read image dimensions",
|
|
214
|
+
widthExact: "Image width must be {width}px",
|
|
215
|
+
heightExact: "Image height must be {height}px",
|
|
216
|
+
widthMin: "Image width must be at least {width}px",
|
|
217
|
+
heightMin: "Image height must be at least {height}px",
|
|
218
|
+
widthMax: "Image width must not exceed {width}px",
|
|
219
|
+
heightMax: "Image height must not exceed {height}px"
|
|
203
220
|
}
|
|
204
221
|
}, i = {
|
|
205
222
|
copy: "Copy",
|
|
@@ -222,7 +239,9 @@ var n = {
|
|
|
222
239
|
selectField: "Select {field}"
|
|
223
240
|
}, s = {
|
|
224
241
|
pleaseSelect: "请选择",
|
|
225
|
-
close: "关闭"
|
|
242
|
+
close: "关闭",
|
|
243
|
+
cancel: "取消",
|
|
244
|
+
confirm: "确定"
|
|
226
245
|
}, c = {
|
|
227
246
|
components: {
|
|
228
247
|
title: "组件",
|
|
@@ -421,6 +440,21 @@ var n = {
|
|
|
421
440
|
remove: "删除",
|
|
422
441
|
typeNotAllowed: "仅支持 {types} 格式",
|
|
423
442
|
sizeLimitExceeded: "图片大小不能超过 {size}MB"
|
|
443
|
+
},
|
|
444
|
+
pictureUpload: {
|
|
445
|
+
cropTitle: "裁剪图片",
|
|
446
|
+
cropHint: "拖动裁剪框调整区域,拖动四角调整大小",
|
|
447
|
+
resultSize: "裁剪尺寸",
|
|
448
|
+
aspectRatio: "宽高比",
|
|
449
|
+
selectAspectRatio: "裁剪比例",
|
|
450
|
+
cropFailed: "图片裁剪失败",
|
|
451
|
+
readFailed: "无法读取图片尺寸",
|
|
452
|
+
widthExact: "图片宽度必须为 {width}px",
|
|
453
|
+
heightExact: "图片高度必须为 {height}px",
|
|
454
|
+
widthMin: "图片宽度不能小于 {width}px",
|
|
455
|
+
heightMin: "图片高度不能小于 {height}px",
|
|
456
|
+
widthMax: "图片宽度不能大于 {width}px",
|
|
457
|
+
heightMax: "图片高度不能大于 {height}px"
|
|
424
458
|
}
|
|
425
459
|
}, l = {
|
|
426
460
|
copy: "复制",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
2
|
-
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeStyle as d, openBlock as f, renderList as p,
|
|
3
|
-
import { ElEmpty as
|
|
4
|
-
import { Loading as
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeStyle as d, openBlock as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useAttrs as _, withCtx as v } from "vue";
|
|
3
|
+
import { ElEmpty as y, ElIcon as b, ElImage as x, ElTooltip as S } from "element-plus";
|
|
4
|
+
import { Loading as C, Picture as w } from "@element-plus/icons-vue";
|
|
5
5
|
// \0rolldown/runtime.js
|
|
6
|
-
var
|
|
6
|
+
var T = Object.defineProperty, E = (e, t) => {
|
|
7
7
|
let n = {};
|
|
8
|
-
for (var r in e)
|
|
8
|
+
for (var r in e) T(n, r, {
|
|
9
9
|
get: e[r],
|
|
10
10
|
enumerable: !0
|
|
11
11
|
});
|
|
12
|
-
return t ||
|
|
13
|
-
},
|
|
12
|
+
return t || T(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
13
|
+
}, D = { class: "inline-block" }, O = ["src"], k = { class: "flex h-full w-full items-center justify-center text-gray-400" }, A = { class: "flex h-full w-full items-center justify-center text-gray-400" }, j = /* @__PURE__ */ l({
|
|
14
14
|
name: "ImagesView",
|
|
15
15
|
__name: "index",
|
|
16
16
|
props: {
|
|
@@ -20,13 +20,13 @@ var w = Object.defineProperty, T = (e, t) => {
|
|
|
20
20
|
offset: { default: 6 }
|
|
21
21
|
},
|
|
22
22
|
setup(e) {
|
|
23
|
-
let l = e, u = n(() => [...l.images.slice(0, l.maxStack)].reverse()),
|
|
23
|
+
let l = e, u = n(() => [...l.images.slice(0, l.maxStack)].reverse()), _ = n(() => {
|
|
24
24
|
let e = (Math.min(l.images.length, l.maxStack) - 1) * l.offset;
|
|
25
25
|
return {
|
|
26
26
|
width: `${l.size + e}px`,
|
|
27
27
|
height: `${l.size + e}px`
|
|
28
28
|
};
|
|
29
|
-
}),
|
|
29
|
+
}), T = (e) => {
|
|
30
30
|
let t = e === Math.min(l.images.length, l.maxStack) - 1, n = e * l.offset;
|
|
31
31
|
return {
|
|
32
32
|
width: `${l.size}px`,
|
|
@@ -37,11 +37,11 @@ var w = Object.defineProperty, T = (e, t) => {
|
|
|
37
37
|
boxShadow: t ? "none" : "0 1px 4px rgba(0,0,0,0.08)"
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
return (n,
|
|
40
|
+
return (n, E) => (f(), a("div", D, [e.images.length ? (f(), a("div", {
|
|
41
41
|
key: 0,
|
|
42
42
|
class: "relative",
|
|
43
|
-
style: d(
|
|
44
|
-
}, [(f(!0), a(t, null, p(u.value, (t, n) => (f(), r(
|
|
43
|
+
style: d(_.value)
|
|
44
|
+
}, [(f(!0), a(t, null, p(u.value, (t, n) => (f(), r(g(S), {
|
|
45
45
|
key: n,
|
|
46
46
|
placement: "top",
|
|
47
47
|
effect: "light",
|
|
@@ -49,18 +49,18 @@ var w = Object.defineProperty, T = (e, t) => {
|
|
|
49
49
|
teleported: !0,
|
|
50
50
|
"z-index": 9e3
|
|
51
51
|
}, {
|
|
52
|
-
content:
|
|
52
|
+
content: v(() => [o("img", {
|
|
53
53
|
src: t,
|
|
54
54
|
style: {
|
|
55
55
|
display: "block",
|
|
56
56
|
"max-width": "300px",
|
|
57
57
|
"max-height": "300px"
|
|
58
58
|
}
|
|
59
|
-
}, null, 8,
|
|
60
|
-
default:
|
|
59
|
+
}, null, 8, O)]),
|
|
60
|
+
default: v(() => [o("div", {
|
|
61
61
|
class: "group absolute overflow-hidden rounded-md border border-gray-200 bg-gray-50 cursor-pointer transition-all duration-200 hover:-translate-y-px hover:border-blue-500",
|
|
62
|
-
style: d(
|
|
63
|
-
}, [c(
|
|
62
|
+
style: d(T(n))
|
|
63
|
+
}, [c(g(x), {
|
|
64
64
|
src: t,
|
|
65
65
|
fit: "cover",
|
|
66
66
|
class: "block h-full w-full",
|
|
@@ -70,12 +70,12 @@ var w = Object.defineProperty, T = (e, t) => {
|
|
|
70
70
|
"hide-on-click-modal": !0,
|
|
71
71
|
"z-index": 3e3
|
|
72
72
|
}, {
|
|
73
|
-
placeholder:
|
|
74
|
-
default:
|
|
73
|
+
placeholder: v(() => [o("div", k, [c(g(b), { class: "is-loading text-xl" }, {
|
|
74
|
+
default: v(() => [c(g(C))]),
|
|
75
75
|
_: 1
|
|
76
76
|
})])]),
|
|
77
|
-
error:
|
|
78
|
-
default:
|
|
77
|
+
error: v(() => [o("div", A, [c(g(b), { class: "text-xl" }, {
|
|
78
|
+
default: v(() => [c(g(w))]),
|
|
79
79
|
_: 1
|
|
80
80
|
})])]),
|
|
81
81
|
_: 1
|
|
@@ -91,18 +91,17 @@ var w = Object.defineProperty, T = (e, t) => {
|
|
|
91
91
|
fontSize: l.size / 4
|
|
92
92
|
}),
|
|
93
93
|
class: "pointer-events-none absolute right-1 bottom-1 inline-flex items-center gap-0.5 rounded-full bg-black/60 px-1.5 py-px text-xs leading-tight text-white"
|
|
94
|
-
}, [c(
|
|
95
|
-
default:
|
|
94
|
+
}, [c(g(b), { size: l.size / 4 }, {
|
|
95
|
+
default: v(() => [c(g(w))]),
|
|
96
96
|
_: 1
|
|
97
|
-
}, 8, ["size"]), s(" " +
|
|
97
|
+
}, 8, ["size"]), s(" " + h(e.images.length), 1)], 4)) : i("", !0)], 4)]),
|
|
98
98
|
_: 2
|
|
99
|
-
}, 1024))), 128))], 4)) : (
|
|
100
|
-
key: 1,
|
|
99
|
+
}, 1024))), 128))], 4)) : m(n.$slots, "empty", {}, () => [c(g(y), {
|
|
101
100
|
description: "暂无图片",
|
|
102
101
|
"image-size": 40
|
|
103
|
-
}))]));
|
|
102
|
+
})], void 0, 1)]));
|
|
104
103
|
}
|
|
105
|
-
}),
|
|
104
|
+
}), M = { class: "picture-cell flex" }, N = { key: 1 }, P = /*@__PURE__*/ l({
|
|
106
105
|
inheritAttrs: !1,
|
|
107
106
|
__name: "picture-cell",
|
|
108
107
|
props: {
|
|
@@ -111,11 +110,11 @@ var w = Object.defineProperty, T = (e, t) => {
|
|
|
111
110
|
imageListProps: { default: () => ({}) }
|
|
112
111
|
},
|
|
113
112
|
setup(e) {
|
|
114
|
-
let t = e, i =
|
|
113
|
+
let t = e, i = _(), o = n(() => t.urls.filter((e) => e)), s = n(() => o.value.slice(0, t.maxPreviewCount)), c = n(() => ({
|
|
115
114
|
...i,
|
|
116
115
|
...t.imageListProps ?? {}
|
|
117
116
|
}));
|
|
118
|
-
return (e, t) => (f(), a("div",
|
|
117
|
+
return (e, t) => (f(), a("div", M, [s.value.length > 0 ? (f(), r(j, u({ key: 0 }, c.value, { images: s.value }), null, 16, ["images"])) : (f(), a("span", N, "-"))]));
|
|
119
118
|
}
|
|
120
|
-
}),
|
|
121
|
-
export {
|
|
119
|
+
}), F = /* @__PURE__ */ E({ default: () => I }), I = /*#__PURE__*/ e(P, [["__scopeId", "data-v-cb2252bb"]]);
|
|
120
|
+
export { E as i, F as n, j as r, I as t };
|