iking-web-ui-pro 0.2.11 → 0.2.13
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/IKDetailPreviewFiles/ik.index.es.js +116 -111
- package/dist/IKDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IKDetailPreviewFiles/style.css +1 -1
- package/dist/IKExpandCollapse/ik.index.es.js +2 -2
- package/dist/IKExpandCollapse/ik.index.umd.js +1 -1
- package/dist/IKExpandCollapse/style.css +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +172 -167
- package/dist/IKPreviewFile/ik.index.umd.js +1 -1
- package/dist/IKPreviewFile/style.css +1 -1
- package/dist/IKVerticalStepBar/ik.index.es.js +2 -2
- package/dist/IKVerticalStepBar/ik.index.umd.js +1 -1
- package/dist/IKVerticalStepBar/style.css +1 -1
- package/dist/IkApprovalProcess/ik.index.es.js +194 -190
- package/dist/IkApprovalProcess/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +645 -636
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/style.css +1 -1
- package/dist/IkBaseDialog/ik.index.es.js +2 -2
- package/dist/IkBaseDialog/ik.index.umd.js +1 -1
- package/dist/IkBaseDialog/style.css +1 -1
- package/dist/IkBtnSetting/ik.index.es.js +2 -2
- package/dist/IkBtnSetting/ik.index.umd.js +1 -1
- package/dist/IkBtnSetting/style.css +1 -1
- package/dist/IkCollapseCard/ik.index.es.js +2 -2
- package/dist/IkCollapseCard/ik.index.umd.js +1 -1
- package/dist/IkCollapseCard/style.css +1 -1
- package/dist/IkDescription/ik.index.es.js +329 -324
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkDescription/style.css +1 -1
- package/dist/IkIconPicker/ik.index.es.js +2 -2
- package/dist/IkIconPicker/ik.index.umd.js +1 -1
- package/dist/IkIconPicker/style.css +1 -1
- package/dist/IkMonacoEditor/ik.index.es.js +2 -2
- package/dist/IkMonacoEditor/ik.index.umd.js +1 -1
- package/dist/IkMonacoEditor/style.css +1 -1
- package/dist/IkPageFull/ik.index.es.js +2 -2
- package/dist/IkPageFull/ik.index.umd.js +1 -1
- package/dist/IkPageFull/style.css +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +206 -203
- package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
- package/dist/IkPreviewFileDialog/style.css +1 -1
- package/dist/IkSchedule/ik.index.es.js +2 -2
- package/dist/IkSchedule/ik.index.umd.js +1 -1
- package/dist/IkSchedule/style.css +1 -1
- package/dist/IkSideText/ik.index.es.js +2 -2
- package/dist/IkSideText/ik.index.umd.js +1 -1
- package/dist/IkSideText/style.css +1 -1
- package/dist/IkSvgIcon/ik.index.es.js +8 -8
- package/dist/IkSvgIcon/ik.index.umd.js +1 -1
- package/dist/IkSvgIcon/style.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +112 -109
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +84 -84
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +12672 -12663
- package/dist/index.umd.js +60 -60
- package/dist/src/components/IkMonacoEditor/src/editor-config.d.ts +1 -1
- package/dist/src/components/IkPlayer-beta/index.d.ts +76 -0
- package/dist/src/components/IkPlayer-beta/src/player.d.ts +19 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/src/components/IkPickerUser/src/list/utils.d.ts +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as $, openBlock as u, createElementBlock as r, createElementVNode as
|
|
2
|
-
import { ElUpload as ge, ElIcon as x, ElImage as
|
|
1
|
+
import { defineComponent as $, openBlock as u, createElementBlock as r, createElementVNode as n, inject as C, computed as y, resolveComponent as H, normalizeClass as b, normalizeStyle as z, createCommentVNode as M, createBlock as E, withCtx as m, createTextVNode as R, toDisplayString as U, mergeModels as O, useModel as ue, watch as re, ref as S, Fragment as N, createVNode as _, unref as p, mergeProps as ce, createSlots as de, renderSlot as ve, withDirectives as P, vShow as W, renderList as pe, pushScopeId as _e, popScopeId as he } from "vue";
|
|
2
|
+
import { ElUpload as ge, ElIcon as x, ElImage as fe, ElImageViewer as me, ElMessage as F } from "element-plus";
|
|
3
3
|
import { ikColor as ye, _ as we, ikFile as ke } from "iking-utils-pro";
|
|
4
4
|
const G = (l, c) => {
|
|
5
5
|
if (l.install = (i) => {
|
|
@@ -19,7 +19,7 @@ var be = /* @__PURE__ */ $({
|
|
|
19
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20
20
|
viewBox: "0 0 1024 1024"
|
|
21
21
|
}, [
|
|
22
|
-
|
|
22
|
+
n("path", {
|
|
23
23
|
fill: "currentColor",
|
|
24
24
|
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
25
25
|
})
|
|
@@ -33,7 +33,7 @@ var be = /* @__PURE__ */ $({
|
|
|
33
33
|
xmlns: "http://www.w3.org/2000/svg",
|
|
34
34
|
viewBox: "0 0 1024 1024"
|
|
35
35
|
}, [
|
|
36
|
-
|
|
36
|
+
n("path", {
|
|
37
37
|
fill: "currentColor",
|
|
38
38
|
d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
|
|
39
39
|
})
|
|
@@ -47,7 +47,7 @@ var be = /* @__PURE__ */ $({
|
|
|
47
47
|
xmlns: "http://www.w3.org/2000/svg",
|
|
48
48
|
viewBox: "0 0 1024 1024"
|
|
49
49
|
}, [
|
|
50
|
-
|
|
50
|
+
n("path", {
|
|
51
51
|
fill: "currentColor",
|
|
52
52
|
d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"
|
|
53
53
|
})
|
|
@@ -61,7 +61,7 @@ var be = /* @__PURE__ */ $({
|
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
viewBox: "0 0 1024 1024"
|
|
63
63
|
}, [
|
|
64
|
-
|
|
64
|
+
n("path", {
|
|
65
65
|
fill: "currentColor",
|
|
66
66
|
d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
|
|
67
67
|
})
|
|
@@ -75,7 +75,7 @@ var be = /* @__PURE__ */ $({
|
|
|
75
75
|
xmlns: "http://www.w3.org/2000/svg",
|
|
76
76
|
viewBox: "0 0 1024 1024"
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
n("path", {
|
|
79
79
|
fill: "currentColor",
|
|
80
80
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
|
|
81
81
|
})
|
|
@@ -96,7 +96,7 @@ const D = (l, c) => {
|
|
|
96
96
|
"p-id": "8490",
|
|
97
97
|
width: "200",
|
|
98
98
|
height: "200"
|
|
99
|
-
}, je = /* @__PURE__ */
|
|
99
|
+
}, je = /* @__PURE__ */ n(
|
|
100
100
|
"path",
|
|
101
101
|
{
|
|
102
102
|
d: "M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z",
|
|
@@ -105,7 +105,7 @@ const D = (l, c) => {
|
|
|
105
105
|
null,
|
|
106
106
|
-1
|
|
107
107
|
/* HOISTED */
|
|
108
|
-
), Ee = /* @__PURE__ */
|
|
108
|
+
), Ee = /* @__PURE__ */ n(
|
|
109
109
|
"path",
|
|
110
110
|
{
|
|
111
111
|
d: "M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z",
|
|
@@ -114,7 +114,7 @@ const D = (l, c) => {
|
|
|
114
114
|
null,
|
|
115
115
|
-1
|
|
116
116
|
/* HOISTED */
|
|
117
|
-
), De = /* @__PURE__ */
|
|
117
|
+
), De = /* @__PURE__ */ n(
|
|
118
118
|
"path",
|
|
119
119
|
{
|
|
120
120
|
d: "M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z",
|
|
@@ -123,7 +123,7 @@ const D = (l, c) => {
|
|
|
123
123
|
null,
|
|
124
124
|
-1
|
|
125
125
|
/* HOISTED */
|
|
126
|
-
), Te = /* @__PURE__ */
|
|
126
|
+
), Te = /* @__PURE__ */ n(
|
|
127
127
|
"path",
|
|
128
128
|
{
|
|
129
129
|
d: "M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z",
|
|
@@ -132,7 +132,7 @@ const D = (l, c) => {
|
|
|
132
132
|
null,
|
|
133
133
|
-1
|
|
134
134
|
/* HOISTED */
|
|
135
|
-
), Ae = /* @__PURE__ */
|
|
135
|
+
), Ae = /* @__PURE__ */ n(
|
|
136
136
|
"path",
|
|
137
137
|
{
|
|
138
138
|
d: "M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z",
|
|
@@ -141,7 +141,7 @@ const D = (l, c) => {
|
|
|
141
141
|
null,
|
|
142
142
|
-1
|
|
143
143
|
/* HOISTED */
|
|
144
|
-
), He = /* @__PURE__ */
|
|
144
|
+
), He = /* @__PURE__ */ n(
|
|
145
145
|
"path",
|
|
146
146
|
{
|
|
147
147
|
d: "M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z",
|
|
@@ -150,7 +150,7 @@ const D = (l, c) => {
|
|
|
150
150
|
null,
|
|
151
151
|
-1
|
|
152
152
|
/* HOISTED */
|
|
153
|
-
), Oe = /* @__PURE__ */
|
|
153
|
+
), Oe = /* @__PURE__ */ n(
|
|
154
154
|
"path",
|
|
155
155
|
{
|
|
156
156
|
d: "M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z",
|
|
@@ -159,7 +159,7 @@ const D = (l, c) => {
|
|
|
159
159
|
null,
|
|
160
160
|
-1
|
|
161
161
|
/* HOISTED */
|
|
162
|
-
), Ne = /* @__PURE__ */
|
|
162
|
+
), Ne = /* @__PURE__ */ n(
|
|
163
163
|
"path",
|
|
164
164
|
{
|
|
165
165
|
d: "M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z",
|
|
@@ -182,17 +182,17 @@ function We(l, c) {
|
|
|
182
182
|
return u(), r("svg", Ve, Pe);
|
|
183
183
|
}
|
|
184
184
|
const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
185
|
-
const c = C("loadUrl"), i = y(() => l.loadUrl || (c == null ? void 0 : c.value)), e = C("uploadUrl"), d = y(() => l.action || l.uploadUrl || (e == null ? void 0 : e.value)), h = C("token"),
|
|
185
|
+
const c = C("loadUrl"), i = y(() => l.loadUrl || l.fileUrl || (c == null ? void 0 : c.value)), e = C("uploadUrl"), d = y(() => l.action || l.uploadUrl || (e == null ? void 0 : e.value)), h = C("token"), o = y(() => l.token || (h == null ? void 0 : h.value)), w = C("onlyofficeConfig"), B = y(() => l.onlyofficeConfig || (w == null ? void 0 : w.value)), g = C("userInfo"), f = y(() => l.userInfo || (g == null ? void 0 : g.value));
|
|
186
186
|
return {
|
|
187
187
|
cLoadUrl: i,
|
|
188
188
|
cUploadUrl: d,
|
|
189
|
-
cToken:
|
|
189
|
+
cToken: o,
|
|
190
190
|
cOnlyofficeConfig: B,
|
|
191
|
-
cUserInfo:
|
|
191
|
+
cUserInfo: f
|
|
192
192
|
};
|
|
193
193
|
}, Ge = Re, Je = {
|
|
194
194
|
key: 0,
|
|
195
|
-
class: "ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"
|
|
195
|
+
class: "ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"
|
|
196
196
|
}, Xe = {
|
|
197
197
|
key: 1,
|
|
198
198
|
class: "h-[1em] w-[1em]",
|
|
@@ -232,27 +232,27 @@ const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
|
232
232
|
...(i == null ? void 0 : i.value) || {},
|
|
233
233
|
...c
|
|
234
234
|
})), d = y(() => {
|
|
235
|
-
const { name:
|
|
236
|
-
return /^http?:\/\//.test(
|
|
235
|
+
const { name: o } = e.value;
|
|
236
|
+
return /^http?:\/\//.test(o) ? "img" : /i-[^:]+:[^:]+/.test(o) ? "unocss" : o != null && o.startsWith("iksig") ? "iksig" : o != null && o.includes(":") ? "iconify" : o != null && o.startsWith("iksvg") ? "svg" : "i";
|
|
237
237
|
}), h = y(() => {
|
|
238
|
-
const
|
|
238
|
+
const o = [];
|
|
239
239
|
if (e.value.flip)
|
|
240
240
|
switch (e.value.flip) {
|
|
241
241
|
case "horizontal":
|
|
242
|
-
|
|
242
|
+
o.push("rotateY(180deg)");
|
|
243
243
|
break;
|
|
244
244
|
case "vertical":
|
|
245
|
-
|
|
245
|
+
o.push("rotateX(180deg)");
|
|
246
246
|
break;
|
|
247
247
|
case "both":
|
|
248
|
-
|
|
248
|
+
o.push("rotateX(180deg)"), o.push("rotateY(180deg)");
|
|
249
249
|
break;
|
|
250
250
|
}
|
|
251
|
-
e.value.rotate &&
|
|
251
|
+
e.value.rotate && o.push(`rotate(${e.value.rotate % 360}deg)`);
|
|
252
252
|
const w = {
|
|
253
253
|
...e.value.color && { color: e.value.color },
|
|
254
254
|
...e.value.size && { fontSize: typeof e.value.size == "number" ? `${e.value.size}px` : e.value.size },
|
|
255
|
-
...
|
|
255
|
+
...o.length && { transform: o.join(" ") },
|
|
256
256
|
padding: e.value.showBg || e.value.bg ? e.value.padding : 0,
|
|
257
257
|
...e.value.color && d.value !== "iksig" ? {
|
|
258
258
|
"--ik-color-icon-dark": e.value.color,
|
|
@@ -261,7 +261,7 @@ const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
|
261
261
|
};
|
|
262
262
|
return e.value.width && (w.width = w.height = typeof e.value.width == "number" ? `${e.value.width}px` : e.value.width), w;
|
|
263
263
|
});
|
|
264
|
-
return (
|
|
264
|
+
return (o, w) => {
|
|
265
265
|
const B = H("el-tooltip"), g = H("el-button");
|
|
266
266
|
return e.value.tableIconType === "icon" || !e.value.tableIconType ? (u(), r("span", Je, [
|
|
267
267
|
e.value.notip || !e.value.title ? (u(), r(
|
|
@@ -269,14 +269,14 @@ const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
|
269
269
|
{
|
|
270
270
|
key: 0,
|
|
271
271
|
class: b(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
272
|
-
[
|
|
272
|
+
[o.name]: d.value === "unocss",
|
|
273
273
|
"show-bg": e.value.showBg || e.value.bg,
|
|
274
274
|
default: e.value.size === "default",
|
|
275
275
|
small: e.value.size === "small",
|
|
276
276
|
big: e.value.size === "big",
|
|
277
277
|
warning: e.value.warning || e.value.type === "warning",
|
|
278
278
|
primary: e.value.primary || e.value.type === "primary",
|
|
279
|
-
success:
|
|
279
|
+
success: o.success || e.value.type === "success",
|
|
280
280
|
error: e.value.error || e.value.type === "error",
|
|
281
281
|
active: e.value.active,
|
|
282
282
|
disabled: e.value.disabled
|
|
@@ -296,7 +296,7 @@ const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
|
296
296
|
6
|
|
297
297
|
/* CLASS, STYLE */
|
|
298
298
|
)) : d.value === "svg" ? (u(), r("svg", Xe, [
|
|
299
|
-
|
|
299
|
+
n("use", {
|
|
300
300
|
"xlink:href": `#${e.value.name}`
|
|
301
301
|
}, null, 8, Ye)
|
|
302
302
|
])) : d.value === "img" ? (u(), r("img", {
|
|
@@ -322,19 +322,19 @@ const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
|
322
322
|
content: e.value.title,
|
|
323
323
|
placement: "top"
|
|
324
324
|
}, {
|
|
325
|
-
default:
|
|
326
|
-
|
|
325
|
+
default: m(() => [
|
|
326
|
+
n(
|
|
327
327
|
"i",
|
|
328
328
|
{
|
|
329
329
|
class: b(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
330
|
-
[
|
|
330
|
+
[o.name]: d.value === "unocss",
|
|
331
331
|
"show-bg": e.value.showBg || e.value.bg,
|
|
332
332
|
default: e.value.size === "default",
|
|
333
333
|
small: e.value.size === "small",
|
|
334
334
|
big: e.value.size === "big",
|
|
335
335
|
warning: e.value.warning || e.value.type === "warning",
|
|
336
|
-
primary:
|
|
337
|
-
success:
|
|
336
|
+
primary: o.primary || e.value.type === "primary",
|
|
337
|
+
success: o.success || e.value.type === "success",
|
|
338
338
|
error: e.value.error || e.value.type === "error",
|
|
339
339
|
active: e.value.active
|
|
340
340
|
}]),
|
|
@@ -352,7 +352,7 @@ const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
|
352
352
|
6
|
|
353
353
|
/* CLASS, STYLE */
|
|
354
354
|
)) : d.value === "svg" ? (u(), r("svg", qe, [
|
|
355
|
-
|
|
355
|
+
n("use", {
|
|
356
356
|
"xlink:href": `#${e.value.name}`
|
|
357
357
|
}, null, 8, Ke)
|
|
358
358
|
])) : d.value === "img" ? (u(), r("img", {
|
|
@@ -382,7 +382,7 @@ const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
|
382
382
|
key: 1,
|
|
383
383
|
type: ["warning", "error"].includes(e.value.type) ? "danger" : ""
|
|
384
384
|
}, {
|
|
385
|
-
default:
|
|
385
|
+
default: m(() => [
|
|
386
386
|
R(
|
|
387
387
|
U(e.value.title),
|
|
388
388
|
1
|
|
@@ -395,19 +395,19 @@ const Fe = /* @__PURE__ */ D(Ue, [["render", We]]), Re = (l) => {
|
|
|
395
395
|
};
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
|
-
const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-
|
|
398
|
+
const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-76d7e119"]]), lt = G(tt), J = (l) => (_e("data-v-127175a6"), l = l(), he(), l), at = {
|
|
399
399
|
key: 1,
|
|
400
400
|
class: "upload-btn"
|
|
401
|
-
}, st = { class: "tip" },
|
|
401
|
+
}, st = { class: "tip" }, nt = { class: "loading-statu" }, ot = { class: "operate-btn" }, it = { key: 0 }, ut = {
|
|
402
402
|
class: "el-upload-list el-upload-list--picture-card",
|
|
403
403
|
style: { float: "left" }
|
|
404
|
-
}, rt = ["onClick"], ct = /* @__PURE__ */ J(() => /* @__PURE__ */
|
|
404
|
+
}, rt = ["onClick"], ct = /* @__PURE__ */ J(() => /* @__PURE__ */ n(
|
|
405
405
|
"span",
|
|
406
406
|
{ class: "error" },
|
|
407
407
|
"上传错误",
|
|
408
408
|
-1
|
|
409
409
|
/* HOISTED */
|
|
410
|
-
)), dt = /* @__PURE__ */ J(() => /* @__PURE__ */
|
|
410
|
+
)), dt = /* @__PURE__ */ J(() => /* @__PURE__ */ n(
|
|
411
411
|
"p",
|
|
412
412
|
null,
|
|
413
413
|
"点击重新上传",
|
|
@@ -503,29 +503,29 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
503
503
|
const s = ((k = a.url) == null ? void 0 : k.startsWith("http")) || ((L = a.url) == null ? void 0 : L.startsWith("blob")), v = (a == null ? void 0 : a.url) || a;
|
|
504
504
|
return {
|
|
505
505
|
...a.url ? a : { url: v },
|
|
506
|
-
__url: s ? v : `${
|
|
506
|
+
__url: s ? v : `${o.value}${v}`
|
|
507
507
|
};
|
|
508
508
|
}) : t ? [
|
|
509
509
|
{
|
|
510
510
|
url: t,
|
|
511
|
-
__url: t != null && t.startsWith("http") || t != null && t.startsWith("blob") ? t : `${
|
|
511
|
+
__url: t != null && t.startsWith("http") || t != null && t.startsWith("blob") ? t : `${o.value}${t}`
|
|
512
512
|
}
|
|
513
513
|
] : [];
|
|
514
514
|
re(
|
|
515
515
|
() => e.value,
|
|
516
516
|
(t) => {
|
|
517
|
-
!t || !t.length ?
|
|
517
|
+
!t || !t.length ? f.value = [] : f.value = we.cloneDeep(d(t));
|
|
518
518
|
},
|
|
519
519
|
{ deep: !0 }
|
|
520
520
|
);
|
|
521
|
-
const h = c, { cLoadUrl:
|
|
521
|
+
const h = c, { cLoadUrl: o, cUploadUrl: w } = Ge(i), B = y(() => i.size), g = S(null), f = S(d(e.value)), I = S([]), V = S(!1), T = S(0), X = y(
|
|
522
522
|
() => i.tipText || `最多可上传${i.limit}张图片, 每张图片不能超过${i.size}MB`
|
|
523
523
|
), Y = (t, a) => {
|
|
524
524
|
}, Z = (t) => {
|
|
525
525
|
if (!t.type.includes("image")) {
|
|
526
526
|
F.warning("只允许上传图片!");
|
|
527
527
|
try {
|
|
528
|
-
|
|
528
|
+
f.value.pop();
|
|
529
529
|
} catch {
|
|
530
530
|
}
|
|
531
531
|
return !1;
|
|
@@ -533,7 +533,7 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
533
533
|
if (!(t.size / 1024 / 1024 < B.value)) {
|
|
534
534
|
F.warning("图片大小超出限制!");
|
|
535
535
|
try {
|
|
536
|
-
|
|
536
|
+
f.value.pop();
|
|
537
537
|
} catch {
|
|
538
538
|
}
|
|
539
539
|
return !1;
|
|
@@ -549,7 +549,7 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
549
549
|
for (; k < v && k < (t == null ? void 0 : t.length); )
|
|
550
550
|
(L = g.value) == null || L.handleStart(t == null ? void 0 : t[k]), (A = g.value) == null || A.submit(), k++;
|
|
551
551
|
}, ee = (t, a, s) => {
|
|
552
|
-
h("success", t, a, s), e.value =
|
|
552
|
+
h("success", t, a, s), e.value = f.value;
|
|
553
553
|
}, te = (t, a, s) => {
|
|
554
554
|
I.value.push({
|
|
555
555
|
...a,
|
|
@@ -563,12 +563,12 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
563
563
|
}, se = (t) => {
|
|
564
564
|
var a;
|
|
565
565
|
(a = g.value) == null || a.abort(t);
|
|
566
|
-
},
|
|
566
|
+
}, ne = (t) => {
|
|
567
567
|
var a;
|
|
568
|
-
t.status !== "success" && se(t), e.value = (a =
|
|
569
|
-
},
|
|
568
|
+
t.status !== "success" && se(t), e.value = (a = f.value) == null ? void 0 : a.filter((s) => s.uid !== t.uid), h("delete", t);
|
|
569
|
+
}, oe = (t, a) => {
|
|
570
570
|
I.value.splice(a, 1);
|
|
571
|
-
}, ie = y(() =>
|
|
571
|
+
}, ie = y(() => f.value.length + I.value.length < i.limit), j = y(
|
|
572
572
|
() => e.value.length >= i.limit || i.disabled
|
|
573
573
|
);
|
|
574
574
|
return (t, a) => (u(), r(
|
|
@@ -584,8 +584,8 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
584
584
|
action: p(w),
|
|
585
585
|
headers: l.headers,
|
|
586
586
|
data: l.data,
|
|
587
|
-
"file-list":
|
|
588
|
-
"onUpdate:fileList": a[0] || (a[0] = (s) =>
|
|
587
|
+
"file-list": f.value,
|
|
588
|
+
"onUpdate:fileList": a[0] || (a[0] = (s) => f.value = s),
|
|
589
589
|
multiple: l.multiple,
|
|
590
590
|
limit: l.limit,
|
|
591
591
|
"on-change": Y,
|
|
@@ -596,10 +596,10 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
596
596
|
"on-error": te,
|
|
597
597
|
drag: ""
|
|
598
598
|
}, t.$attrs, { disabled: j.value }), de({
|
|
599
|
-
trigger:
|
|
599
|
+
trigger: m(() => [
|
|
600
600
|
t.$slots.trigger ? ve(t.$slots, "trigger", { key: 0 }, void 0, !0) : (u(), r("div", at, [
|
|
601
601
|
_(p(x), { size: 20 }, {
|
|
602
|
-
default:
|
|
602
|
+
default: m(() => [
|
|
603
603
|
_(p(lt), {
|
|
604
604
|
name: "iksvg_guanbibeifen",
|
|
605
605
|
disabled: j.value
|
|
@@ -608,7 +608,7 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
608
608
|
_: 1
|
|
609
609
|
/* STABLE */
|
|
610
610
|
}),
|
|
611
|
-
|
|
611
|
+
n(
|
|
612
612
|
"span",
|
|
613
613
|
null,
|
|
614
614
|
U(l.title),
|
|
@@ -617,17 +617,17 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
617
617
|
)
|
|
618
618
|
]))
|
|
619
619
|
]),
|
|
620
|
-
file:
|
|
621
|
-
|
|
620
|
+
file: m(({ file: s }) => [
|
|
621
|
+
n(
|
|
622
622
|
"div",
|
|
623
623
|
{
|
|
624
624
|
class: b(["load-list", { loading: s.status === "uploading" }]),
|
|
625
625
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
626
626
|
},
|
|
627
627
|
[
|
|
628
|
-
P(
|
|
628
|
+
P(n(
|
|
629
629
|
"div",
|
|
630
|
-
|
|
630
|
+
nt,
|
|
631
631
|
[
|
|
632
632
|
_(Fe),
|
|
633
633
|
R(
|
|
@@ -642,30 +642,30 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
642
642
|
[W, s.status === "uploading"]
|
|
643
643
|
]),
|
|
644
644
|
M(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),
|
|
645
|
-
_(p(
|
|
645
|
+
_(p(fe), {
|
|
646
646
|
style: { width: "100%", height: "100%" },
|
|
647
647
|
src: s.__url || s.url,
|
|
648
648
|
"zoom-rate": 1.2,
|
|
649
649
|
"initial-index": 0,
|
|
650
650
|
fit: "contain"
|
|
651
651
|
}, null, 8, ["src"]),
|
|
652
|
-
|
|
653
|
-
|
|
652
|
+
n("span", ot, [
|
|
653
|
+
n("span", null, [
|
|
654
654
|
_(p(x), {
|
|
655
655
|
onClick: (v) => le(s)
|
|
656
656
|
}, {
|
|
657
|
-
default:
|
|
657
|
+
default: m(() => [
|
|
658
658
|
_(p(Me))
|
|
659
659
|
]),
|
|
660
660
|
_: 2
|
|
661
661
|
/* DYNAMIC */
|
|
662
662
|
}, 1032, ["onClick"])
|
|
663
663
|
]),
|
|
664
|
-
|
|
664
|
+
n("span", null, [
|
|
665
665
|
_(p(x), {
|
|
666
666
|
onClick: (v) => ae(s)
|
|
667
667
|
}, {
|
|
668
|
-
default:
|
|
668
|
+
default: m(() => [
|
|
669
669
|
_(p(Be))
|
|
670
670
|
]),
|
|
671
671
|
_: 2
|
|
@@ -675,9 +675,9 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
675
675
|
l.preview ? M("v-if", !0) : (u(), r("span", it, [
|
|
676
676
|
_(p(x), {
|
|
677
677
|
type: "warning",
|
|
678
|
-
onClick: (v) =>
|
|
678
|
+
onClick: (v) => ne(s)
|
|
679
679
|
}, {
|
|
680
|
-
default:
|
|
680
|
+
default: m(() => [
|
|
681
681
|
_(p(xe))
|
|
682
682
|
]),
|
|
683
683
|
_: 2
|
|
@@ -690,8 +690,8 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
690
690
|
/* CLASS */
|
|
691
691
|
)
|
|
692
692
|
]),
|
|
693
|
-
default:
|
|
694
|
-
|
|
693
|
+
default: m(() => [
|
|
694
|
+
n("ul", ut, [
|
|
695
695
|
(u(!0), r(
|
|
696
696
|
N,
|
|
697
697
|
null,
|
|
@@ -699,18 +699,18 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
699
699
|
class: "el-upload-list__item",
|
|
700
700
|
key: s.uid
|
|
701
701
|
}, [
|
|
702
|
-
|
|
702
|
+
n("span", null, [
|
|
703
703
|
_(p(x), {
|
|
704
|
-
onClick: (k) =>
|
|
704
|
+
onClick: (k) => oe(s, v)
|
|
705
705
|
}, {
|
|
706
|
-
default:
|
|
706
|
+
default: m(() => [
|
|
707
707
|
_(p(ze))
|
|
708
708
|
]),
|
|
709
709
|
_: 2
|
|
710
710
|
/* DYNAMIC */
|
|
711
711
|
}, 1032, ["onClick"])
|
|
712
712
|
]),
|
|
713
|
-
|
|
713
|
+
n(
|
|
714
714
|
"div",
|
|
715
715
|
{
|
|
716
716
|
class: b(["load-list", {
|
|
@@ -720,12 +720,12 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
720
720
|
"element-loading-background": "var(--ik-upload-bg)"
|
|
721
721
|
},
|
|
722
722
|
[
|
|
723
|
-
P(
|
|
723
|
+
P(n("div", {
|
|
724
724
|
class: "loading-statu",
|
|
725
725
|
onClick: (k) => K(s, v)
|
|
726
726
|
}, [
|
|
727
727
|
_(p(x), { size: 24 }, {
|
|
728
|
-
default:
|
|
728
|
+
default: m(() => [
|
|
729
729
|
_(p(Le))
|
|
730
730
|
]),
|
|
731
731
|
_: 1
|
|
@@ -736,7 +736,7 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
736
736
|
], 8, rt), [
|
|
737
737
|
[W, s.status === "fail"]
|
|
738
738
|
]),
|
|
739
|
-
|
|
739
|
+
n("img", {
|
|
740
740
|
src: s.__url,
|
|
741
741
|
alt: "",
|
|
742
742
|
style: z({ "object-fit": l.fit })
|
|
@@ -756,8 +756,8 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
756
756
|
}, [
|
|
757
757
|
l.tip ? {
|
|
758
758
|
name: "tip",
|
|
759
|
-
fn:
|
|
760
|
-
|
|
759
|
+
fn: m(() => [
|
|
760
|
+
n(
|
|
761
761
|
"span",
|
|
762
762
|
st,
|
|
763
763
|
U(X.value),
|
|
@@ -769,15 +769,15 @@ const tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-7729b79a"]]), lt = G(tt)
|
|
|
769
769
|
} : void 0
|
|
770
770
|
]), 1040, ["class", "accept", "action", "headers", "data", "file-list", "multiple", "limit", "disabled"]),
|
|
771
771
|
M(" 文件预览 "),
|
|
772
|
-
|
|
773
|
-
V.value ? (u(), E(p(
|
|
772
|
+
n("div", pt, [
|
|
773
|
+
V.value ? (u(), E(p(me), {
|
|
774
774
|
key: 0,
|
|
775
775
|
"lock-scroll": "",
|
|
776
776
|
"hide-on-click-modal": "",
|
|
777
777
|
onClose: a[1] || (a[1] = () => {
|
|
778
778
|
V.value = !1;
|
|
779
779
|
}),
|
|
780
|
-
"url-list": d(
|
|
780
|
+
"url-list": d(f.value).map((s) => s.__url),
|
|
781
781
|
"initial-index": T.value
|
|
782
782
|
}, null, 8, ["url-list", "initial-index"])) : M("v-if", !0)
|
|
783
783
|
])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","iking-utils-pro"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.index={},h.vue,h["element-plus"],h["iking-utils-pro"]))})(this,function(h,e,_,B){"use strict";const C=(a,r)=>{if(a.install=i=>{for(const t of[a,...Object.values(r??{})])i.component(t.name,t)},r)for(const[i,t]of Object.entries(r))a[i]=t;return a};/*! Element Plus Icons Vue v2.3.1 */var I=e.defineComponent({name:"Close",__name:"close",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),S=I,v=e.defineComponent({name:"Delete",__name:"delete",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),L=v,M=e.defineComponent({name:"Download",__name:"download",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),j=M,U=e.defineComponent({name:"Refresh",__name:"refresh",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),D=U,T=e.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),O=T;const V=(a,r)=>{const i=a.__vccOpts||a;for(const[t,c]of r)i[t]=c;return i},A={},H={t:"1686214149488",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8490",width:"200",height:"200"},F=[e.createElementVNode("path",{d:"M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z","p-id":"8491"},null,-1),e.createElementVNode("path",{d:"M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z","p-id":"8492"},null,-1),e.createElementVNode("path",{d:"M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z","p-id":"8493"},null,-1),e.createElementVNode("path",{d:"M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z","p-id":"8494"},null,-1),e.createElementVNode("path",{d:"M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z","p-id":"8495"},null,-1),e.createElementVNode("path",{d:"M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z","p-id":"8496"},null,-1),e.createElementVNode("path",{d:"M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z","p-id":"8497"},null,-1),e.createElementVNode("path",{d:"M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z","p-id":"8498"},null,-1)];function W(a,r){return e.openBlock(),e.createElementBlock("svg",H,F)}const R=V(A,[["render",W]]),q=a=>{const r=e.inject("loadUrl"),i=e.computed(()=>a.loadUrl||(r==null?void 0:r.value)),t=e.inject("uploadUrl"),c=e.computed(()=>a.action||a.uploadUrl||(t==null?void 0:t.value)),p=e.inject("token"),s=e.computed(()=>a.token||(p==null?void 0:p.value)),f=e.inject("onlyofficeConfig"),y=e.computed(()=>a.onlyofficeConfig||(f==null?void 0:f.value)),u=e.inject("userInfo"),m=e.computed(()=>a.userInfo||(u==null?void 0:u.value));return{cLoadUrl:i,cUploadUrl:c,cToken:s,cOnlyofficeConfig:y,cUserInfo:m}},G={key:0,class:"ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"},J={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},X=["xlink:href"],Y=["src"],Z={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},K=["xlink:href"],Q=["src"],P=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},colorLight:{},opacity:{default:.5},size:{default:""},width:{},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"6px"},primary:{type:Boolean},warning:{type:Boolean},success:{type:Boolean},error:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tableIconType:{}},setup(a){const r=a,i=e.inject("iconConfig"),t=e.computed(()=>({...(i==null?void 0:i.value)||{},...r})),c=e.computed(()=>{const{name:s}=t.value;return/^http?:\/\//.test(s)?"img":/i-[^:]+:[^:]+/.test(s)?"unocss":s!=null&&s.startsWith("iksig")?"iksig":s!=null&&s.includes(":")?"iconify":s!=null&&s.startsWith("iksvg")?"svg":"i"}),p=e.computed(()=>{const s=[];if(t.value.flip)switch(t.value.flip){case"horizontal":s.push("rotateY(180deg)");break;case"vertical":s.push("rotateX(180deg)");break;case"both":s.push("rotateX(180deg)"),s.push("rotateY(180deg)");break}t.value.rotate&&s.push(`rotate(${t.value.rotate%360}deg)`);const f={...t.value.color&&{color:t.value.color},...t.value.size&&{fontSize:typeof t.value.size=="number"?`${t.value.size}px`:t.value.size},...s.length&&{transform:s.join(" ")},padding:t.value.showBg||t.value.bg?t.value.padding:0,...t.value.color&&c.value!=="iksig"?{"--ik-color-icon-dark":t.value.color,"--ik-color-icon-light":t.value.colorLight||B.ikColor.setOpacity(t.value.color,t.value.opacity)}:{}};return t.value.width&&(f.width=f.height=typeof t.value.width=="number"?`${t.value.width}px`:t.value.width),f});return(s,f)=>{const y=e.resolveComponent("el-tooltip"),u=e.resolveComponent("el-button");return t.value.tableIconType==="icon"||!t.value.tableIconType?(e.openBlock(),e.createElementBlock("span",G,[t.value.notip||!t.value.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[s.name]:c.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:t.value.primary||t.value.type==="primary",success:s.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active,disabled:t.value.disabled}]),style:e.normalizeStyle(p.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),c.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(p.value)},null,6)):c.value==="svg"?(e.openBlock(),e.createElementBlock("svg",J,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,X)])):c.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,Y)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(p.value)},null,6))],6)):(e.openBlock(),e.createBlock(y,{key:1,content:t.value.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[s.name]:c.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:s.primary||t.value.type==="primary",success:s.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active}]),style:e.normalizeStyle(p.value)},[c.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(p.value)},null,6)):c.value==="svg"?(e.openBlock(),e.createElementBlock("svg",Z,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,K)])):c.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,Q)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(p.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(u,{key:1,type:["warning","error"].includes(t.value.type)?"danger":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value.title),1)]),_:1},8,["type"]))}}}),Ue="",ee=C(V(P,[["__scopeId","data-v-7729b79a"]])),z=a=>(e.pushScopeId("data-v-127175a6"),a=a(),e.popScopeId(),a),te={key:1,class:"upload-btn"},le={class:"tip"},ae={class:"loading-statu"},oe={class:"operate-btn"},ne={key:0},se={class:"el-upload-list el-upload-list--picture-card",style:{float:"left"}},ie=["onClick"],re=z(()=>e.createElementVNode("span",{class:"error"},"上传错误",-1)),ce=z(()=>e.createElementVNode("p",null,"点击重新上传",-1)),de=["src"],pe={class:"demo-image__preview"},ue=e.defineComponent({__name:"index",props:e.mergeModels({title:{type:String,default:"上传图片"},loadUrl:{type:String,default:""},action:{type:String,default:""},headers:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},limit:{type:Number,default:50},size:{type:Number,default:50},accept:{type:String,default:"image/*"},fit:{type:String,default:"contain"},preview:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:e.mergeModels(["delete","success"],["update:modelValue"]),setup(a,{emit:r}){const i=a,t=e.useModel(a,"modelValue"),c=l=>Array.isArray(l)?l.map(o=>{var g,w;const n=((g=o.url)==null?void 0:g.startsWith("http"))||((w=o.url)==null?void 0:w.startsWith("blob")),d=(o==null?void 0:o.url)||o;return{...o.url?o:{url:d},__url:n?d:`${s.value}${d}`}}):l?[{url:l,__url:l!=null&&l.startsWith("http")||l!=null&&l.startsWith("blob")?l:`${s.value}${l}`}]:[];e.watch(()=>t.value,l=>{!l||!l.length?m.value=[]:m.value=B._.cloneDeep(c(l))},{deep:!0});const p=r,{cLoadUrl:s,cUploadUrl:f}=q(i),y=e.computed(()=>i.size),u=e.ref(null),m=e.ref(c(t.value)),k=e.ref([]),E=e.ref(!1),x=e.ref(0),me=e.computed(()=>i.tipText||`最多可上传${i.limit}张图片, 每张图片不能超过${i.size}MB`),_e=(l,o)=>{},he=l=>{if(!l.type.includes("image")){_.ElMessage.warning("只允许上传图片!");try{m.value.pop()}catch{}return!1}if(!(l.size/1024/1024<y.value)){_.ElMessage.warning("图片大小超出限制!");try{m.value.pop()}catch{}return!1}return!0},fe=()=>!1,ge=(l,o)=>{var n,d;l.status="ready",o!==void 0&&k.value.splice(o,1),(n=u.value)==null||n.handleStart(l.raw),(d=u.value)==null||d.submit()},ye=(l,o)=>{var w,$;const n=t.value.length,d=i.limit-n;let g=0;for(;g<d&&g<(l==null?void 0:l.length);)(w=u.value)==null||w.handleStart(l==null?void 0:l[g]),($=u.value)==null||$.submit(),g++},ke=(l,o,n)=>{p("success",l,o,n),t.value=m.value},we=(l,o,n)=>{k.value.push({...o,__url:o.url})},Be=l=>{var o;E.value=!0,x.value=(o=t.value)==null?void 0:o.findIndex(n=>n.url===l.url)},Ve=l=>{B.ikFile.downloadByOnlineUrl(l.__url||l.url,l.name)},Ee=l=>{var o;(o=u.value)==null||o.abort(l)},be=l=>{var o;l.status!=="success"&&Ee(l),t.value=(o=m.value)==null?void 0:o.filter(n=>n.uid!==l.uid),p("delete",l)},Ce=(l,o)=>{k.value.splice(o,1)},ze=e.computed(()=>m.value.length+k.value.length<i.limit),b=e.computed(()=>t.value.length>=i.limit||i.disabled);return(l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(_.ElUpload),e.mergeProps({class:["ik-image-upload",{preview:a.preview,"hide-upload":!ze.value,disabled:b.value}],ref_key:"refUpload",ref:u,"list-type":"picture-card",accept:a.accept,action:e.unref(f),headers:a.headers,data:a.data,"file-list":m.value,"onUpdate:fileList":o[0]||(o[0]=n=>m.value=n),multiple:a.multiple,limit:a.limit,"on-change":_e,"before-upload":he,"before-remove":fe,"on-exceed":ye,"on-success":ke,"on-error":we,drag:""},l.$attrs,{disabled:b.value}),e.createSlots({trigger:e.withCtx(()=>[l.$slots.trigger?e.renderSlot(l.$slots,"trigger",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(e.unref(_.ElIcon),{size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(ee),{name:"iksvg_guanbibeifen",disabled:b.value},null,8,["disabled"])]),_:1}),e.createElementVNode("span",null,e.toDisplayString(a.title),1)]))]),file:e.withCtx(({file:n})=>[e.createElementVNode("div",{class:e.normalizeClass(["load-list",{loading:n.status==="uploading"}]),"element-loading-background":"var(--ik-upload-bg)"},[e.withDirectives(e.createElementVNode("div",ae,[e.createVNode(R),e.createTextVNode(" 上传"+e.toDisplayString(n.percentage)+"% ",1)],512),[[e.vShow,n.status==="uploading"]]),e.createCommentVNode(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),e.createVNode(e.unref(_.ElImage),{style:{width:"100%",height:"100%"},src:n.__url||n.url,"zoom-rate":1.2,"initial-index":0,fit:"contain"},null,8,["src"]),e.createElementVNode("span",oe,[e.createElementVNode("span",null,[e.createVNode(e.unref(_.ElIcon),{onClick:d=>Be(n)},{default:e.withCtx(()=>[e.createVNode(e.unref(O))]),_:2},1032,["onClick"])]),e.createElementVNode("span",null,[e.createVNode(e.unref(_.ElIcon),{onClick:d=>Ve(n)},{default:e.withCtx(()=>[e.createVNode(e.unref(j))]),_:2},1032,["onClick"])]),a.preview?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("span",ne,[e.createVNode(e.unref(_.ElIcon),{type:"warning",onClick:d=>be(n)},{default:e.withCtx(()=>[e.createVNode(e.unref(L))]),_:2},1032,["onClick"])]))])],2)]),default:e.withCtx(()=>[e.createElementVNode("ul",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(n,d)=>(e.openBlock(),e.createElementBlock("li",{class:"el-upload-list__item",key:n.uid},[e.createElementVNode("span",null,[e.createVNode(e.unref(_.ElIcon),{onClick:g=>Ce(n,d)},{default:e.withCtx(()=>[e.createVNode(e.unref(S))]),_:2},1032,["onClick"])]),e.createElementVNode("div",{class:e.normalizeClass(["load-list",{loading:n.status==="uploading",fail:n.status==="fail"}]),"element-loading-background":"var(--ik-upload-bg)"},[e.withDirectives(e.createElementVNode("div",{class:"loading-statu",onClick:g=>ge(n,d)},[e.createVNode(e.unref(_.ElIcon),{size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(D))]),_:1}),re,ce],8,ie),[[e.vShow,n.status==="fail"]]),e.createElementVNode("img",{src:n.__url,alt:"",style:e.normalizeStyle({"object-fit":a.fit})},null,12,de)],2)]))),128))])]),_:2},[a.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("span",le,e.toDisplayString(me.value),1)]),key:"0"}:void 0]),1040,["class","accept","action","headers","data","file-list","multiple","limit","disabled"]),e.createCommentVNode(" 文件预览 "),e.createElementVNode("div",pe,[E.value?(e.openBlock(),e.createBlock(e.unref(_.ElImageViewer),{key:0,"lock-scroll":"","hide-on-click-modal":"",onClose:o[1]||(o[1]=()=>{E.value=!1}),"url-list":c(m.value).map(n=>n.__url),"initial-index":x.value},null,8,["url-list","initial-index"])):e.createCommentVNode("v-if",!0)])],64))}}),Te="",N=C(V(ue,[["__scopeId","data-v-127175a6"]]));h.IkUploadImage=N,h.default=N,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","iking-utils-pro"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.index={},h.vue,h["element-plus"],h["iking-utils-pro"]))})(this,function(h,e,_,B){"use strict";const b=(a,r)=>{if(a.install=i=>{for(const t of[a,...Object.values(r??{})])i.component(t.name,t)},r)for(const[i,t]of Object.entries(r))a[i]=t;return a};/*! Element Plus Icons Vue v2.3.1 */var I=e.defineComponent({name:"Close",__name:"close",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),S=I,v=e.defineComponent({name:"Delete",__name:"delete",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),L=v,M=e.defineComponent({name:"Download",__name:"download",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),U=M,j=e.defineComponent({name:"Refresh",__name:"refresh",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),D=j,T=e.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),O=T;const V=(a,r)=>{const i=a.__vccOpts||a;for(const[t,c]of r)i[t]=c;return i},A={},H={t:"1686214149488",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8490",width:"200",height:"200"},F=[e.createElementVNode("path",{d:"M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z","p-id":"8491"},null,-1),e.createElementVNode("path",{d:"M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z","p-id":"8492"},null,-1),e.createElementVNode("path",{d:"M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z","p-id":"8493"},null,-1),e.createElementVNode("path",{d:"M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z","p-id":"8494"},null,-1),e.createElementVNode("path",{d:"M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z","p-id":"8495"},null,-1),e.createElementVNode("path",{d:"M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z","p-id":"8496"},null,-1),e.createElementVNode("path",{d:"M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z","p-id":"8497"},null,-1),e.createElementVNode("path",{d:"M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z","p-id":"8498"},null,-1)];function W(a,r){return e.openBlock(),e.createElementBlock("svg",H,F)}const R=V(A,[["render",W]]),q=a=>{const r=e.inject("loadUrl"),i=e.computed(()=>a.loadUrl||a.fileUrl||(r==null?void 0:r.value)),t=e.inject("uploadUrl"),c=e.computed(()=>a.action||a.uploadUrl||(t==null?void 0:t.value)),p=e.inject("token"),s=e.computed(()=>a.token||(p==null?void 0:p.value)),f=e.inject("onlyofficeConfig"),y=e.computed(()=>a.onlyofficeConfig||(f==null?void 0:f.value)),u=e.inject("userInfo"),m=e.computed(()=>a.userInfo||(u==null?void 0:u.value));return{cLoadUrl:i,cUploadUrl:c,cToken:s,cOnlyofficeConfig:y,cUserInfo:m}},G={key:0,class:"ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"},J={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},X=["xlink:href"],Y=["src"],Z={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},K=["xlink:href"],Q=["src"],P=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},colorLight:{},opacity:{default:.5},size:{default:""},width:{},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"6px"},primary:{type:Boolean},warning:{type:Boolean},success:{type:Boolean},error:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tableIconType:{}},setup(a){const r=a,i=e.inject("iconConfig"),t=e.computed(()=>({...(i==null?void 0:i.value)||{},...r})),c=e.computed(()=>{const{name:s}=t.value;return/^http?:\/\//.test(s)?"img":/i-[^:]+:[^:]+/.test(s)?"unocss":s!=null&&s.startsWith("iksig")?"iksig":s!=null&&s.includes(":")?"iconify":s!=null&&s.startsWith("iksvg")?"svg":"i"}),p=e.computed(()=>{const s=[];if(t.value.flip)switch(t.value.flip){case"horizontal":s.push("rotateY(180deg)");break;case"vertical":s.push("rotateX(180deg)");break;case"both":s.push("rotateX(180deg)"),s.push("rotateY(180deg)");break}t.value.rotate&&s.push(`rotate(${t.value.rotate%360}deg)`);const f={...t.value.color&&{color:t.value.color},...t.value.size&&{fontSize:typeof t.value.size=="number"?`${t.value.size}px`:t.value.size},...s.length&&{transform:s.join(" ")},padding:t.value.showBg||t.value.bg?t.value.padding:0,...t.value.color&&c.value!=="iksig"?{"--ik-color-icon-dark":t.value.color,"--ik-color-icon-light":t.value.colorLight||B.ikColor.setOpacity(t.value.color,t.value.opacity)}:{}};return t.value.width&&(f.width=f.height=typeof t.value.width=="number"?`${t.value.width}px`:t.value.width),f});return(s,f)=>{const y=e.resolveComponent("el-tooltip"),u=e.resolveComponent("el-button");return t.value.tableIconType==="icon"||!t.value.tableIconType?(e.openBlock(),e.createElementBlock("span",G,[t.value.notip||!t.value.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[s.name]:c.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:t.value.primary||t.value.type==="primary",success:s.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active,disabled:t.value.disabled}]),style:e.normalizeStyle(p.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),c.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(p.value)},null,6)):c.value==="svg"?(e.openBlock(),e.createElementBlock("svg",J,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,X)])):c.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,Y)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(p.value)},null,6))],6)):(e.openBlock(),e.createBlock(y,{key:1,content:t.value.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[s.name]:c.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:s.primary||t.value.type==="primary",success:s.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active}]),style:e.normalizeStyle(p.value)},[c.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(p.value)},null,6)):c.value==="svg"?(e.openBlock(),e.createElementBlock("svg",Z,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,K)])):c.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,Q)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(p.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(u,{key:1,type:["warning","error"].includes(t.value.type)?"danger":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value.title),1)]),_:1},8,["type"]))}}}),je="",ee=b(V(P,[["__scopeId","data-v-76d7e119"]])),z=a=>(e.pushScopeId("data-v-127175a6"),a=a(),e.popScopeId(),a),te={key:1,class:"upload-btn"},le={class:"tip"},ae={class:"loading-statu"},oe={class:"operate-btn"},ne={key:0},se={class:"el-upload-list el-upload-list--picture-card",style:{float:"left"}},ie=["onClick"],re=z(()=>e.createElementVNode("span",{class:"error"},"上传错误",-1)),ce=z(()=>e.createElementVNode("p",null,"点击重新上传",-1)),de=["src"],pe={class:"demo-image__preview"},ue=e.defineComponent({__name:"index",props:e.mergeModels({title:{type:String,default:"上传图片"},loadUrl:{type:String,default:""},action:{type:String,default:""},headers:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},limit:{type:Number,default:50},size:{type:Number,default:50},accept:{type:String,default:"image/*"},fit:{type:String,default:"contain"},preview:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:e.mergeModels(["delete","success"],["update:modelValue"]),setup(a,{emit:r}){const i=a,t=e.useModel(a,"modelValue"),c=l=>Array.isArray(l)?l.map(o=>{var g,w;const n=((g=o.url)==null?void 0:g.startsWith("http"))||((w=o.url)==null?void 0:w.startsWith("blob")),d=(o==null?void 0:o.url)||o;return{...o.url?o:{url:d},__url:n?d:`${s.value}${d}`}}):l?[{url:l,__url:l!=null&&l.startsWith("http")||l!=null&&l.startsWith("blob")?l:`${s.value}${l}`}]:[];e.watch(()=>t.value,l=>{!l||!l.length?m.value=[]:m.value=B._.cloneDeep(c(l))},{deep:!0});const p=r,{cLoadUrl:s,cUploadUrl:f}=q(i),y=e.computed(()=>i.size),u=e.ref(null),m=e.ref(c(t.value)),k=e.ref([]),E=e.ref(!1),x=e.ref(0),me=e.computed(()=>i.tipText||`最多可上传${i.limit}张图片, 每张图片不能超过${i.size}MB`),_e=(l,o)=>{},he=l=>{if(!l.type.includes("image")){_.ElMessage.warning("只允许上传图片!");try{m.value.pop()}catch{}return!1}if(!(l.size/1024/1024<y.value)){_.ElMessage.warning("图片大小超出限制!");try{m.value.pop()}catch{}return!1}return!0},fe=()=>!1,ge=(l,o)=>{var n,d;l.status="ready",o!==void 0&&k.value.splice(o,1),(n=u.value)==null||n.handleStart(l.raw),(d=u.value)==null||d.submit()},ye=(l,o)=>{var w,$;const n=t.value.length,d=i.limit-n;let g=0;for(;g<d&&g<(l==null?void 0:l.length);)(w=u.value)==null||w.handleStart(l==null?void 0:l[g]),($=u.value)==null||$.submit(),g++},ke=(l,o,n)=>{p("success",l,o,n),t.value=m.value},we=(l,o,n)=>{k.value.push({...o,__url:o.url})},Be=l=>{var o;E.value=!0,x.value=(o=t.value)==null?void 0:o.findIndex(n=>n.url===l.url)},Ve=l=>{B.ikFile.downloadByOnlineUrl(l.__url||l.url,l.name)},Ee=l=>{var o;(o=u.value)==null||o.abort(l)},Ce=l=>{var o;l.status!=="success"&&Ee(l),t.value=(o=m.value)==null?void 0:o.filter(n=>n.uid!==l.uid),p("delete",l)},be=(l,o)=>{k.value.splice(o,1)},ze=e.computed(()=>m.value.length+k.value.length<i.limit),C=e.computed(()=>t.value.length>=i.limit||i.disabled);return(l,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(_.ElUpload),e.mergeProps({class:["ik-image-upload",{preview:a.preview,"hide-upload":!ze.value,disabled:C.value}],ref_key:"refUpload",ref:u,"list-type":"picture-card",accept:a.accept,action:e.unref(f),headers:a.headers,data:a.data,"file-list":m.value,"onUpdate:fileList":o[0]||(o[0]=n=>m.value=n),multiple:a.multiple,limit:a.limit,"on-change":_e,"before-upload":he,"before-remove":fe,"on-exceed":ye,"on-success":ke,"on-error":we,drag:""},l.$attrs,{disabled:C.value}),e.createSlots({trigger:e.withCtx(()=>[l.$slots.trigger?e.renderSlot(l.$slots,"trigger",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(e.unref(_.ElIcon),{size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(ee),{name:"iksvg_guanbibeifen",disabled:C.value},null,8,["disabled"])]),_:1}),e.createElementVNode("span",null,e.toDisplayString(a.title),1)]))]),file:e.withCtx(({file:n})=>[e.createElementVNode("div",{class:e.normalizeClass(["load-list",{loading:n.status==="uploading"}]),"element-loading-background":"var(--ik-upload-bg)"},[e.withDirectives(e.createElementVNode("div",ae,[e.createVNode(R),e.createTextVNode(" 上传"+e.toDisplayString(n.percentage)+"% ",1)],512),[[e.vShow,n.status==="uploading"]]),e.createCommentVNode(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),e.createVNode(e.unref(_.ElImage),{style:{width:"100%",height:"100%"},src:n.__url||n.url,"zoom-rate":1.2,"initial-index":0,fit:"contain"},null,8,["src"]),e.createElementVNode("span",oe,[e.createElementVNode("span",null,[e.createVNode(e.unref(_.ElIcon),{onClick:d=>Be(n)},{default:e.withCtx(()=>[e.createVNode(e.unref(O))]),_:2},1032,["onClick"])]),e.createElementVNode("span",null,[e.createVNode(e.unref(_.ElIcon),{onClick:d=>Ve(n)},{default:e.withCtx(()=>[e.createVNode(e.unref(U))]),_:2},1032,["onClick"])]),a.preview?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("span",ne,[e.createVNode(e.unref(_.ElIcon),{type:"warning",onClick:d=>Ce(n)},{default:e.withCtx(()=>[e.createVNode(e.unref(L))]),_:2},1032,["onClick"])]))])],2)]),default:e.withCtx(()=>[e.createElementVNode("ul",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(n,d)=>(e.openBlock(),e.createElementBlock("li",{class:"el-upload-list__item",key:n.uid},[e.createElementVNode("span",null,[e.createVNode(e.unref(_.ElIcon),{onClick:g=>be(n,d)},{default:e.withCtx(()=>[e.createVNode(e.unref(S))]),_:2},1032,["onClick"])]),e.createElementVNode("div",{class:e.normalizeClass(["load-list",{loading:n.status==="uploading",fail:n.status==="fail"}]),"element-loading-background":"var(--ik-upload-bg)"},[e.withDirectives(e.createElementVNode("div",{class:"loading-statu",onClick:g=>ge(n,d)},[e.createVNode(e.unref(_.ElIcon),{size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(D))]),_:1}),re,ce],8,ie),[[e.vShow,n.status==="fail"]]),e.createElementVNode("img",{src:n.__url,alt:"",style:e.normalizeStyle({"object-fit":a.fit})},null,12,de)],2)]))),128))])]),_:2},[a.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("span",le,e.toDisplayString(me.value),1)]),key:"0"}:void 0]),1040,["class","accept","action","headers","data","file-list","multiple","limit","disabled"]),e.createCommentVNode(" 文件预览 "),e.createElementVNode("div",pe,[E.value?(e.openBlock(),e.createBlock(e.unref(_.ElImageViewer),{key:0,"lock-scroll":"","hide-on-click-modal":"",onClose:o[1]||(o[1]=()=>{E.value=!1}),"url-list":c(m.value).map(n=>n.__url),"initial-index":x.value},null,8,["url-list","initial-index"])):e.createCommentVNode("v-if",!0)])],64))}}),Te="",N=b(V(ue,[["__scopeId","data-v-127175a6"]]));h.IkUploadImage=N,h.default=N,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|