iking-web-ui-pro 0.1.0 → 0.1.2
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/index.es.js +146 -134
- package/dist/IKDetailPreviewFiles/index.umd.js +1 -1
- package/dist/IKExpandCollapse/index.es.js +82 -70
- package/dist/IKExpandCollapse/index.umd.js +1 -1
- package/dist/IKVerticalStepBar/index.es.js +107 -95
- package/dist/IKVerticalStepBar/index.umd.js +3 -3
- package/dist/IkBaseDialog/index.es.js +85 -73
- package/dist/IkBaseDialog/index.umd.js +1 -1
- package/dist/IkBtnSetting/index.es.js +135 -123
- package/dist/IkBtnSetting/index.umd.js +1 -1
- package/dist/IkIconPicker/index.es.js +152 -98
- package/dist/IkIconPicker/index.umd.js +1 -1
- package/dist/IkPageFull/index.es.js +137 -125
- package/dist/IkPageFull/index.umd.js +1 -1
- package/dist/IkSchedule/index.es.js +15 -3
- package/dist/IkSchedule/index.umd.js +1 -1
- package/dist/IkSvgIcon/index.es.js +62 -50
- package/dist/IkSvgIcon/index.umd.js +1 -1
- package/dist/IkUploadFile/index.es.js +180 -167
- package/dist/IkUploadFile/index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/IkUploadImage/index.es.js +179 -189
- package/dist/IkUploadImage/index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +1418 -1373
- package/dist/index.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { defineComponent as S, ref as _, computed as F, watch as P, openBlock as
|
|
1
|
+
import { defineComponent as S, ref as _, computed as F, watch as P, openBlock as s, createBlock as T, unref as x, withCtx as j, createElementVNode as p, resolveComponent as N, createElementBlock as a, normalizeClass as b, normalizeStyle as h, createCommentVNode as $, Fragment as z, renderList as I, createVNode as w, toDisplayString as A, pushScopeId as W, popScopeId as q } from "vue";
|
|
2
2
|
import { ElDialog as R } from "element-plus";
|
|
3
3
|
import { ikColor as G } from "iking-utils-pro";
|
|
4
|
-
const
|
|
5
|
-
if (l.install = (
|
|
6
|
-
for (const
|
|
7
|
-
|
|
4
|
+
const B = (l, e) => {
|
|
5
|
+
if (l.install = (r) => {
|
|
6
|
+
for (const n of [l, ...Object.values(e ?? {})])
|
|
7
|
+
r.component(n.name, n);
|
|
8
8
|
}, e)
|
|
9
|
-
for (const [
|
|
10
|
-
l[
|
|
9
|
+
for (const [r, n] of Object.entries(e))
|
|
10
|
+
l[r] = n;
|
|
11
11
|
return l;
|
|
12
12
|
}, X = (l, e) => {
|
|
13
|
-
const
|
|
14
|
-
for (const [
|
|
15
|
-
|
|
16
|
-
return
|
|
13
|
+
const r = l.__vccOpts || l;
|
|
14
|
+
for (const [n, o] of e)
|
|
15
|
+
r[n] = o;
|
|
16
|
+
return r;
|
|
17
17
|
};
|
|
18
|
-
const Y = typeof btoa == "function",
|
|
18
|
+
const Y = typeof btoa == "function", U = typeof Buffer == "function";
|
|
19
19
|
typeof TextDecoder == "function" && new TextDecoder();
|
|
20
20
|
const D = typeof TextEncoder == "function" ? new TextEncoder() : void 0, H = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", k = Array.prototype.slice.call(H);
|
|
21
21
|
((l) => {
|
|
22
22
|
let e = {};
|
|
23
|
-
return l.forEach((
|
|
23
|
+
return l.forEach((r, n) => e[r] = n), e;
|
|
24
24
|
})(k);
|
|
25
25
|
const d = String.fromCharCode.bind(String);
|
|
26
26
|
typeof Uint8Array.from == "function" && Uint8Array.from.bind(Uint8Array);
|
|
27
27
|
const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "_"), M = (l) => {
|
|
28
|
-
let e,
|
|
28
|
+
let e, r, n, o, c = "";
|
|
29
29
|
const u = l.length % 3;
|
|
30
30
|
for (let g = 0; g < l.length; ) {
|
|
31
|
-
if ((
|
|
31
|
+
if ((r = l.charCodeAt(g++)) > 255 || (n = l.charCodeAt(g++)) > 255 || (o = l.charCodeAt(g++)) > 255)
|
|
32
32
|
throw new TypeError("invalid character found");
|
|
33
|
-
e =
|
|
33
|
+
e = r << 16 | n << 8 | o, c += k[e >> 18 & 63] + k[e >> 12 & 63] + k[e >> 6 & 63] + k[e & 63];
|
|
34
34
|
}
|
|
35
35
|
return u ? c.slice(0, u - 3) + "===".substring(u) : c;
|
|
36
|
-
}, K = Y ? (l) => btoa(l) :
|
|
37
|
-
let
|
|
38
|
-
for (let
|
|
39
|
-
|
|
40
|
-
return K(
|
|
36
|
+
}, K = Y ? (l) => btoa(l) : U ? (l) => Buffer.from(l, "binary").toString("base64") : M, Q = U ? (l) => Buffer.from(l).toString("base64") : (l) => {
|
|
37
|
+
let r = [];
|
|
38
|
+
for (let n = 0, o = l.length; n < o; n += 4096)
|
|
39
|
+
r.push(d.apply(null, l.subarray(n, n + 4096)));
|
|
40
|
+
return K(r.join(""));
|
|
41
41
|
}, Z = (l) => {
|
|
42
42
|
if (l.length < 2) {
|
|
43
43
|
var e = l.charCodeAt(0);
|
|
@@ -46,7 +46,7 @@ const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
|
|
|
46
46
|
var e = 65536 + (l.charCodeAt(0) - 55296) * 1024 + (l.charCodeAt(1) - 56320);
|
|
47
47
|
return d(240 | e >>> 18 & 7) + d(128 | e >>> 12 & 63) + d(128 | e >>> 6 & 63) + d(128 | e & 63);
|
|
48
48
|
}
|
|
49
|
-
}, ee = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, le = (l) => l.replace(ee, Z), V =
|
|
49
|
+
}, ee = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, le = (l) => l.replace(ee, Z), V = U ? (l) => Buffer.from(l, "utf8").toString("base64") : D ? (l) => Q(D.encode(l)) : (l) => K(le(l)), oe = (l, e = !1) => e ? J(V(l)) : V(l), te = ["src"], re = /* @__PURE__ */ S({
|
|
50
50
|
__name: "IKPreviewFile",
|
|
51
51
|
props: {
|
|
52
52
|
modelValue: {
|
|
@@ -77,15 +77,15 @@ const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
setup(l) {
|
|
80
|
-
const e = l,
|
|
81
|
-
|
|
82
|
-
)}`),
|
|
80
|
+
const e = l, r = _(null), n = F(() => !e.kkUrl || !e.url ? "" : `${e.kkUrl}${encodeURIComponent(
|
|
81
|
+
oe(`${e.loadUrl}${e.url}${e.fileName ? `&fullfilename=${e.fileName}` : ""}`)
|
|
82
|
+
)}`), o = _(e.modelValue);
|
|
83
83
|
return P(() => e.modelValue, (c) => {
|
|
84
|
-
|
|
85
|
-
}), (c, u) => (
|
|
84
|
+
o.value = c;
|
|
85
|
+
}), (c, u) => (s(), T(x(R), {
|
|
86
86
|
fullscreen: "",
|
|
87
|
-
modelValue:
|
|
88
|
-
"onUpdate:modelValue": u[0] || (u[0] = (g) =>
|
|
87
|
+
modelValue: o.value,
|
|
88
|
+
"onUpdate:modelValue": u[0] || (u[0] = (g) => o.value = g),
|
|
89
89
|
"destroy-on-close": "",
|
|
90
90
|
"append-to-body": "",
|
|
91
91
|
"modal-class": "ik-file-preview-modal",
|
|
@@ -95,28 +95,28 @@ const J = (l) => l.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "
|
|
|
95
95
|
default: j(() => [
|
|
96
96
|
p("iframe", {
|
|
97
97
|
ref_key: "freamRef",
|
|
98
|
-
ref:
|
|
98
|
+
ref: r,
|
|
99
99
|
"cross-origin": "",
|
|
100
|
-
src:
|
|
100
|
+
src: n.value,
|
|
101
101
|
frameborder: "0",
|
|
102
102
|
allowfullscreen: "",
|
|
103
103
|
seamless: ""
|
|
104
|
-
}, null, 8,
|
|
104
|
+
}, null, 8, te)
|
|
105
105
|
]),
|
|
106
106
|
_: 1
|
|
107
107
|
/* STABLE */
|
|
108
108
|
}, 8, ["modelValue"]));
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
const
|
|
111
|
+
const ne = B(re), ie = { class: "inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center" }, se = {
|
|
112
112
|
key: 1,
|
|
113
113
|
class: "h-[1em] w-[1em]",
|
|
114
114
|
"aria-hidden": "true"
|
|
115
|
-
}, ae = ["xlink:href"],
|
|
115
|
+
}, ae = ["xlink:href"], ce = ["src"], ue = {
|
|
116
116
|
key: 1,
|
|
117
117
|
class: "h-[1em] w-[1em]",
|
|
118
118
|
"aria-hidden": "true"
|
|
119
|
-
},
|
|
119
|
+
}, fe = ["xlink:href"], de = ["src"], pe = /* @__PURE__ */ S({
|
|
120
120
|
name: "IkSvgIcon",
|
|
121
121
|
__name: "index",
|
|
122
122
|
props: {
|
|
@@ -131,113 +131,125 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
|
|
|
131
131
|
padding: { default: "0" },
|
|
132
132
|
warning: { type: Boolean },
|
|
133
133
|
notip: { type: Boolean, default: !1 },
|
|
134
|
-
title: {}
|
|
134
|
+
title: {},
|
|
135
|
+
type: {},
|
|
136
|
+
active: { type: Boolean, default: !1 },
|
|
137
|
+
disabled: { type: Boolean, default: !1 }
|
|
135
138
|
},
|
|
136
139
|
setup(l) {
|
|
137
|
-
const e = l,
|
|
138
|
-
var
|
|
139
|
-
return /^http?:\/\//.test(e.name) ? "img" : /i-[^:]+:[^:]+/.test(e.name) ? "unocss" : e.name.startsWith("iksig") ? "iksig" : (
|
|
140
|
-
}),
|
|
141
|
-
const
|
|
140
|
+
const e = l, r = F(() => {
|
|
141
|
+
var o, c;
|
|
142
|
+
return /^http?:\/\//.test(e.name) ? "img" : /i-[^:]+:[^:]+/.test(e.name) ? "unocss" : (o = e.name) != null && o.startsWith("iksig") ? "iksig" : (c = e.name) != null && c.includes(":") ? "iconify" : "svg";
|
|
143
|
+
}), n = F(() => {
|
|
144
|
+
const o = [];
|
|
142
145
|
if (e.flip)
|
|
143
146
|
switch (e.flip) {
|
|
144
147
|
case "horizontal":
|
|
145
|
-
|
|
148
|
+
o.push("rotateY(180deg)");
|
|
146
149
|
break;
|
|
147
150
|
case "vertical":
|
|
148
|
-
|
|
151
|
+
o.push("rotateX(180deg)");
|
|
149
152
|
break;
|
|
150
153
|
case "both":
|
|
151
|
-
|
|
154
|
+
o.push("rotateX(180deg)"), o.push("rotateY(180deg)");
|
|
152
155
|
break;
|
|
153
156
|
}
|
|
154
|
-
return e.rotate &&
|
|
157
|
+
return e.rotate && o.push(`rotate(${e.rotate % 360}deg)`), {
|
|
155
158
|
...e.color && { color: e.color },
|
|
156
159
|
...e.size && { fontSize: typeof e.size == "number" ? `${e.size}px` : e.size },
|
|
157
|
-
...
|
|
160
|
+
...o.length && { transform: o.join(" ") },
|
|
158
161
|
padding: e.padding,
|
|
159
|
-
...e.color &&
|
|
162
|
+
...e.color && r.value !== "iksig" ? {
|
|
160
163
|
"--ik-color-icon-dark": e.color,
|
|
161
164
|
"--ik-color-icon-light": G.setOpacity(e.color, e.opacity || 0.4)
|
|
165
|
+
} : {},
|
|
166
|
+
...e.type === "primary" ? {
|
|
167
|
+
"--ik-color-icon-dark": "var(--ik-theme-color)",
|
|
168
|
+
"--ik-color-icon-light": "var(--ik-color-icon-light-hover)",
|
|
169
|
+
"--ik-color-bg-icon": "var(--ik-color-bg-button-secondary)"
|
|
170
|
+
} : e.type === "warning" ? {
|
|
171
|
+
"--ik-color-icon-dark": "var(--ik-color-error)",
|
|
172
|
+
"--ik-color-icon-light": "var(--ik-color-icon-error-light)",
|
|
173
|
+
"--ik-color-bg-icon": "var(--ik-color-icon-error-bg)"
|
|
162
174
|
} : {}
|
|
163
175
|
};
|
|
164
176
|
});
|
|
165
|
-
return (
|
|
177
|
+
return (o, c) => {
|
|
166
178
|
const u = N("el-tooltip");
|
|
167
|
-
return
|
|
168
|
-
|
|
179
|
+
return s(), a("span", ie, [
|
|
180
|
+
o.notip || !o.title ? (s(), a(
|
|
169
181
|
"i",
|
|
170
182
|
{
|
|
171
183
|
key: 0,
|
|
172
|
-
class:
|
|
173
|
-
[
|
|
174
|
-
"show-bg":
|
|
175
|
-
default:
|
|
176
|
-
small:
|
|
177
|
-
big:
|
|
178
|
-
warning:
|
|
184
|
+
class: b(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
|
|
185
|
+
[o.name]: r.value === "unocss",
|
|
186
|
+
"show-bg": o.showBg || o.bg,
|
|
187
|
+
default: o.size === "default",
|
|
188
|
+
small: o.size === "small",
|
|
189
|
+
big: o.size === "big",
|
|
190
|
+
warning: o.warning
|
|
179
191
|
}]),
|
|
180
|
-
style: h(
|
|
192
|
+
style: h(n.value)
|
|
181
193
|
},
|
|
182
194
|
[
|
|
183
|
-
|
|
195
|
+
r.value === "iksig" ? (s(), a(
|
|
184
196
|
"i",
|
|
185
197
|
{
|
|
186
198
|
key: 0,
|
|
187
|
-
class:
|
|
188
|
-
style: h(
|
|
199
|
+
class: b(`iksig ${o.name}`),
|
|
200
|
+
style: h(n.value)
|
|
189
201
|
},
|
|
190
202
|
null,
|
|
191
203
|
6
|
|
192
204
|
/* CLASS, STYLE */
|
|
193
|
-
)) :
|
|
205
|
+
)) : r.value === "svg" ? (s(), a("svg", se, [
|
|
194
206
|
p("use", {
|
|
195
|
-
"xlink:href": `#${
|
|
207
|
+
"xlink:href": `#${o.name}`
|
|
196
208
|
}, null, 8, ae)
|
|
197
|
-
])) :
|
|
209
|
+
])) : r.value === "img" ? (s(), a("img", {
|
|
198
210
|
key: 2,
|
|
199
|
-
src:
|
|
211
|
+
src: o.name,
|
|
200
212
|
class: "h-[1em] w-[1em]"
|
|
201
|
-
}, null, 8,
|
|
213
|
+
}, null, 8, ce)) : $("v-if", !0)
|
|
202
214
|
],
|
|
203
215
|
6
|
|
204
216
|
/* CLASS, STYLE */
|
|
205
|
-
)) : (
|
|
217
|
+
)) : (s(), T(u, {
|
|
206
218
|
key: 1,
|
|
207
|
-
content:
|
|
219
|
+
content: o.title
|
|
208
220
|
}, {
|
|
209
221
|
default: j(() => [
|
|
210
222
|
p(
|
|
211
223
|
"i",
|
|
212
224
|
{
|
|
213
|
-
class:
|
|
214
|
-
[
|
|
215
|
-
"show-bg":
|
|
216
|
-
default:
|
|
217
|
-
small:
|
|
218
|
-
big:
|
|
219
|
-
warning:
|
|
225
|
+
class: b(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
|
|
226
|
+
[o.name]: r.value === "unocss",
|
|
227
|
+
"show-bg": o.showBg || o.bg,
|
|
228
|
+
default: o.size === "default",
|
|
229
|
+
small: o.size === "small",
|
|
230
|
+
big: o.size === "big",
|
|
231
|
+
warning: o.warning
|
|
220
232
|
}]),
|
|
221
|
-
style: h(
|
|
233
|
+
style: h(n.value)
|
|
222
234
|
},
|
|
223
235
|
[
|
|
224
|
-
|
|
236
|
+
r.value === "iksig" ? (s(), a(
|
|
225
237
|
"i",
|
|
226
238
|
{
|
|
227
239
|
key: 0,
|
|
228
|
-
class:
|
|
229
|
-
style: h(
|
|
240
|
+
class: b(`iksig ${o.name}`),
|
|
241
|
+
style: h(n.value)
|
|
230
242
|
},
|
|
231
243
|
null,
|
|
232
244
|
6
|
|
233
245
|
/* CLASS, STYLE */
|
|
234
|
-
)) :
|
|
246
|
+
)) : r.value === "svg" ? (s(), a("svg", ue, [
|
|
235
247
|
p("use", {
|
|
236
|
-
"xlink:href": `#${
|
|
237
|
-
}, null, 8,
|
|
238
|
-
])) :
|
|
248
|
+
"xlink:href": `#${o.name}`
|
|
249
|
+
}, null, 8, fe)
|
|
250
|
+
])) : r.value === "img" ? (s(), a("img", {
|
|
239
251
|
key: 2,
|
|
240
|
-
src:
|
|
252
|
+
src: o.name,
|
|
241
253
|
class: "h-[1em] w-[1em]"
|
|
242
254
|
}, null, 8, de)) : $("v-if", !0)
|
|
243
255
|
],
|
|
@@ -251,19 +263,19 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
|
|
|
251
263
|
]);
|
|
252
264
|
};
|
|
253
265
|
}
|
|
254
|
-
}), E =
|
|
266
|
+
}), E = B(pe), ge = (l) => (W("data-v-bbc42bc9"), l = l(), q(), l), ve = {
|
|
255
267
|
key: 0,
|
|
256
268
|
class: "preview-files"
|
|
257
269
|
}, me = {
|
|
258
270
|
class: "flex",
|
|
259
271
|
style: { width: "80%", "align-items": "center" }
|
|
260
|
-
}, ye = ["onClick"], he = ["title"], ke = { style: { color: "#b8c6d9" } }, _e = ["onClick"],
|
|
272
|
+
}, ye = ["onClick"], he = ["title"], ke = { style: { color: "#b8c6d9" } }, _e = ["onClick"], be = /* @__PURE__ */ ge(() => /* @__PURE__ */ p(
|
|
261
273
|
"span",
|
|
262
274
|
null,
|
|
263
275
|
"预览",
|
|
264
276
|
-1
|
|
265
277
|
/* HOISTED */
|
|
266
|
-
)),
|
|
278
|
+
)), we = {
|
|
267
279
|
key: 1,
|
|
268
280
|
class: "flex preview-img"
|
|
269
281
|
}, xe = /* @__PURE__ */ S({
|
|
@@ -301,39 +313,39 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
|
|
|
301
313
|
}
|
|
302
314
|
},
|
|
303
315
|
setup(l) {
|
|
304
|
-
const e = l,
|
|
316
|
+
const e = l, r = _(e.fileList);
|
|
305
317
|
P(
|
|
306
318
|
() => e.fileList,
|
|
307
|
-
(
|
|
308
|
-
|
|
319
|
+
(t) => {
|
|
320
|
+
t && (r.value = t);
|
|
309
321
|
},
|
|
310
322
|
{ immediate: !0 }
|
|
311
323
|
);
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
id:
|
|
315
|
-
name: `${
|
|
324
|
+
const n = _(!1), o = _({}), c = (t) => {
|
|
325
|
+
o.value = {
|
|
326
|
+
id: t.ossFileId || t.url,
|
|
327
|
+
name: `${t.id}.${t.suffix}`
|
|
316
328
|
// row.originName
|
|
317
|
-
},
|
|
318
|
-
}, u = (
|
|
319
|
-
var f, y, v, m,
|
|
320
|
-
return (f =
|
|
321
|
-
}, g = (
|
|
322
|
-
var f, y, v, m,
|
|
323
|
-
return (f =
|
|
324
|
-
}, L = (
|
|
329
|
+
}, n.value = !0;
|
|
330
|
+
}, u = (t) => {
|
|
331
|
+
var f, y, v, m, i;
|
|
332
|
+
return (f = t == null ? void 0 : t.suffix) != null && f.includes("pdf") ? "iksvg_pdf" : (y = t == null ? void 0 : t.suffix) != null && y.includes("doc") ? "iksvg_word" : (v = t == null ? void 0 : t.suffix) != null && v.includes("xls") ? "iksvg_excel" : (m = t == null ? void 0 : t.suffix) != null && m.includes("mov") ? "iksvg_mov" : (i = t == null ? void 0 : t.suffix) != null && i.includes("zip") ? "iksvg_zip" : "icon-jpg";
|
|
333
|
+
}, g = (t) => {
|
|
334
|
+
var f, y, v, m, i;
|
|
335
|
+
return (f = t == null ? void 0 : t.suffix) != null && f.includes("pdf") ? "#FA4E4E" : (y = t == null ? void 0 : t.suffix) != null && y.includes("doc") ? "#2c69e0" : (v = t.suffix) != null && v.includes("xls") ? "#39BFBF" : (m = t.suffix) != null && m.includes("txt") ? "#2c69e0" : (i = t.suffix) != null && i.includes("zip") ? "#FF9000" : "#32CD79";
|
|
336
|
+
}, L = (t) => {
|
|
325
337
|
const f = document.createElement("a");
|
|
326
|
-
f.href = loadUrl +
|
|
338
|
+
f.href = loadUrl + t.ossFileId, f.download = t.originName, f.click();
|
|
327
339
|
};
|
|
328
|
-
return (
|
|
340
|
+
return (t, f) => {
|
|
329
341
|
var v, m;
|
|
330
342
|
const y = N("el-image");
|
|
331
|
-
return
|
|
332
|
-
e.fileType === "file" ? (
|
|
333
|
-
(
|
|
334
|
-
|
|
343
|
+
return s(), a("div", null, [
|
|
344
|
+
e.fileType === "file" ? (s(), a("div", ve, [
|
|
345
|
+
(s(!0), a(
|
|
346
|
+
z,
|
|
335
347
|
null,
|
|
336
|
-
I(
|
|
348
|
+
I(r.value, (i, C) => (s(), a(
|
|
337
349
|
"div",
|
|
338
350
|
{
|
|
339
351
|
key: C,
|
|
@@ -345,22 +357,22 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
|
|
|
345
357
|
},
|
|
346
358
|
[
|
|
347
359
|
p("div", me, [
|
|
348
|
-
|
|
349
|
-
name: u(
|
|
350
|
-
style: h(`color:${g(
|
|
360
|
+
w(x(E), {
|
|
361
|
+
name: u(i),
|
|
362
|
+
style: h(`color:${g(i)}`),
|
|
351
363
|
size: 36
|
|
352
364
|
}, null, 8, ["name", "style"]),
|
|
353
365
|
p("div", {
|
|
354
366
|
class: "file-name",
|
|
355
|
-
onClick: (O) => L(
|
|
367
|
+
onClick: (O) => L(i)
|
|
356
368
|
}, [
|
|
357
369
|
p("p", {
|
|
358
|
-
title:
|
|
359
|
-
}, A(
|
|
370
|
+
title: i.originName
|
|
371
|
+
}, A(i.originName), 9, he),
|
|
360
372
|
p(
|
|
361
373
|
"p",
|
|
362
374
|
ke,
|
|
363
|
-
A((
|
|
375
|
+
A((i.fileSize / 1024).toFixed(2)) + "KB",
|
|
364
376
|
1
|
|
365
377
|
/* TEXT */
|
|
366
378
|
)
|
|
@@ -368,10 +380,10 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
|
|
|
368
380
|
]),
|
|
369
381
|
p("div", {
|
|
370
382
|
class: "file-preview",
|
|
371
|
-
onClick: (O) => c(
|
|
383
|
+
onClick: (O) => c(i)
|
|
372
384
|
}, [
|
|
373
|
-
|
|
374
|
-
|
|
385
|
+
w(x(E), { name: "iksvg_yulan" }),
|
|
386
|
+
be
|
|
375
387
|
], 8, _e)
|
|
376
388
|
],
|
|
377
389
|
4
|
|
@@ -381,18 +393,18 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
|
|
|
381
393
|
/* KEYED_FRAGMENT */
|
|
382
394
|
))
|
|
383
395
|
])) : $("v-if", !0),
|
|
384
|
-
e.fileType === "img" ? (
|
|
385
|
-
(
|
|
386
|
-
|
|
396
|
+
e.fileType === "img" ? (s(), a("div", we, [
|
|
397
|
+
(s(!0), a(
|
|
398
|
+
z,
|
|
387
399
|
null,
|
|
388
|
-
I(
|
|
400
|
+
I(r.value, (i, C) => (s(), a("div", {
|
|
389
401
|
key: C,
|
|
390
402
|
class: "preview-img"
|
|
391
403
|
}, [
|
|
392
|
-
|
|
404
|
+
w(y, {
|
|
393
405
|
class: "show-img",
|
|
394
|
-
src: l.loadUrl +
|
|
395
|
-
"preview-src-list": [l.loadUrl +
|
|
406
|
+
src: l.loadUrl + i.url,
|
|
407
|
+
"preview-src-list": [l.loadUrl + i.url],
|
|
396
408
|
fit: "cover"
|
|
397
409
|
}, null, 8, ["src", "preview-src-list"])
|
|
398
410
|
]))),
|
|
@@ -400,20 +412,20 @@ const oe = U(se), re = { class: "inline-block ik-svg-icon ik-icon line-height-[0
|
|
|
400
412
|
/* KEYED_FRAGMENT */
|
|
401
413
|
))
|
|
402
414
|
])) : $("v-if", !0),
|
|
403
|
-
|
|
404
|
-
modelValue:
|
|
405
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
415
|
+
w(x(ne), {
|
|
416
|
+
modelValue: n.value,
|
|
417
|
+
"onUpdate:modelValue": f[0] || (f[0] = (i) => n.value = i),
|
|
406
418
|
"load-url": e.urlPreview,
|
|
407
|
-
url: (v =
|
|
419
|
+
url: (v = o.value) == null ? void 0 : v.id,
|
|
408
420
|
"kk-url": l.previewUrl,
|
|
409
|
-
"file-name": (m =
|
|
421
|
+
"file-name": (m = o.value) == null ? void 0 : m.name
|
|
410
422
|
}, null, 8, ["modelValue", "load-url", "url", "kk-url", "file-name"])
|
|
411
423
|
]);
|
|
412
424
|
};
|
|
413
425
|
}
|
|
414
426
|
});
|
|
415
|
-
const $e = /* @__PURE__ */ X(xe, [["__scopeId", "data-v-bbc42bc9"]]),
|
|
427
|
+
const $e = /* @__PURE__ */ X(xe, [["__scopeId", "data-v-bbc42bc9"]]), Be = B($e);
|
|
416
428
|
export {
|
|
417
|
-
|
|
418
|
-
|
|
429
|
+
Be as IKDetailPreviewFiles,
|
|
430
|
+
Be as default
|
|
419
431
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(f,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):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.Vue,f["element-plus"],f["iking-utils-pro"]))})(this,function(f,e,S,$){"use strict";const h=(t,l)=>{if(t.install=r=>{for(const i of[t,...Object.values(l??{})])r.component(i.name,i)},l)for(const[r,i]of Object.entries(l))t[r]=i;return t},V=(t,l)=>{const r=t.__vccOpts||t;for(const[i,n]of l)r[i]=n;return r},re="",z=typeof btoa=="function",_=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const B=typeof TextEncoder=="function"?new TextEncoder:void 0,F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=Array.prototype.slice.call(F);(t=>{let l={};return t.forEach((r,i)=>l[r]=i),l})(y);const d=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const N=t=>t.replace(/=/g,"").replace(/[+\/]/g,l=>l=="+"?"-":"_"),b=z?t=>btoa(t):_?t=>Buffer.from(t,"binary").toString("base64"):t=>{let l,r,i,n,u="";const a=t.length%3;for(let p=0;p<t.length;){if((r=t.charCodeAt(p++))>255||(i=t.charCodeAt(p++))>255||(n=t.charCodeAt(p++))>255)throw new TypeError("invalid character found");l=r<<16|i<<8|n,u+=y[l>>18&63]+y[l>>12&63]+y[l>>6&63]+y[l&63]}return a?u.slice(0,a-3)+"===".substring(a):u},U=_?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let i=0,n=t.length;i<n;i+=4096)r.push(d.apply(null,t.subarray(i,i+4096)));return b(r.join(""))},I=t=>{if(t.length<2){var l=t.charCodeAt(0);return l<128?t:l<2048?d(192|l>>>6)+d(128|l&63):d(224|l>>>12&15)+d(128|l>>>6&63)+d(128|l&63)}else{var l=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return d(240|l>>>18&7)+d(128|l>>>12&63)+d(128|l>>>6&63)+d(128|l&63)}},D=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,A=t=>t.replace(D,I),x=_?t=>Buffer.from(t,"utf8").toString("base64"):B?t=>U(B.encode(t)):t=>b(A(t)),P=(t,l=!1)=>l?N(x(t)):x(t),v=["src"],T=e.defineComponent({__name:"IKPreviewFile",props:{modelValue:{type:Boolean,default:!1},kkUrl:{required:!0,type:String,default:""},url:{required:!0,type:String,default:""},loadUrl:{type:String,default:""},fileName:{type:String,default:""}},setup(t){const l=t,r=e.ref(null),i=e.computed(()=>!l.kkUrl||!l.url?"":`${l.kkUrl}${encodeURIComponent(P(`${l.loadUrl}${l.url}${l.fileName?`&fullfilename=${l.fileName}`:""}`))}`),n=e.ref(l.modelValue);return e.watch(()=>l.modelValue,u=>{n.value=u}),(u,a)=>(e.openBlock(),e.createBlock(e.unref(S.ElDialog),{fullscreen:"",modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=p=>n.value=p),"destroy-on-close":"","append-to-body":"","modal-class":"ik-file-preview-modal",onClose:a[1]||(a[1]=p=>u.$emit("update:modelValue",!1)),class:"ik-file-preview"},{default:e.withCtx(()=>[e.createElementVNode("iframe",{ref_key:"freamRef",ref:r,"cross-origin":"",src:i.value,frameborder:"0",allowfullscreen:"",seamless:""},null,8,v)]),_:1},8,["modelValue"]))}}),se="",j=h(T),K={class:"inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center"},q={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},L=["xlink:href"],O=["src"],W={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},R=["xlink:href"],G=["src"],C=h(e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},opacity:{default:.5},size:{default:""},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"0"},warning:{type:Boolean},notip:{type:Boolean,default:!1},title:{}},setup(t){const l=t,r=e.computed(()=>{var n;return/^http?:\/\//.test(l.name)?"img":/i-[^:]+:[^:]+/.test(l.name)?"unocss":l.name.startsWith("iksig")?"iksig":(n=l.name)!=null&&n.includes(":")?"iconify":"svg"}),i=e.computed(()=>{const n=[];if(l.flip)switch(l.flip){case"horizontal":n.push("rotateY(180deg)");break;case"vertical":n.push("rotateX(180deg)");break;case"both":n.push("rotateX(180deg)"),n.push("rotateY(180deg)");break}return l.rotate&&n.push(`rotate(${l.rotate%360}deg)`),{...l.color&&{color:l.color},...l.size&&{fontSize:typeof l.size=="number"?`${l.size}px`:l.size},...n.length&&{transform:n.join(" ")},padding:l.padding,...l.color&&r.value!=="iksig"?{"--ik-color-icon-dark":l.color,"--ik-color-icon-light":$.ikColor.setOpacity(l.color,l.opacity||.4)}:{}}});return(n,u)=>{const a=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",K,[n.notip||!n.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[n.name]:r.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",q,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,L)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,O)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(a,{key:1,content:n.title},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[n.name]:r.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",W,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,R)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,G)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),M=t=>(e.pushScopeId("data-v-bbc42bc9"),t=t(),e.popScopeId(),t),X={key:0,class:"preview-files"},Y={class:"flex",style:{width:"80%","align-items":"center"}},H=["onClick"],J=["title"],Q={style:{color:"#b8c6d9"}},Z=["onClick"],ee=M(()=>e.createElementVNode("span",null,"预览",-1)),le={key:1,class:"flex preview-img"},te=e.defineComponent({__name:"IKDetailPreviewFiles",props:{fileList:{type:Array,default:()=>[]},fileType:{type:String,default:"file"},fileWidth:{type:String,default:"100%"},loadUrl:{type:String,default:""},previewUrl:{required:!0,type:String,default:""},urlPreview:{type:String,default:`"${window.location.origin}/server/oss/download?fileUrl="`}},setup(t){const l=t,r=e.ref(l.fileList);e.watch(()=>l.fileList,o=>{o&&(r.value=o)},{immediate:!0});const i=e.ref(!1),n=e.ref({}),u=o=>{n.value={id:o.ossFileId||o.url,name:`${o.id}.${o.suffix}`},i.value=!0},a=o=>{var c,k,m,g,s;return(c=o==null?void 0:o.suffix)!=null&&c.includes("pdf")?"iksvg_pdf":(k=o==null?void 0:o.suffix)!=null&&k.includes("doc")?"iksvg_word":(m=o==null?void 0:o.suffix)!=null&&m.includes("xls")?"iksvg_excel":(g=o==null?void 0:o.suffix)!=null&&g.includes("mov")?"iksvg_mov":(s=o==null?void 0:o.suffix)!=null&&s.includes("zip")?"iksvg_zip":"icon-jpg"},p=o=>{var c,k,m,g,s;return(c=o==null?void 0:o.suffix)!=null&&c.includes("pdf")?"#FA4E4E":(k=o==null?void 0:o.suffix)!=null&&k.includes("doc")?"#2c69e0":(m=o.suffix)!=null&&m.includes("xls")?"#39BFBF":(g=o.suffix)!=null&&g.includes("txt")?"#2c69e0":(s=o.suffix)!=null&&s.includes("zip")?"#FF9000":"#32CD79"},ne=o=>{const c=document.createElement("a");c.href=loadUrl+o.ossFileId,c.download=o.originName,c.click()};return(o,c)=>{var m,g;const k=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",null,[l.fileType==="file"?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"files-item",style:e.normalizeStyle({width:l.fileWidth,"margin-right":l.fileWidth==="100%"?"0px":""})},[e.createElementVNode("div",Y,[e.createVNode(e.unref(C),{name:a(s),style:e.normalizeStyle(`color:${p(s)}`),size:36},null,8,["name","style"]),e.createElementVNode("div",{class:"file-name",onClick:oe=>ne(s)},[e.createElementVNode("p",{title:s.originName},e.toDisplayString(s.originName),9,J),e.createElementVNode("p",Q,e.toDisplayString((s.fileSize/1024).toFixed(2))+"KB",1)],8,H)]),e.createElementVNode("div",{class:"file-preview",onClick:oe=>u(s)},[e.createVNode(e.unref(C),{name:"iksvg_yulan"}),ee],8,Z)],4))),128))])):e.createCommentVNode("v-if",!0),l.fileType==="img"?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"preview-img"},[e.createVNode(k,{class:"show-img",src:t.loadUrl+s.url,"preview-src-list":[t.loadUrl+s.url],fit:"cover"},null,8,["src","preview-src-list"])]))),128))])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(j),{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=s=>i.value=s),"load-url":l.urlPreview,url:(m=n.value)==null?void 0:m.id,"kk-url":t.previewUrl,"file-name":(g=n.value)==null?void 0:g.name},null,8,["modelValue","load-url","url","kk-url","file-name"])])}}}),ce="",E=h(V(te,[["__scopeId","data-v-bbc42bc9"]]));f.IKDetailPreviewFiles=E,f.default=E,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(d,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):(d=typeof globalThis<"u"?globalThis:d||self,e(d.index={},d.Vue,d["element-plus"],d["iking-utils-pro"]))})(this,function(d,e,S,$){"use strict";const h=(o,l)=>{if(o.install=r=>{for(const i of[o,...Object.values(l??{})])r.component(i.name,i)},l)for(const[r,i]of Object.entries(l))o[r]=i;return o},V=(o,l)=>{const r=o.__vccOpts||o;for(const[i,t]of l)r[i]=t;return r},re="",z=typeof btoa=="function",_=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const b=typeof TextEncoder=="function"?new TextEncoder:void 0,F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=Array.prototype.slice.call(F);(o=>{let l={};return o.forEach((r,i)=>l[r]=i),l})(y);const u=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const N=o=>o.replace(/=/g,"").replace(/[+\/]/g,l=>l=="+"?"-":"_"),B=z?o=>btoa(o):_?o=>Buffer.from(o,"binary").toString("base64"):o=>{let l,r,i,t,a="";const c=o.length%3;for(let p=0;p<o.length;){if((r=o.charCodeAt(p++))>255||(i=o.charCodeAt(p++))>255||(t=o.charCodeAt(p++))>255)throw new TypeError("invalid character found");l=r<<16|i<<8|t,a+=y[l>>18&63]+y[l>>12&63]+y[l>>6&63]+y[l&63]}return c?a.slice(0,c-3)+"===".substring(c):a},v=_?o=>Buffer.from(o).toString("base64"):o=>{let r=[];for(let i=0,t=o.length;i<t;i+=4096)r.push(u.apply(null,o.subarray(i,i+4096)));return B(r.join(""))},U=o=>{if(o.length<2){var l=o.charCodeAt(0);return l<128?o:l<2048?u(192|l>>>6)+u(128|l&63):u(224|l>>>12&15)+u(128|l>>>6&63)+u(128|l&63)}else{var l=65536+(o.charCodeAt(0)-55296)*1024+(o.charCodeAt(1)-56320);return u(240|l>>>18&7)+u(128|l>>>12&63)+u(128|l>>>6&63)+u(128|l&63)}},I=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,D=o=>o.replace(I,U),x=_?o=>Buffer.from(o,"utf8").toString("base64"):b?o=>v(b.encode(o)):o=>B(D(o)),A=(o,l=!1)=>l?N(x(o)):x(o),P=["src"],T=e.defineComponent({__name:"IKPreviewFile",props:{modelValue:{type:Boolean,default:!1},kkUrl:{required:!0,type:String,default:""},url:{required:!0,type:String,default:""},loadUrl:{type:String,default:""},fileName:{type:String,default:""}},setup(o){const l=o,r=e.ref(null),i=e.computed(()=>!l.kkUrl||!l.url?"":`${l.kkUrl}${encodeURIComponent(A(`${l.loadUrl}${l.url}${l.fileName?`&fullfilename=${l.fileName}`:""}`))}`),t=e.ref(l.modelValue);return e.watch(()=>l.modelValue,a=>{t.value=a}),(a,c)=>(e.openBlock(),e.createBlock(e.unref(S.ElDialog),{fullscreen:"",modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=p=>t.value=p),"destroy-on-close":"","append-to-body":"","modal-class":"ik-file-preview-modal",onClose:c[1]||(c[1]=p=>a.$emit("update:modelValue",!1)),class:"ik-file-preview"},{default:e.withCtx(()=>[e.createElementVNode("iframe",{ref_key:"freamRef",ref:r,"cross-origin":"",src:i.value,frameborder:"0",allowfullscreen:"",seamless:""},null,8,P)]),_:1},8,["modelValue"]))}}),se="",j=h(T),K={class:"inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center"},q={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},L=["xlink:href"],O=["src"],W={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},R=["xlink:href"],G=["src"],C=h(e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},opacity:{default:.5},size:{default:""},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"0"},warning:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(o){const l=o,r=e.computed(()=>{var t,a;return/^http?:\/\//.test(l.name)?"img":/i-[^:]+:[^:]+/.test(l.name)?"unocss":(t=l.name)!=null&&t.startsWith("iksig")?"iksig":(a=l.name)!=null&&a.includes(":")?"iconify":"svg"}),i=e.computed(()=>{const t=[];if(l.flip)switch(l.flip){case"horizontal":t.push("rotateY(180deg)");break;case"vertical":t.push("rotateX(180deg)");break;case"both":t.push("rotateX(180deg)"),t.push("rotateY(180deg)");break}return l.rotate&&t.push(`rotate(${l.rotate%360}deg)`),{...l.color&&{color:l.color},...l.size&&{fontSize:typeof l.size=="number"?`${l.size}px`:l.size},...t.length&&{transform:t.join(" ")},padding:l.padding,...l.color&&r.value!=="iksig"?{"--ik-color-icon-dark":l.color,"--ik-color-icon-light":$.ikColor.setOpacity(l.color,l.opacity||.4)}:{},...l.type==="primary"?{"--ik-color-icon-dark":"var(--ik-theme-color)","--ik-color-icon-light":"var(--ik-color-icon-light-hover)","--ik-color-bg-icon":"var(--ik-color-bg-button-secondary)"}:l.type==="warning"?{"--ik-color-icon-dark":"var(--ik-color-error)","--ik-color-icon-light":"var(--ik-color-icon-error-light)","--ik-color-bg-icon":"var(--ik-color-icon-error-bg)"}:{}}});return(t,a)=>{const c=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",K,[t.notip||!t.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[t.name]:r.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",small:t.size==="small",big:t.size==="big",warning:t.warning}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",q,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,L)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,O)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(c,{key:1,content:t.title},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[t.name]:r.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",small:t.size==="small",big:t.size==="big",warning:t.warning}]),style:e.normalizeStyle(i.value)},[r.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(i.value)},null,6)):r.value==="svg"?(e.openBlock(),e.createElementBlock("svg",W,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,R)])):r.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,G)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),M=o=>(e.pushScopeId("data-v-bbc42bc9"),o=o(),e.popScopeId(),o),X={key:0,class:"preview-files"},Y={class:"flex",style:{width:"80%","align-items":"center"}},H=["onClick"],J=["title"],Q={style:{color:"#b8c6d9"}},Z=["onClick"],ee=M(()=>e.createElementVNode("span",null,"预览",-1)),le={key:1,class:"flex preview-img"},oe=e.defineComponent({__name:"IKDetailPreviewFiles",props:{fileList:{type:Array,default:()=>[]},fileType:{type:String,default:"file"},fileWidth:{type:String,default:"100%"},loadUrl:{type:String,default:""},previewUrl:{required:!0,type:String,default:""},urlPreview:{type:String,default:`"${window.location.origin}/server/oss/download?fileUrl="`}},setup(o){const l=o,r=e.ref(l.fileList);e.watch(()=>l.fileList,n=>{n&&(r.value=n)},{immediate:!0});const i=e.ref(!1),t=e.ref({}),a=n=>{t.value={id:n.ossFileId||n.url,name:`${n.id}.${n.suffix}`},i.value=!0},c=n=>{var f,k,m,g,s;return(f=n==null?void 0:n.suffix)!=null&&f.includes("pdf")?"iksvg_pdf":(k=n==null?void 0:n.suffix)!=null&&k.includes("doc")?"iksvg_word":(m=n==null?void 0:n.suffix)!=null&&m.includes("xls")?"iksvg_excel":(g=n==null?void 0:n.suffix)!=null&&g.includes("mov")?"iksvg_mov":(s=n==null?void 0:n.suffix)!=null&&s.includes("zip")?"iksvg_zip":"icon-jpg"},p=n=>{var f,k,m,g,s;return(f=n==null?void 0:n.suffix)!=null&&f.includes("pdf")?"#FA4E4E":(k=n==null?void 0:n.suffix)!=null&&k.includes("doc")?"#2c69e0":(m=n.suffix)!=null&&m.includes("xls")?"#39BFBF":(g=n.suffix)!=null&&g.includes("txt")?"#2c69e0":(s=n.suffix)!=null&&s.includes("zip")?"#FF9000":"#32CD79"},te=n=>{const f=document.createElement("a");f.href=loadUrl+n.ossFileId,f.download=n.originName,f.click()};return(n,f)=>{var m,g;const k=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",null,[l.fileType==="file"?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"files-item",style:e.normalizeStyle({width:l.fileWidth,"margin-right":l.fileWidth==="100%"?"0px":""})},[e.createElementVNode("div",Y,[e.createVNode(e.unref(C),{name:c(s),style:e.normalizeStyle(`color:${p(s)}`),size:36},null,8,["name","style"]),e.createElementVNode("div",{class:"file-name",onClick:ne=>te(s)},[e.createElementVNode("p",{title:s.originName},e.toDisplayString(s.originName),9,J),e.createElementVNode("p",Q,e.toDisplayString((s.fileSize/1024).toFixed(2))+"KB",1)],8,H)]),e.createElementVNode("div",{class:"file-preview",onClick:ne=>a(s)},[e.createVNode(e.unref(C),{name:"iksvg_yulan"}),ee],8,Z)],4))),128))])):e.createCommentVNode("v-if",!0),l.fileType==="img"?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"preview-img"},[e.createVNode(k,{class:"show-img",src:o.loadUrl+s.url,"preview-src-list":[o.loadUrl+s.url],fit:"cover"},null,8,["src","preview-src-list"])]))),128))])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(j),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=s=>i.value=s),"load-url":l.urlPreview,url:(m=t.value)==null?void 0:m.id,"kk-url":o.previewUrl,"file-name":(g=t.value)==null?void 0:g.name},null,8,["modelValue","load-url","url","kk-url","file-name"])])}}}),ce="",E=h(V(oe,[["__scopeId","data-v-bbc42bc9"]]));d.IKDetailPreviewFiles=E,d.default=E,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|