@qynpm/ui 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-autocomplete/index.cjs +1 -1
- package/dist/qy-autocomplete/index.mjs +1 -1
- package/dist/qy-checkbox/index.cjs +1 -1
- package/dist/qy-checkbox/index.mjs +1 -1
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +1 -1
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +1 -1
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/index.mjs +1 -1
- package/dist/qy-image/index.cjs +1 -1
- package/dist/qy-image/index.mjs +1 -1
- package/dist/qy-image-preview/index.cjs +1 -1
- package/dist/qy-image-preview/index.mjs +1 -1
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-input/index.cjs +1 -1
- package/dist/qy-input/index.mjs +1 -1
- package/dist/qy-input-number/index.cjs +1 -1
- package/dist/qy-input-number/index.mjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-money-input/index.cjs +1 -1
- package/dist/qy-money-input/index.mjs +1 -1
- package/dist/qy-radio-group/index.cjs +1 -1
- package/dist/qy-radio-group/index.mjs +1 -1
- package/dist/qy-record-quote-search/index.cjs +1 -1
- package/dist/qy-record-quote-search/index.mjs +1 -1
- package/dist/qy-remark-image/index.cjs +1 -1
- package/dist/qy-remark-image/index.mjs +1 -1
- package/dist/qy-remote-select/index.cjs +1 -1
- package/dist/qy-remote-select/index.mjs +1 -1
- package/dist/qy-search-input/index.cjs +1 -1
- package/dist/qy-search-input/index.mjs +1 -1
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +1 -1
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-tree-select/index.cjs +1 -1
- package/dist/qy-tree-select/index.mjs +1 -1
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/index-BycHYJ4s.cjs +1 -0
- package/dist/shared/{index-mvzeQjZL.mjs → index-D4tsKXQA.mjs} +1267 -1233
- package/package.json +1 -1
- package/dist/shared/index-BmPzoVd4.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ElUpload as _t, ElIcon as
|
|
2
|
-
import { ref as
|
|
3
|
-
import { Plus as cl, InfoFilled as fl, PictureFilled as
|
|
4
|
-
import { ElMessage as ge, ElLoading as ml, ElImageViewer as
|
|
5
|
-
import { _ as
|
|
1
|
+
import { ElUpload as _t, ElIcon as pt, ElPopover as el, ElInput as tl, ElImageViewer as ll, ElDialog as yt, ElLoadingDirective as al } from "element-plus/es";
|
|
2
|
+
import { ref as U, onMounted as Je, computed as F, watch as re, nextTick as De, onBeforeUnmount as Ye, openBlock as V, createElementBlock as H, normalizeStyle as Ae, normalizeClass as he, createVNode as J, withCtx as S, withModifiers as ue, unref as C, Fragment as Be, createElementVNode as W, toDisplayString as fe, createCommentVNode as X, createBlock as ee, createTextVNode as me, h as We, createApp as nl, defineComponent as se, renderSlot as O, useAttrs as pe, mergeProps as ie, useSlots as _e, useModel as ol, watchEffect as rl, onUnmounted as gt, resolveComponent as ul, createSlots as Re, withDirectives as et, vShow as ht, mergeModels as ut, renderList as Ue, withKeys as Ke, resolveDynamicComponent as il, Comment as sl, normalizeProps as Oe, guardReactiveProps as Qe, getCurrentInstance as dl, reactive as Ze } from "vue";
|
|
3
|
+
import { Plus as cl, InfoFilled as fl, PictureFilled as it } from "@element-plus/icons-vue";
|
|
4
|
+
import { ElMessage as ge, ElLoading as ml, ElImageViewer as vt, ElImage as pl, ElIcon as st, ElButton as ke, ElSelect as tt, ElOption as lt, ElInput as Me, ElPopover as yl, ElUpload as gl, ElInputNumber as hl, ElDatePicker as vl, ElCheckbox as bl, ElAutocomplete as bt, ElRadioButton as wl, ElRadio as kl, ElRadioGroup as Sl, ElTreeSelect as wt, ElTag as dt, ElForm as kt, ElFormItem as Ie, ElTable as Vl, ElTableColumn as xl, ElPagination as Cl } from "element-plus";
|
|
5
|
+
import { _ as ze, w as oe } from "./install-DMq9RQ-h.mjs";
|
|
6
6
|
import $l from "clsx";
|
|
7
7
|
import { useBreakpoints as Bl, useDraggable as zl } from "@vueuse/core";
|
|
8
8
|
import { M as ql } from "./index-B4JNbDHG.mjs";
|
|
9
9
|
import { T as Il } from "./index-BWIOoRpy.mjs";
|
|
10
10
|
/*! js-cookie v3.0.5 | MIT */
|
|
11
|
-
function
|
|
11
|
+
function Ee(t) {
|
|
12
12
|
for (var b = 1; b < arguments.length; b++) {
|
|
13
13
|
var w = arguments[b];
|
|
14
14
|
for (var e in w)
|
|
@@ -28,22 +28,22 @@ var Rl = {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
function Ge(t, b) {
|
|
31
|
-
function w(a,
|
|
31
|
+
function w(a, A, u) {
|
|
32
32
|
if (!(typeof document > "u")) {
|
|
33
|
-
u =
|
|
33
|
+
u = Ee({}, b, u), typeof u.expires == "number" && (u.expires = new Date(Date.now() + u.expires * 864e5)), u.expires && (u.expires = u.expires.toUTCString()), a = encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
34
34
|
var c = "";
|
|
35
35
|
for (var f in u)
|
|
36
36
|
u[f] && (c += "; " + f, u[f] !== !0 && (c += "=" + u[f].split(";")[0]));
|
|
37
|
-
return document.cookie = a + "=" + t.write(
|
|
37
|
+
return document.cookie = a + "=" + t.write(A, a) + c;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
function e(a) {
|
|
41
41
|
if (!(typeof document > "u" || arguments.length && !a)) {
|
|
42
|
-
for (var
|
|
43
|
-
var f =
|
|
42
|
+
for (var A = document.cookie ? document.cookie.split("; ") : [], u = {}, c = 0; c < A.length; c++) {
|
|
43
|
+
var f = A[c].split("="), B = f.slice(1).join("=");
|
|
44
44
|
try {
|
|
45
|
-
var
|
|
46
|
-
if (u[
|
|
45
|
+
var R = decodeURIComponent(f[0]);
|
|
46
|
+
if (u[R] = t.read(B, R), a === R)
|
|
47
47
|
break;
|
|
48
48
|
} catch {
|
|
49
49
|
}
|
|
@@ -55,20 +55,20 @@ function Ge(t, b) {
|
|
|
55
55
|
{
|
|
56
56
|
set: w,
|
|
57
57
|
get: e,
|
|
58
|
-
remove: function(a,
|
|
58
|
+
remove: function(a, A) {
|
|
59
59
|
w(
|
|
60
60
|
a,
|
|
61
61
|
"",
|
|
62
|
-
|
|
62
|
+
Ee({}, A, {
|
|
63
63
|
expires: -1
|
|
64
64
|
})
|
|
65
65
|
);
|
|
66
66
|
},
|
|
67
67
|
withAttributes: function(a) {
|
|
68
|
-
return Ge(this.converter,
|
|
68
|
+
return Ge(this.converter, Ee({}, this.attributes, a));
|
|
69
69
|
},
|
|
70
70
|
withConverter: function(a) {
|
|
71
|
-
return Ge(
|
|
71
|
+
return Ge(Ee({}, this.converter, a), this.attributes);
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
{
|
|
@@ -151,33 +151,33 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
151
151
|
"remove"
|
|
152
152
|
],
|
|
153
153
|
setup(t, { expose: b, emit: w }) {
|
|
154
|
-
const e = t, a = w,
|
|
155
|
-
let
|
|
156
|
-
const
|
|
154
|
+
const e = t, a = w, A = U(null), u = U([]), c = U(null), f = U(null), B = [];
|
|
155
|
+
let R = !1;
|
|
156
|
+
const K = U(!1), I = U([]), Q = U(0), h = U(!1), j = U(""), P = U(""), G = /* @__PURE__ */ new Set(), E = U(!1), d = U(""), x = U(!1);
|
|
157
157
|
Je(() => {
|
|
158
158
|
e.modelValue === void 0 && $(e.defaultValue);
|
|
159
159
|
});
|
|
160
|
-
const i =
|
|
160
|
+
const i = F(() => ({ large: "160px", default: "140px", small: "80px" })[e.size] ?? e.size), Z = F(() => e.disabled), Y = F(
|
|
161
161
|
() => {
|
|
162
162
|
var s;
|
|
163
|
-
return e.isShowTip && (e.fileSize || ((s =
|
|
163
|
+
return e.isShowTip && (e.fileSize || ((s = k.value) == null ? void 0 : s.length));
|
|
164
164
|
}
|
|
165
|
-
),
|
|
165
|
+
), k = F(() => {
|
|
166
166
|
var s;
|
|
167
167
|
return (s = e.fileType) != null && s.length ? e.fileType.map((g) => g.toLowerCase()) : e.supportVideo ? ["mp4", "mov", "avi"] : ["jpg", "jpeg", "png", "gif", "webp"];
|
|
168
|
-
}),
|
|
168
|
+
}), v = F(() => {
|
|
169
169
|
const s = e.supportVideo ? 1 : e.limit;
|
|
170
170
|
return u.value.length >= s;
|
|
171
|
-
}),
|
|
172
|
-
() =>
|
|
173
|
-
), l =
|
|
174
|
-
"qy-upload--reached-limit":
|
|
171
|
+
}), D = F(
|
|
172
|
+
() => k.value.map((s) => `.${s}`).join(",")
|
|
173
|
+
), l = F(() => ({
|
|
174
|
+
"qy-upload--reached-limit": v.value,
|
|
175
175
|
"qy-upload--disabled": e.disabled,
|
|
176
176
|
"qy-upload--video": e.supportVideo,
|
|
177
177
|
"qy-upload--without-text": !e.showText && !e.showPasteInput
|
|
178
178
|
}));
|
|
179
179
|
re(d, () => {
|
|
180
|
-
|
|
180
|
+
R || _();
|
|
181
181
|
}), re(
|
|
182
182
|
() => e.modelValue,
|
|
183
183
|
(s) => {
|
|
@@ -188,7 +188,7 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
188
188
|
function n(s) {
|
|
189
189
|
return Array.isArray(s) ? s.filter(Boolean) : s ? String(s).split(",").filter(Boolean) : [];
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function M(s) {
|
|
192
192
|
return Array.isArray(s) ? { files: s, text: "" } : typeof s == "string" ? { files: n(s), text: "" } : s && typeof s == "object" ? {
|
|
193
193
|
files: n(s.files),
|
|
194
194
|
text: s.text ?? ""
|
|
@@ -209,56 +209,56 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
209
209
|
return [...s, ...o];
|
|
210
210
|
}
|
|
211
211
|
function $(s) {
|
|
212
|
-
const g =
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
const g = M(s);
|
|
213
|
+
R = !0, d.value = g.text, u.value = y(le(g.files)), De(() => {
|
|
214
|
+
R = !1;
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function N(s) {
|
|
218
218
|
return e.valueFormat === "array" ? s.files : e.valueFormat === "string" ? s.files.join(",") : s;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function z() {
|
|
221
221
|
var s;
|
|
222
222
|
(s = c.value) == null || s.focus();
|
|
223
223
|
}
|
|
224
224
|
function m(s) {
|
|
225
225
|
s.target.value = "";
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
const r = { files: (s ?? u.value).filter((
|
|
229
|
-
a("update:modelValue",
|
|
227
|
+
function _(s) {
|
|
228
|
+
const r = { files: (s ?? u.value).filter((T) => T.status === "success" && T.url).map((T) => T.url), text: d.value };
|
|
229
|
+
a("update:modelValue", N(r)), a("change", r), e.callBack && e.callBack(r);
|
|
230
230
|
}
|
|
231
231
|
function ae(s, g) {
|
|
232
|
-
|
|
232
|
+
_(g), a("remove", s, g);
|
|
233
233
|
}
|
|
234
234
|
function ve(s) {
|
|
235
235
|
var r;
|
|
236
236
|
if (!(s.size / 1024 / 1024 < e.fileSize))
|
|
237
237
|
return ge.warning(`文件大小不能超过${e.fileSize}M`), !1;
|
|
238
238
|
const o = ((r = s.name.split(".").pop()) == null ? void 0 : r.toLowerCase()) || "";
|
|
239
|
-
return
|
|
240
|
-
`格式不支持,仅允许: ${
|
|
239
|
+
return k.value.includes(o) ? !0 : (ge.warning(
|
|
240
|
+
`格式不支持,仅允许: ${k.value.join("/")}`
|
|
241
241
|
), !1);
|
|
242
242
|
}
|
|
243
243
|
async function xe(s, g, o, r) {
|
|
244
|
-
const
|
|
244
|
+
const T = $e(s);
|
|
245
245
|
try {
|
|
246
|
-
const
|
|
246
|
+
const q = await e.uploadRequest({
|
|
247
247
|
file: s,
|
|
248
|
-
formData:
|
|
248
|
+
formData: T,
|
|
249
249
|
api: e.api,
|
|
250
250
|
name: e.name,
|
|
251
251
|
tokenKey: e.tokenKey,
|
|
252
252
|
extraData: e.extraData
|
|
253
|
-
}), ne = Ce(
|
|
253
|
+
}), ne = Ce(q);
|
|
254
254
|
if (!ne) {
|
|
255
255
|
const Ve = new Error("上传失败,未返回文件地址");
|
|
256
256
|
ge.error(Ve.message), a("error", Ve), o == null || o(Ve);
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
|
-
ge.success("上传成功"), g == null || g({ ...typeof
|
|
260
|
-
} catch (
|
|
261
|
-
ge.error("上传失败"), a("error",
|
|
259
|
+
ge.success("上传成功"), g == null || g({ ...typeof q == "object" && q ? q : {}, url: ne });
|
|
260
|
+
} catch (q) {
|
|
261
|
+
ge.error("上传失败"), a("error", q), o == null || o(q);
|
|
262
262
|
} finally {
|
|
263
263
|
r.close();
|
|
264
264
|
}
|
|
@@ -268,31 +268,31 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
268
268
|
return g.append(e.name, s), e.extraData && Object.entries(e.extraData).forEach(([o, r]) => g.append(o, r)), g;
|
|
269
269
|
}
|
|
270
270
|
function Ce(s) {
|
|
271
|
-
var r,
|
|
271
|
+
var r, T;
|
|
272
272
|
if (typeof s == "string") return s;
|
|
273
|
-
const g = s || {}, o = g.urls ?? g.url ?? ((r = g.data) == null ? void 0 : r.urls) ?? ((
|
|
273
|
+
const g = s || {}, o = g.urls ?? g.url ?? ((r = g.data) == null ? void 0 : r.urls) ?? ((T = g.data) == null ? void 0 : T.url) ?? "";
|
|
274
274
|
return Array.isArray(o) ? o[0] || "" : o || "";
|
|
275
275
|
}
|
|
276
276
|
function p(s, g, o, r) {
|
|
277
|
-
var
|
|
278
|
-
const
|
|
279
|
-
target:
|
|
277
|
+
var ot, rt;
|
|
278
|
+
const T = ((ot = A.value) == null ? void 0 : ot.$el.querySelector(".el-upload--picture-card")) || ((rt = A.value) == null ? void 0 : rt.$el), q = ml.service({
|
|
279
|
+
target: T,
|
|
280
280
|
text: "上传中",
|
|
281
281
|
background: "rgba(255,255,255,0.7)"
|
|
282
282
|
});
|
|
283
283
|
if (e.uploadRequest) {
|
|
284
|
-
xe(s, o, r,
|
|
284
|
+
xe(s, o, r, q);
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
287
|
const ne = e.api.startsWith("http") ? e.api : window.location.origin + e.api.replace(/^([^/])/, "/$1"), Ve = $e(s), ye = new XMLHttpRequest();
|
|
288
288
|
B.push(ye);
|
|
289
289
|
const we = () => {
|
|
290
290
|
const ce = B.indexOf(ye);
|
|
291
|
-
ce !== -1 && B.splice(ce, 1),
|
|
291
|
+
ce !== -1 && B.splice(ce, 1), q.close();
|
|
292
292
|
};
|
|
293
293
|
ye.open("POST", ne);
|
|
294
|
-
const
|
|
295
|
-
|
|
294
|
+
const nt = Tl(e.tokenKey);
|
|
295
|
+
nt && ye.setRequestHeader("Authorization", `Bearer ${nt}`), ye.upload.onprogress = (ce) => {
|
|
296
296
|
ce.total > 0 && (g == null || g({ percent: ce.loaded / ce.total * 100 }));
|
|
297
297
|
}, ye.onload = () => {
|
|
298
298
|
if (we(), ye.status < 200 || ye.status >= 300) {
|
|
@@ -310,14 +310,14 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
310
310
|
we(), ge.error("上传失败,网络异常"), a("error", new Error("Network error")), r == null || r(new Error("Network error"));
|
|
311
311
|
}, ye.send(Ve);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function L(s) {
|
|
314
314
|
return e.disabled ? !1 : ve(s);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function te(s, g) {
|
|
317
317
|
const o = u.value.find(
|
|
318
318
|
(r) => {
|
|
319
|
-
var
|
|
320
|
-
return r.uid === (s == null ? void 0 : s.uid) || ((
|
|
319
|
+
var T;
|
|
320
|
+
return r.uid === (s == null ? void 0 : s.uid) || ((T = r.raw) == null ? void 0 : T.uid) === (s == null ? void 0 : s.uid);
|
|
321
321
|
}
|
|
322
322
|
);
|
|
323
323
|
o && (o.url = g, o.status = "success");
|
|
@@ -327,7 +327,7 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
327
327
|
s.file,
|
|
328
328
|
s.onProgress,
|
|
329
329
|
(g) => {
|
|
330
|
-
|
|
330
|
+
te(s.file, g.url), s.onSuccess(g), _(), a("success", g);
|
|
331
331
|
},
|
|
332
332
|
(g) => s.onError(g)
|
|
333
333
|
);
|
|
@@ -337,75 +337,75 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
337
337
|
if (!s.url) return;
|
|
338
338
|
const g = ((r = s.url.split(".").pop()) == null ? void 0 : r.toLowerCase()) || "";
|
|
339
339
|
if (["mp4", "mov", "avi", "webm"].includes(g)) {
|
|
340
|
-
|
|
340
|
+
j.value = s.url, P.value = s.name || "视频预览", h.value = !0;
|
|
341
341
|
return;
|
|
342
342
|
}
|
|
343
343
|
const o = u.value.filter(
|
|
344
|
-
(
|
|
345
|
-
var
|
|
346
|
-
return
|
|
347
|
-
(
|
|
344
|
+
(T) => {
|
|
345
|
+
var q;
|
|
346
|
+
return T.status === "success" && T.url && !["mp4", "mov", "avi", "webm"].includes(
|
|
347
|
+
(q = T.url.split(".").pop()) == null ? void 0 : q.toLowerCase()
|
|
348
348
|
);
|
|
349
349
|
}
|
|
350
350
|
);
|
|
351
|
-
|
|
351
|
+
I.value = o.map((T) => T.url), Q.value = o.findIndex((T) => T.uid === s.uid) || 0, K.value = !0;
|
|
352
352
|
}
|
|
353
353
|
function de() {
|
|
354
|
-
|
|
354
|
+
K.value = !1, I.value = [];
|
|
355
355
|
}
|
|
356
356
|
function Te(s) {
|
|
357
357
|
for (let g = 0; g < s.length; g++) {
|
|
358
358
|
const o = s[g];
|
|
359
|
-
if (!
|
|
360
|
-
const r = Date.now() + g,
|
|
361
|
-
|
|
359
|
+
if (!L(o)) continue;
|
|
360
|
+
const r = Date.now() + g, T = URL.createObjectURL(o);
|
|
361
|
+
G.add(T), u.value.push({
|
|
362
362
|
uid: r,
|
|
363
363
|
name: o.name || `file-${r}`,
|
|
364
364
|
status: "uploading",
|
|
365
365
|
percentage: 0,
|
|
366
|
-
url:
|
|
366
|
+
url: T
|
|
367
367
|
}), p(
|
|
368
368
|
o,
|
|
369
|
-
(
|
|
369
|
+
(q) => {
|
|
370
370
|
const ne = u.value.find((Ve) => Ve.uid === r);
|
|
371
|
-
ne && (ne.percentage =
|
|
371
|
+
ne && (ne.percentage = q.percent);
|
|
372
372
|
},
|
|
373
|
-
(
|
|
373
|
+
(q) => {
|
|
374
374
|
const ne = u.value.find((Ve) => Ve.uid === r);
|
|
375
|
-
ne && (ne.status = "success", ne.url =
|
|
375
|
+
ne && (ne.status = "success", ne.url = q.url, _(), a("success", q));
|
|
376
376
|
},
|
|
377
377
|
() => Ne(r)
|
|
378
378
|
);
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function qe(s) {
|
|
382
382
|
var r;
|
|
383
383
|
if (e.disabled) return;
|
|
384
384
|
const g = (r = s.clipboardData) == null ? void 0 : r.items;
|
|
385
385
|
if (!g) return;
|
|
386
386
|
const o = [];
|
|
387
|
-
for (let
|
|
388
|
-
const
|
|
389
|
-
if (
|
|
390
|
-
const ne =
|
|
387
|
+
for (let T = 0; T < g.length; T++) {
|
|
388
|
+
const q = g[T];
|
|
389
|
+
if (q.kind === "file" && q.type.startsWith("image/")) {
|
|
390
|
+
const ne = q.getAsFile();
|
|
391
391
|
ne && o.push(ne);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
o.length && (s.preventDefault(), Te(o));
|
|
395
395
|
}
|
|
396
396
|
function Pe() {
|
|
397
|
-
e.disabled || e.disableDrag || (
|
|
397
|
+
e.disabled || e.disableDrag || (E.value = !0);
|
|
398
398
|
}
|
|
399
399
|
function Le() {
|
|
400
|
-
|
|
400
|
+
E.value = !1;
|
|
401
401
|
}
|
|
402
402
|
function je(s) {
|
|
403
403
|
var o;
|
|
404
|
-
if (
|
|
404
|
+
if (E.value = !1, e.disabled || e.disableDrag || v.value) return;
|
|
405
405
|
const g = Array.from(((o = s.dataTransfer) == null ? void 0 : o.files) || []).filter(
|
|
406
406
|
(r) => {
|
|
407
|
-
var
|
|
408
|
-
return
|
|
407
|
+
var T;
|
|
408
|
+
return k.value.includes((T = r.name.split(".").pop()) == null ? void 0 : T.toLowerCase());
|
|
409
409
|
}
|
|
410
410
|
);
|
|
411
411
|
g.length && Te(g);
|
|
@@ -413,21 +413,21 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
413
413
|
function Ne(s) {
|
|
414
414
|
var o;
|
|
415
415
|
const g = u.value.findIndex((r) => r.uid === s);
|
|
416
|
-
g !== -1 && ((o = u.value[g].url) != null && o.startsWith("blob:") && (URL.revokeObjectURL(u.value[g].url),
|
|
416
|
+
g !== -1 && ((o = u.value[g].url) != null && o.startsWith("blob:") && (URL.revokeObjectURL(u.value[g].url), G.delete(u.value[g].url)), u.value.splice(g, 1));
|
|
417
417
|
}
|
|
418
418
|
return Ye(() => {
|
|
419
|
-
B.forEach((s) => s.abort()), B.length = 0,
|
|
419
|
+
B.forEach((s) => s.abort()), B.length = 0, G.forEach((s) => URL.revokeObjectURL(s)), G.clear();
|
|
420
420
|
}), b({
|
|
421
421
|
/** 主动打开文件选择框,供表单或快捷操作调用 */
|
|
422
422
|
openFileDialog: () => {
|
|
423
423
|
var s, g;
|
|
424
|
-
e.disabled ||
|
|
424
|
+
e.disabled || v.value || (g = (s = A.value) == null ? void 0 : s.$el.querySelector('input[type="file"]')) == null || g.click();
|
|
425
425
|
},
|
|
426
426
|
/** 获取已上传成功的文件 URL 列表 */
|
|
427
427
|
getPathList: () => u.value.filter((s) => s.status === "success").map((s) => s.url),
|
|
428
428
|
/** 清空文件和文字,并同步 change 事件 */
|
|
429
429
|
clearFiles: () => {
|
|
430
|
-
u.value = [], d.value = "",
|
|
430
|
+
u.value = [], d.value = "", _();
|
|
431
431
|
},
|
|
432
432
|
/** 获取完整值,结构与 change 事件保持一致 */
|
|
433
433
|
getValue: () => ({
|
|
@@ -435,75 +435,75 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
435
435
|
text: d.value
|
|
436
436
|
}),
|
|
437
437
|
/** 获取按 valueFormat 输出的值,便于外部不走 v-model 时读取 */
|
|
438
|
-
getModelValue: () =>
|
|
438
|
+
getModelValue: () => N({
|
|
439
439
|
files: u.value.filter((s) => s.status === "success" && s.url).map((s) => s.url),
|
|
440
440
|
text: d.value
|
|
441
441
|
})
|
|
442
442
|
}), (s, g) => {
|
|
443
443
|
var ye;
|
|
444
|
-
const o =
|
|
445
|
-
return V(),
|
|
444
|
+
const o = pt, r = tl, T = el, q = _t, ne = ll, Ve = yt;
|
|
445
|
+
return V(), H("div", {
|
|
446
446
|
class: he(["qy-upload", l.value]),
|
|
447
447
|
style: Ae({ "--qy-upload-size": i.value })
|
|
448
448
|
}, [
|
|
449
|
-
|
|
449
|
+
J(q, {
|
|
450
450
|
ref_key: "uploadRef",
|
|
451
|
-
ref:
|
|
451
|
+
ref: A,
|
|
452
452
|
"file-list": u.value,
|
|
453
453
|
"onUpdate:fileList": g[6] || (g[6] = (we) => u.value = we),
|
|
454
454
|
action: "#",
|
|
455
455
|
multiple: t.supportVideo ? !1 : t.multiple,
|
|
456
456
|
limit: t.supportVideo ? 1 : t.limit,
|
|
457
457
|
"list-type": t.supportVideo ? "text" : "picture-card",
|
|
458
|
-
accept:
|
|
459
|
-
disabled:
|
|
458
|
+
accept: D.value,
|
|
459
|
+
disabled: Z.value,
|
|
460
460
|
"http-request": be,
|
|
461
|
-
"before-upload":
|
|
461
|
+
"before-upload": L,
|
|
462
462
|
"on-preview": Se,
|
|
463
463
|
"on-remove": ae
|
|
464
464
|
}, {
|
|
465
465
|
default: S(() => [
|
|
466
|
-
|
|
466
|
+
v.value ? X("", !0) : (V(), H("div", {
|
|
467
467
|
key: 0,
|
|
468
|
-
class: he(["qy-upload__trigger", { "is-dragover":
|
|
469
|
-
onPaste:
|
|
468
|
+
class: he(["qy-upload__trigger", { "is-dragover": E.value }]),
|
|
469
|
+
onPaste: qe,
|
|
470
470
|
onDragover: ue(Pe, ["prevent"]),
|
|
471
471
|
onDragleave: ue(Le, ["prevent"]),
|
|
472
472
|
onDrop: ue(je, ["prevent"])
|
|
473
473
|
}, [
|
|
474
|
-
|
|
474
|
+
J(o, { class: "qy-upload__icon" }, {
|
|
475
475
|
default: S(() => [
|
|
476
|
-
|
|
476
|
+
J(C(cl))
|
|
477
477
|
]),
|
|
478
478
|
_: 1
|
|
479
479
|
}),
|
|
480
|
-
t.supportVideo ? (V(),
|
|
481
|
-
g[9] || (g[9] =
|
|
482
|
-
|
|
483
|
-
], 64)) :
|
|
484
|
-
t.showText ? (V(),
|
|
480
|
+
t.supportVideo ? (V(), H(Be, { key: 0 }, [
|
|
481
|
+
g[9] || (g[9] = W("span", { class: "qy-upload__label" }, "点击上传视频", -1)),
|
|
482
|
+
W("span", Pl, "支持 " + fe(k.value.join(" / ")) + ",不超过 " + fe(t.fileSize) + "MB", 1)
|
|
483
|
+
], 64)) : X("", !0),
|
|
484
|
+
t.showText ? (V(), H("div", {
|
|
485
485
|
key: 1,
|
|
486
486
|
class: "qy-upload__text",
|
|
487
487
|
onClick: g[3] || (g[3] = ue(() => {
|
|
488
488
|
}, ["stop"])),
|
|
489
|
-
onPaste: ue(
|
|
489
|
+
onPaste: ue(qe, ["stop"])
|
|
490
490
|
}, [
|
|
491
|
-
|
|
491
|
+
J(T, {
|
|
492
492
|
visible: x.value,
|
|
493
493
|
"onUpdate:visible": g[2] || (g[2] = (we) => x.value = we),
|
|
494
494
|
placement: "bottom-start",
|
|
495
495
|
width: 220,
|
|
496
496
|
trigger: "click",
|
|
497
497
|
"popper-class": "qy-upload__text-popover",
|
|
498
|
-
onAfterEnter:
|
|
498
|
+
onAfterEnter: z
|
|
499
499
|
}, {
|
|
500
500
|
reference: S(() => [
|
|
501
|
-
|
|
501
|
+
W("div", {
|
|
502
502
|
class: he(["qy-upload__text-preview", { "is-placeholder": !d.value }])
|
|
503
503
|
}, fe(d.value || t.pastePlaceholder), 3)
|
|
504
504
|
]),
|
|
505
505
|
default: S(() => [
|
|
506
|
-
|
|
506
|
+
J(r, {
|
|
507
507
|
ref_key: "inputRef",
|
|
508
508
|
ref: c,
|
|
509
509
|
modelValue: d.value,
|
|
@@ -513,84 +513,84 @@ const Pl = { class: "qy-upload__hint" }, Ml = ["placeholder", "disabled"], Fl =
|
|
|
513
513
|
placeholder: t.pastePlaceholder,
|
|
514
514
|
disabled: t.disabled,
|
|
515
515
|
onBlur: g[1] || (g[1] = (we) => x.value = !1),
|
|
516
|
-
onPaste: ue(
|
|
516
|
+
onPaste: ue(qe, ["stop"])
|
|
517
517
|
}, null, 8, ["modelValue", "placeholder", "disabled"])
|
|
518
518
|
]),
|
|
519
519
|
_: 1
|
|
520
520
|
}, 8, ["visible"])
|
|
521
|
-
], 32)) : t.showPasteInput ? (V(),
|
|
521
|
+
], 32)) : t.showPasteInput ? (V(), H("div", {
|
|
522
522
|
key: 2,
|
|
523
523
|
class: "qy-upload__text",
|
|
524
524
|
onClick: g[5] || (g[5] = ue(() => {
|
|
525
525
|
}, ["stop"])),
|
|
526
|
-
onPaste: ue(
|
|
526
|
+
onPaste: ue(qe, ["stop"])
|
|
527
527
|
}, [
|
|
528
|
-
|
|
528
|
+
W("input", {
|
|
529
529
|
ref_key: "pasteInputRef",
|
|
530
530
|
ref: f,
|
|
531
531
|
class: "qy-upload__paste-input",
|
|
532
532
|
placeholder: t.pastePlaceholder,
|
|
533
533
|
disabled: t.disabled,
|
|
534
|
-
onPaste: ue(
|
|
534
|
+
onPaste: ue(qe, ["stop"]),
|
|
535
535
|
onInput: m,
|
|
536
536
|
onClick: g[4] || (g[4] = ue(() => {
|
|
537
537
|
}, ["stop"]))
|
|
538
538
|
}, null, 40, Ml)
|
|
539
|
-
], 32)) :
|
|
539
|
+
], 32)) : X("", !0)
|
|
540
540
|
], 34))
|
|
541
541
|
]),
|
|
542
542
|
_: 1
|
|
543
543
|
}, 8, ["file-list", "multiple", "limit", "list-type", "accept", "disabled"]),
|
|
544
|
-
|
|
544
|
+
K.value ? (V(), ee(ne, {
|
|
545
545
|
key: 0,
|
|
546
|
-
"url-list":
|
|
547
|
-
"initial-index":
|
|
546
|
+
"url-list": I.value,
|
|
547
|
+
"initial-index": Q.value,
|
|
548
548
|
onClose: de
|
|
549
|
-
}, null, 8, ["url-list", "initial-index"])) :
|
|
550
|
-
|
|
549
|
+
}, null, 8, ["url-list", "initial-index"])) : X("", !0),
|
|
550
|
+
J(Ve, {
|
|
551
551
|
modelValue: h.value,
|
|
552
552
|
"onUpdate:modelValue": g[7] || (g[7] = (we) => h.value = we),
|
|
553
|
-
title:
|
|
553
|
+
title: P.value,
|
|
554
554
|
width: "640px",
|
|
555
555
|
"append-to-body": "",
|
|
556
556
|
"destroy-on-close": "",
|
|
557
557
|
onClose: g[8] || (g[8] = (we) => h.value = !1)
|
|
558
558
|
}, {
|
|
559
559
|
default: S(() => [
|
|
560
|
-
h.value ? (V(),
|
|
560
|
+
h.value ? (V(), H("video", {
|
|
561
561
|
key: 0,
|
|
562
|
-
src:
|
|
562
|
+
src: j.value,
|
|
563
563
|
controls: "",
|
|
564
564
|
autoplay: "",
|
|
565
565
|
style: { width: "100%", "max-height": "400px", "border-radius": "4px" }
|
|
566
|
-
}, null, 8, Fl)) :
|
|
566
|
+
}, null, 8, Fl)) : X("", !0)
|
|
567
567
|
]),
|
|
568
568
|
_: 1
|
|
569
569
|
}, 8, ["modelValue", "title"]),
|
|
570
|
-
|
|
571
|
-
|
|
570
|
+
Y.value ? (V(), H("div", Ol, [
|
|
571
|
+
J(o, null, {
|
|
572
572
|
default: S(() => [
|
|
573
|
-
|
|
573
|
+
J(C(fl))
|
|
574
574
|
]),
|
|
575
575
|
_: 1
|
|
576
576
|
}),
|
|
577
|
-
|
|
577
|
+
W("span", null, [
|
|
578
578
|
g[12] || (g[12] = me(" 请上传 ", -1)),
|
|
579
|
-
t.fileSize ? (V(),
|
|
579
|
+
t.fileSize ? (V(), H(Be, { key: 0 }, [
|
|
580
580
|
g[10] || (g[10] = me("大小不超过 ", -1)),
|
|
581
|
-
|
|
582
|
-
], 64)) :
|
|
583
|
-
(ye =
|
|
581
|
+
W("b", Ql, fe(t.fileSize) + "MB", 1)
|
|
582
|
+
], 64)) : X("", !0),
|
|
583
|
+
(ye = k.value) != null && ye.length ? (V(), H(Be, { key: 1 }, [
|
|
584
584
|
g[11] || (g[11] = me(",格式为 ", -1)),
|
|
585
|
-
|
|
586
|
-
], 64)) :
|
|
585
|
+
W("b", Dl, fe(k.value.join("/")), 1)
|
|
586
|
+
], 64)) : X("", !0),
|
|
587
587
|
g[13] || (g[13] = me(" 的文件。 ", -1))
|
|
588
588
|
])
|
|
589
|
-
])) :
|
|
589
|
+
])) : X("", !0)
|
|
590
590
|
], 6);
|
|
591
591
|
};
|
|
592
592
|
}
|
|
593
|
-
}), Vt = /* @__PURE__ */
|
|
593
|
+
}), Vt = /* @__PURE__ */ ze(Ul, [["__scopeId", "data-v-3b975429"]]), Kl = {
|
|
594
594
|
w: 200,
|
|
595
595
|
h: 200,
|
|
596
596
|
q: 50
|
|
@@ -615,14 +615,14 @@ async function Ll(t, b = {}) {
|
|
|
615
615
|
src: w,
|
|
616
616
|
source: "original"
|
|
617
617
|
};
|
|
618
|
-
const a = El(t, e),
|
|
618
|
+
const a = El(t, e), A = b.loadBlob ?? Nl, u = b.compressBlob ?? Hl;
|
|
619
619
|
try {
|
|
620
|
-
return await
|
|
620
|
+
return await A(a), {
|
|
621
621
|
src: a,
|
|
622
622
|
source: "thumbnail"
|
|
623
623
|
};
|
|
624
624
|
} catch {
|
|
625
|
-
const c = await
|
|
625
|
+
const c = await A(w);
|
|
626
626
|
return {
|
|
627
627
|
src: await u(c, Ct(e)),
|
|
628
628
|
source: "fallback"
|
|
@@ -636,14 +636,14 @@ function xt(t = {}) {
|
|
|
636
636
|
if (!b.length) return { close() {
|
|
637
637
|
} };
|
|
638
638
|
const w = globalThis.__QY_IMAGE_PREVIEW_CREATE_APP__ ?? nl, e = document.createElement("div"), a = document.body.style.overflow;
|
|
639
|
-
let
|
|
639
|
+
let A = !1, u;
|
|
640
640
|
const c = () => {
|
|
641
641
|
var f;
|
|
642
|
-
|
|
642
|
+
A || (A = !0, document.body.style.overflow = a, (f = u == null ? void 0 : u.unmount) == null || f.call(u), e.parentNode && e.parentNode.removeChild(e));
|
|
643
643
|
};
|
|
644
644
|
return document.body.appendChild(e), document.body.style.overflow = "hidden", u = w({
|
|
645
645
|
setup() {
|
|
646
|
-
return () => We(
|
|
646
|
+
return () => We(vt, {
|
|
647
647
|
urlList: b,
|
|
648
648
|
initialIndex: t.initialIndex ?? 0,
|
|
649
649
|
hideOnClickModal: t.hideOnClickModal ?? !0,
|
|
@@ -672,8 +672,8 @@ async function Hl(t, b) {
|
|
|
672
672
|
return Gl(t);
|
|
673
673
|
const w = URL.createObjectURL(t);
|
|
674
674
|
try {
|
|
675
|
-
const e = await Wl(w), a = document.createElement("canvas"),
|
|
676
|
-
return a.width = Math.max(1, Math.round(e.naturalWidth *
|
|
675
|
+
const e = await Wl(w), a = document.createElement("canvas"), A = Zl(e, b);
|
|
676
|
+
return a.width = Math.max(1, Math.round(e.naturalWidth * A)), a.height = Math.max(1, Math.round(e.naturalHeight * A)), a.getContext("2d").drawImage(e, 0, 0, a.width, a.height), a.toDataURL(t.type || "image/jpeg", b.q / 100);
|
|
677
677
|
} finally {
|
|
678
678
|
URL.revokeObjectURL(w);
|
|
679
679
|
}
|
|
@@ -712,79 +712,79 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
712
712
|
},
|
|
713
713
|
emits: ["load", "error", "fallback", "preview"],
|
|
714
714
|
setup(t, { emit: b }) {
|
|
715
|
-
const w = t, e = b, a =
|
|
715
|
+
const w = t, e = b, a = U(!1), A = U("");
|
|
716
716
|
let u = 0;
|
|
717
|
-
const c =
|
|
717
|
+
const c = F(() => Fe(w.src)), f = F(() => ({
|
|
718
718
|
width: w.width ?? w.size,
|
|
719
719
|
height: w.height ?? w.size
|
|
720
|
-
})), B =
|
|
721
|
-
width:
|
|
722
|
-
height:
|
|
723
|
-
})),
|
|
720
|
+
})), B = F(() => ({
|
|
721
|
+
width: G(f.value.width),
|
|
722
|
+
height: G(f.value.height)
|
|
723
|
+
})), R = F(() => w.placeholder || a.value), K = F(() => w.preview && !!c.value), I = F(() => (w.previewList.length ? w.previewList : [w.src]).map((d) => Fe(d)).filter(Boolean));
|
|
724
724
|
re(
|
|
725
725
|
() => [w.src, w.compressor],
|
|
726
|
-
|
|
726
|
+
Q,
|
|
727
727
|
{
|
|
728
728
|
immediate: !0,
|
|
729
729
|
deep: !0
|
|
730
730
|
}
|
|
731
731
|
);
|
|
732
|
-
async function
|
|
733
|
-
const
|
|
734
|
-
if (
|
|
732
|
+
async function Q() {
|
|
733
|
+
const E = ++u;
|
|
734
|
+
if (A.value = "", a.value = !1, !!w.src)
|
|
735
735
|
try {
|
|
736
736
|
const d = await Ll(w.src, {
|
|
737
737
|
compressor: w.compressor
|
|
738
738
|
});
|
|
739
|
-
if (
|
|
740
|
-
|
|
739
|
+
if (E !== u) return;
|
|
740
|
+
A.value = d.src, d.source === "fallback" && e("fallback", d.src);
|
|
741
741
|
} catch {
|
|
742
|
-
if (
|
|
743
|
-
a.value = !1,
|
|
742
|
+
if (E !== u) return;
|
|
743
|
+
a.value = !1, A.value = c.value;
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
function h(
|
|
747
|
-
e("load",
|
|
746
|
+
function h(E) {
|
|
747
|
+
e("load", E);
|
|
748
748
|
}
|
|
749
|
-
function
|
|
750
|
-
a.value = !0, e("error",
|
|
749
|
+
function j(E) {
|
|
750
|
+
a.value = !0, e("error", E);
|
|
751
751
|
}
|
|
752
|
-
function
|
|
753
|
-
|
|
754
|
-
urlList:
|
|
752
|
+
function P() {
|
|
753
|
+
K.value && (xt({
|
|
754
|
+
urlList: I.value,
|
|
755
755
|
initialIndex: w.initialIndex
|
|
756
756
|
}), e("preview", c.value));
|
|
757
757
|
}
|
|
758
|
-
function
|
|
759
|
-
return typeof
|
|
758
|
+
function G(E) {
|
|
759
|
+
return typeof E == "number" ? `${E}px` : E;
|
|
760
760
|
}
|
|
761
|
-
return (
|
|
762
|
-
class: he(["qy-image", { "qy-image--previewable":
|
|
761
|
+
return (E, d) => (V(), H("div", {
|
|
762
|
+
class: he(["qy-image", { "qy-image--previewable": K.value }]),
|
|
763
763
|
style: Ae(B.value),
|
|
764
|
-
onClick:
|
|
764
|
+
onClick: P
|
|
765
765
|
}, [
|
|
766
|
-
|
|
766
|
+
A.value && !a.value ? (V(), ee(C(pl), {
|
|
767
767
|
key: 0,
|
|
768
768
|
class: "qy-image__inner",
|
|
769
|
-
src:
|
|
769
|
+
src: A.value,
|
|
770
770
|
fit: t.fit,
|
|
771
771
|
lazy: t.lazy,
|
|
772
772
|
onLoad: h,
|
|
773
|
-
onError:
|
|
773
|
+
onError: j
|
|
774
774
|
}, {
|
|
775
775
|
placeholder: S(() => [
|
|
776
|
-
|
|
777
|
-
d[0] || (d[0] =
|
|
778
|
-
|
|
776
|
+
O(E.$slots, "placeholder", {}, () => [
|
|
777
|
+
d[0] || (d[0] = W("div", { class: "qy-image__state" }, [
|
|
778
|
+
W("span", { class: "qy-image__loading" })
|
|
779
779
|
], -1))
|
|
780
780
|
], !0)
|
|
781
781
|
]),
|
|
782
782
|
error: S(() => [
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
783
|
+
O(E.$slots, "error", {}, () => [
|
|
784
|
+
W("div", Xl, [
|
|
785
|
+
J(C(st), { size: 20 }, {
|
|
786
786
|
default: S(() => [
|
|
787
|
-
|
|
787
|
+
J(C(it))
|
|
788
788
|
]),
|
|
789
789
|
_: 1
|
|
790
790
|
})
|
|
@@ -792,19 +792,19 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
792
792
|
], !0)
|
|
793
793
|
]),
|
|
794
794
|
_: 3
|
|
795
|
-
}, 8, ["src", "fit", "lazy"])) :
|
|
796
|
-
|
|
797
|
-
|
|
795
|
+
}, 8, ["src", "fit", "lazy"])) : R.value ? O(E.$slots, "empty", { key: 1 }, () => [
|
|
796
|
+
W("div", Jl, [
|
|
797
|
+
J(C(st), { size: 20 }, {
|
|
798
798
|
default: S(() => [
|
|
799
|
-
|
|
799
|
+
J(C(it))
|
|
800
800
|
]),
|
|
801
801
|
_: 1
|
|
802
802
|
})
|
|
803
803
|
])
|
|
804
|
-
], !0) :
|
|
804
|
+
], !0) : X("", !0)
|
|
805
805
|
], 6));
|
|
806
806
|
}
|
|
807
|
-
}), _l = /* @__PURE__ */
|
|
807
|
+
}), _l = /* @__PURE__ */ ze(Yl, [["__scopeId", "data-v-02c4930c"]]), ea = /* @__PURE__ */ se({
|
|
808
808
|
name: "QyImagePreview",
|
|
809
809
|
__name: "index",
|
|
810
810
|
props: {
|
|
@@ -817,7 +817,7 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
817
817
|
setup(t, { emit: b }) {
|
|
818
818
|
const w = t, e = b;
|
|
819
819
|
let a = "";
|
|
820
|
-
const
|
|
820
|
+
const A = F(
|
|
821
821
|
() => w.urlList.map((f) => Fe(f)).filter(Boolean)
|
|
822
822
|
);
|
|
823
823
|
re(
|
|
@@ -836,14 +836,14 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
836
836
|
function c() {
|
|
837
837
|
typeof document > "u" || (document.body.style.overflow = a);
|
|
838
838
|
}
|
|
839
|
-
return (f, B) => t.open &&
|
|
839
|
+
return (f, B) => t.open && A.value.length ? (V(), ee(C(vt), {
|
|
840
840
|
key: 0,
|
|
841
|
-
"url-list":
|
|
841
|
+
"url-list": A.value,
|
|
842
842
|
"initial-index": t.initialIndex,
|
|
843
843
|
"hide-on-click-modal": t.hideOnClickModal,
|
|
844
844
|
teleport: "body",
|
|
845
845
|
onClose: u
|
|
846
|
-
}, null, 8, ["url-list", "initial-index", "hide-on-click-modal"])) :
|
|
846
|
+
}, null, 8, ["url-list", "initial-index", "hide-on-click-modal"])) : X("", !0);
|
|
847
847
|
}
|
|
848
848
|
}), ta = /* @__PURE__ */ Object.assign({
|
|
849
849
|
name: "QyImageUpload",
|
|
@@ -901,36 +901,36 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
901
901
|
"updateImg"
|
|
902
902
|
],
|
|
903
903
|
setup(t, { expose: b, emit: w }) {
|
|
904
|
-
const e = t, a = w,
|
|
904
|
+
const e = t, a = w, A = pe(), u = U(null), c = ["jpg", "jpeg", "png", "gif", "bmp", "webp"], f = F(
|
|
905
905
|
() => e.voucher || e.mode === "voucher"
|
|
906
|
-
), B =
|
|
906
|
+
), B = F(() => Array.isArray(e.modelValue) ? e.modelValue.filter(Boolean) : e.modelValue ? String(e.modelValue).split(",").filter(Boolean) : []), R = F(() => e.supportVideo ? 1 : f.value ? e.limit ?? 30 : e.limit ?? (e.multiple ? 9 : 1)), K = F(() => {
|
|
907
907
|
var l;
|
|
908
908
|
return (l = e.fileType) != null && l.length ? e.fileType : f.value && !e.supportVideo ? c : [];
|
|
909
909
|
});
|
|
910
|
-
function
|
|
910
|
+
function I(l) {
|
|
911
911
|
return Array.isArray(l) ? l.filter(Boolean) : [];
|
|
912
912
|
}
|
|
913
|
-
function
|
|
914
|
-
const n =
|
|
913
|
+
function Q(l) {
|
|
914
|
+
const n = I(l);
|
|
915
915
|
return e.multiple ? n : n[0] || "";
|
|
916
916
|
}
|
|
917
917
|
function h(l) {
|
|
918
|
-
a("update:modelValue",
|
|
918
|
+
a("update:modelValue", Q(l));
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
a("change",
|
|
920
|
+
function j(l) {
|
|
921
|
+
a("change", Q(l == null ? void 0 : l.files));
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function P(l) {
|
|
924
924
|
var le, y;
|
|
925
925
|
if (typeof l == "string") return l;
|
|
926
|
-
const n = l || {},
|
|
927
|
-
return Array.isArray(
|
|
926
|
+
const n = l || {}, M = n.url ?? n.urls ?? ((le = n.data) == null ? void 0 : le.url) ?? ((y = n.data) == null ? void 0 : y.urls) ?? "";
|
|
927
|
+
return Array.isArray(M) ? M[0] || "" : M || "";
|
|
928
928
|
}
|
|
929
|
-
function
|
|
930
|
-
const n =
|
|
931
|
-
n && a("updateImg", n), a("success",
|
|
929
|
+
function G(l) {
|
|
930
|
+
const n = P(l);
|
|
931
|
+
n && a("updateImg", n), a("success", D(), l);
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function E(l) {
|
|
934
934
|
a("error", l);
|
|
935
935
|
}
|
|
936
936
|
function d(l, n) {
|
|
@@ -944,39 +944,39 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
944
944
|
var l, n;
|
|
945
945
|
(n = (l = u.value) == null ? void 0 : l.clearFiles) == null || n.call(l);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function Z() {
|
|
948
948
|
var l, n;
|
|
949
949
|
return ((n = (l = u.value) == null ? void 0 : l.getPathList) == null ? void 0 : n.call(l)) || [];
|
|
950
950
|
}
|
|
951
|
-
const
|
|
952
|
-
function
|
|
953
|
-
return
|
|
951
|
+
const Y = F(() => Z()), k = F(() => Z());
|
|
952
|
+
function v() {
|
|
953
|
+
return Z();
|
|
954
954
|
}
|
|
955
|
-
function
|
|
956
|
-
const l =
|
|
955
|
+
function D() {
|
|
956
|
+
const l = Z();
|
|
957
957
|
return e.multiple ? l : l[0] || "";
|
|
958
958
|
}
|
|
959
959
|
return b({
|
|
960
960
|
openFileDialog: x,
|
|
961
961
|
clearFiles: i,
|
|
962
|
-
getPathList:
|
|
963
|
-
getFullPathList:
|
|
964
|
-
fullPathList:
|
|
965
|
-
pathList:
|
|
966
|
-
getValue:
|
|
967
|
-
}), (l, n) => (V(),
|
|
962
|
+
getPathList: Z,
|
|
963
|
+
getFullPathList: v,
|
|
964
|
+
fullPathList: Y,
|
|
965
|
+
pathList: k,
|
|
966
|
+
getValue: D
|
|
967
|
+
}), (l, n) => (V(), ee(Vt, ie({
|
|
968
968
|
ref_key: "uploadRef",
|
|
969
969
|
ref: u
|
|
970
|
-
}, C(
|
|
970
|
+
}, C(A), {
|
|
971
971
|
"model-value": B.value,
|
|
972
972
|
"value-format": "array",
|
|
973
973
|
api: t.api,
|
|
974
974
|
name: t.name,
|
|
975
975
|
multiple: t.multiple,
|
|
976
976
|
disabled: t.disabled,
|
|
977
|
-
"file-type":
|
|
977
|
+
"file-type": K.value,
|
|
978
978
|
"file-size": t.fileSize,
|
|
979
|
-
limit:
|
|
979
|
+
limit: R.value,
|
|
980
980
|
"is-show-tip": t.isShowTip,
|
|
981
981
|
"token-key": t.tokenKey,
|
|
982
982
|
"support-video": t.supportVideo,
|
|
@@ -989,9 +989,9 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
989
989
|
"show-paste-input": t.showPasteInput,
|
|
990
990
|
"paste-placeholder": t.pastePlaceholder,
|
|
991
991
|
"onUpdate:modelValue": h,
|
|
992
|
-
onChange:
|
|
993
|
-
onSuccess:
|
|
994
|
-
onError:
|
|
992
|
+
onChange: j,
|
|
993
|
+
onSuccess: G,
|
|
994
|
+
onError: E,
|
|
995
995
|
onRemove: d
|
|
996
996
|
}), null, 16, ["model-value", "api", "name", "multiple", "disabled", "file-type", "file-size", "limit", "is-show-tip", "token-key", "support-video", "size", "disable-drag", "call-back", "extra-data", "upload-request", "show-paste-input", "paste-placeholder"]));
|
|
997
997
|
}
|
|
@@ -1008,9 +1008,9 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
1008
1008
|
}, ua = {
|
|
1009
1009
|
key: 0,
|
|
1010
1010
|
class: "fixed -right-12 top-2 h-9 w-9 hover:bg-gray-600/80 transition-all"
|
|
1011
|
-
}, ia = { class: "flex justify-between h-[var(--footer-height)] px-[var(--content-padding)] items-center" }, sa = { class: "flex items-center justify-between w-full pl-1 pr-4 h-full ml-2" }, da = { class: "flex items-center gap-2" }, ca = { class: "text-sm text-gray-700 truncate max-w-[200px]" }, fa = { class: "flex items-center gap-2" },
|
|
1011
|
+
}, ia = { class: "flex justify-between h-[var(--footer-height)] px-[var(--content-padding)] items-center" }, sa = { class: "flex items-center justify-between w-full pl-1 pr-4 h-full ml-2" }, da = { class: "flex items-center gap-2" }, ca = { class: "text-sm text-gray-700 truncate max-w-[200px]" }, fa = { class: "flex items-center gap-2" }, ct = 5, He = 2e3, Xe = /* @__PURE__ */ se({
|
|
1012
1012
|
__name: "index",
|
|
1013
|
-
props: /* @__PURE__ */
|
|
1013
|
+
props: /* @__PURE__ */ ut({
|
|
1014
1014
|
layout: { type: [Array, String, Boolean], default: () => ["confirm", "cancel"] },
|
|
1015
1015
|
fullscreen: { type: Boolean, default: !1 },
|
|
1016
1016
|
showFullscreen: { type: Boolean, default: !1 },
|
|
@@ -1021,69 +1021,69 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
1021
1021
|
modelValue: { default: !0 },
|
|
1022
1022
|
modelModifiers: {}
|
|
1023
1023
|
}),
|
|
1024
|
-
emits: /* @__PURE__ */
|
|
1024
|
+
emits: /* @__PURE__ */ ut(["confirm", "cancel", "close", "opened", "ok"], ["update:modelValue"]),
|
|
1025
1025
|
setup(t, { expose: b, emit: w }) {
|
|
1026
|
-
const e = t, a = _e(),
|
|
1026
|
+
const e = t, a = _e(), A = U(!0), u = U(!1), c = U(He), f = U(null), R = Bl({
|
|
1027
1027
|
mobile: 0,
|
|
1028
1028
|
tablet: 640,
|
|
1029
1029
|
laptop: 1024,
|
|
1030
1030
|
desktop: 1280
|
|
1031
|
-
}).isSmaller("tablet"),
|
|
1031
|
+
}).isSmaller("tablet"), K = F(() => {
|
|
1032
1032
|
if (Array.isArray(e.layout)) return e.layout;
|
|
1033
1033
|
if (typeof e.layout == "string")
|
|
1034
|
-
return e.layout.split(",").map((
|
|
1035
|
-
}),
|
|
1036
|
-
CancelButton:
|
|
1037
|
-
ConfirmButton:
|
|
1038
|
-
})),
|
|
1039
|
-
e.showFullscreen &&
|
|
1040
|
-
),
|
|
1034
|
+
return e.layout.split(",").map((z) => z.trim());
|
|
1035
|
+
}), I = F(() => ({
|
|
1036
|
+
CancelButton: J(y),
|
|
1037
|
+
ConfirmButton: J(le)
|
|
1038
|
+
})), Q = F(() => a.footer || e.layout !== !1), h = U(!1), j = U(
|
|
1039
|
+
e.showFullscreen && R ? !0 : e.fullscreen
|
|
1040
|
+
), P = w, G = ol(t, "modelValue");
|
|
1041
1041
|
rl(() => {
|
|
1042
|
-
|
|
1042
|
+
G.value && (h.value = !1);
|
|
1043
1043
|
}), b({
|
|
1044
|
-
handleMinimize:
|
|
1044
|
+
handleMinimize: N
|
|
1045
1045
|
});
|
|
1046
|
-
const
|
|
1046
|
+
const E = pe(), d = `qy-dialog-${Math.random().toString(36).slice(2, 11)}`, x = U(!1), i = U(null);
|
|
1047
1047
|
window.minimizedCount || (window.minimizedCount = 0);
|
|
1048
|
-
const { x:
|
|
1048
|
+
const { x: Z, y: Y } = zl(i, {
|
|
1049
1049
|
initialValue: {
|
|
1050
1050
|
x: 5,
|
|
1051
1051
|
y: window.innerHeight - 100 - (window.minimizedCount || 0) * 60
|
|
1052
1052
|
},
|
|
1053
|
-
onMove(
|
|
1053
|
+
onMove(z) {
|
|
1054
1054
|
var m;
|
|
1055
|
-
(m = i.value) == null || m.classList.add("dragging"), document.body.classList.add("qy-dialog--dragging"),
|
|
1055
|
+
(m = i.value) == null || m.classList.add("dragging"), document.body.classList.add("qy-dialog--dragging"), Z.value = Math.max(
|
|
1056
1056
|
0,
|
|
1057
|
-
Math.min(window.innerWidth - 300,
|
|
1058
|
-
),
|
|
1057
|
+
Math.min(window.innerWidth - 300, z.x)
|
|
1058
|
+
), Y.value = Math.max(
|
|
1059
1059
|
0,
|
|
1060
|
-
Math.min(window.innerHeight - 50,
|
|
1060
|
+
Math.min(window.innerHeight - 50, z.y)
|
|
1061
1061
|
);
|
|
1062
1062
|
},
|
|
1063
1063
|
onEnd() {
|
|
1064
|
-
var
|
|
1065
|
-
(
|
|
1064
|
+
var z;
|
|
1065
|
+
(z = i.value) == null || z.classList.remove("dragging"), document.body.classList.remove("qy-dialog--dragging");
|
|
1066
1066
|
}
|
|
1067
|
-
}),
|
|
1068
|
-
transform: `translate(${
|
|
1067
|
+
}), k = F(() => ({
|
|
1068
|
+
transform: `translate(${Z.value}px, ${Y.value}px)`,
|
|
1069
1069
|
willChange: "transform"
|
|
1070
1070
|
}));
|
|
1071
|
-
function
|
|
1072
|
-
const m =
|
|
1073
|
-
|
|
1071
|
+
function v(z) {
|
|
1072
|
+
const m = z.target, { scrollTop: _, scrollHeight: ae, clientHeight: ve } = m;
|
|
1073
|
+
A.value = _ <= ct, u.value = ae - (_ + ve) <= ct;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1076
|
-
const
|
|
1077
|
-
|
|
1075
|
+
function D() {
|
|
1076
|
+
const z = document.querySelector(`.${d}.el-dialog`);
|
|
1077
|
+
z && (f.value = z, z.addEventListener("scroll", v)), $(), P("opened");
|
|
1078
1078
|
}
|
|
1079
1079
|
function l() {
|
|
1080
|
-
|
|
1080
|
+
j.value = !j.value, $();
|
|
1081
1081
|
}
|
|
1082
1082
|
function n() {
|
|
1083
|
-
h.value || (h.value = !0, x.value = !1,
|
|
1083
|
+
h.value || (h.value = !0, x.value = !1, G.value = !1, P("cancel"), P("close"));
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
e.showFullscreen &&
|
|
1085
|
+
function M(z) {
|
|
1086
|
+
e.showFullscreen && z.detail >= 2 && l();
|
|
1087
1087
|
}
|
|
1088
1088
|
function le() {
|
|
1089
1089
|
return We(
|
|
@@ -1093,7 +1093,7 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
1093
1093
|
type: "primary",
|
|
1094
1094
|
class: "dialog__footerBtn",
|
|
1095
1095
|
onClick: () => {
|
|
1096
|
-
|
|
1096
|
+
P("confirm"), P("ok");
|
|
1097
1097
|
}
|
|
1098
1098
|
},
|
|
1099
1099
|
() => C(e.confirmProps).title || "确 认"
|
|
@@ -1111,209 +1111,209 @@ const Xl = { class: "qy-image__state qy-image__state--error" }, Jl = { class: "q
|
|
|
1111
1111
|
});
|
|
1112
1112
|
function $() {
|
|
1113
1113
|
var $e;
|
|
1114
|
-
const
|
|
1114
|
+
const z = Array.from(
|
|
1115
1115
|
document.querySelectorAll(".el-overlay")
|
|
1116
|
-
).filter((Ce) => window.getComputedStyle(Ce).display !== "none" && !Ce.classList.contains("is-message")), m = ($e = document.querySelector(`.${d}`)) == null ? void 0 : $e.closest(".el-overlay"),
|
|
1116
|
+
).filter((Ce) => window.getComputedStyle(Ce).display !== "none" && !Ce.classList.contains("is-message")), m = ($e = document.querySelector(`.${d}`)) == null ? void 0 : $e.closest(".el-overlay"), _ = document.querySelector(
|
|
1117
1117
|
`.${d}.el-dialog`
|
|
1118
1118
|
);
|
|
1119
|
-
if (!m || !
|
|
1119
|
+
if (!m || !_) return;
|
|
1120
1120
|
const ae = He;
|
|
1121
1121
|
window.qyDialogMaxZIndex = window.qyDialogMaxZIndex || ae;
|
|
1122
1122
|
const xe = Math.max(
|
|
1123
1123
|
window.qyDialogMaxZIndex,
|
|
1124
|
-
...
|
|
1124
|
+
...z.map(
|
|
1125
1125
|
(Ce) => parseInt(window.getComputedStyle(Ce).zIndex || ae.toString())
|
|
1126
1126
|
)
|
|
1127
1127
|
) + 2;
|
|
1128
1128
|
window.qyDialogMaxZIndex = xe, De(() => {
|
|
1129
|
-
m.style.zIndex = xe.toString(),
|
|
1129
|
+
m.style.zIndex = xe.toString(), _.style.zIndex = (xe + 1).toString(), c.value = xe + 1;
|
|
1130
1130
|
});
|
|
1131
1131
|
}
|
|
1132
|
-
|
|
1133
|
-
var
|
|
1134
|
-
(
|
|
1132
|
+
gt(() => {
|
|
1133
|
+
var z;
|
|
1134
|
+
(z = f.value) == null || z.removeEventListener("scroll", v), x.value && window.minimizedCount--;
|
|
1135
1135
|
});
|
|
1136
|
-
function
|
|
1136
|
+
function N() {
|
|
1137
1137
|
var m;
|
|
1138
1138
|
x.value = !x.value;
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1139
|
+
const z = (m = document.querySelector(`.${d}`)) == null ? void 0 : m.closest(".el-overlay");
|
|
1140
|
+
z && (x.value ? (z.style.display = "none", window.minimizedCount++, Y.value = window.innerHeight - 50 - (window.minimizedCount || 0) * 60) : (z.style.display = "block", window.minimizedCount--, $()));
|
|
1141
1141
|
}
|
|
1142
|
-
return (
|
|
1143
|
-
const
|
|
1144
|
-
return V(),
|
|
1145
|
-
|
|
1142
|
+
return (z, m) => {
|
|
1143
|
+
const _ = ul("Close"), ae = pt, ve = yt;
|
|
1144
|
+
return V(), H("div", null, [
|
|
1145
|
+
J(ve, ie({
|
|
1146
1146
|
ref: "dialogRef",
|
|
1147
1147
|
class: ["qy-dialog", [
|
|
1148
1148
|
e.size === "small" && "[&_.el-dialog__header]:!hidden",
|
|
1149
1149
|
d
|
|
1150
1150
|
]],
|
|
1151
|
-
"model-value":
|
|
1151
|
+
"model-value": G.value,
|
|
1152
1152
|
"align-center": "",
|
|
1153
1153
|
"append-to-body": "",
|
|
1154
1154
|
style: {
|
|
1155
1155
|
"--el-dialog-padding-primary": 0
|
|
1156
1156
|
},
|
|
1157
1157
|
"show-close": !1,
|
|
1158
|
-
fullscreen:
|
|
1158
|
+
fullscreen: j.value,
|
|
1159
1159
|
"z-index": c.value,
|
|
1160
1160
|
onClosed: n,
|
|
1161
|
-
onOpened:
|
|
1161
|
+
onOpened: D,
|
|
1162
1162
|
draggable: ""
|
|
1163
|
-
}, C(
|
|
1163
|
+
}, C(E)), Re({
|
|
1164
1164
|
header: S(() => [
|
|
1165
|
-
e.size === "default" ? (V(),
|
|
1165
|
+
e.size === "default" ? (V(), H("div", {
|
|
1166
1166
|
key: 0,
|
|
1167
1167
|
style: Ae({
|
|
1168
1168
|
borderBottom: "1px solid",
|
|
1169
|
-
borderColor:
|
|
1169
|
+
borderColor: A.value ? "transparent" : "var(--block-outline-color)",
|
|
1170
1170
|
transition: "border-color .2s linear"
|
|
1171
1171
|
}),
|
|
1172
1172
|
class: "flex justify-between h-[var(--header-height)]",
|
|
1173
|
-
onDblclick:
|
|
1173
|
+
onDblclick: M
|
|
1174
1174
|
}, [
|
|
1175
|
-
|
|
1176
|
-
C(a).header ? C(a).header ? (V(),
|
|
1177
|
-
|
|
1178
|
-
])) :
|
|
1175
|
+
W("div", la, [
|
|
1176
|
+
C(a).header ? C(a).header ? (V(), H("div", na, [
|
|
1177
|
+
O(z.$slots, "header")
|
|
1178
|
+
])) : X("", !0) : (V(), H("span", aa, fe(C(E).title), 1))
|
|
1179
1179
|
]),
|
|
1180
|
-
|
|
1180
|
+
W("div", {
|
|
1181
1181
|
class: "flex",
|
|
1182
1182
|
onMousedown: m[3] || (m[3] = ue(() => {
|
|
1183
1183
|
}, ["stop"]))
|
|
1184
1184
|
}, [
|
|
1185
|
-
e.size === "default" ? (V(),
|
|
1185
|
+
e.size === "default" ? (V(), H("div", {
|
|
1186
1186
|
key: 0,
|
|
1187
1187
|
class: "qy-dialog__btn qy-dialog__btn--default",
|
|
1188
|
-
onClick: ue(
|
|
1188
|
+
onClick: ue(N, ["stop"]),
|
|
1189
1189
|
onMousedown: m[0] || (m[0] = ue(() => {
|
|
1190
1190
|
}, ["stop"]))
|
|
1191
1191
|
}, [...m[4] || (m[4] = [
|
|
1192
|
-
|
|
1192
|
+
W("span", {
|
|
1193
1193
|
class: "icon-[material-symbols--minimize] text-xl mb-3",
|
|
1194
1194
|
role: "img",
|
|
1195
1195
|
"aria-hidden": "true"
|
|
1196
1196
|
}, null, -1)
|
|
1197
|
-
])], 32)) :
|
|
1198
|
-
e.showFullscreen ? (V(),
|
|
1197
|
+
])], 32)) : X("", !0),
|
|
1198
|
+
e.showFullscreen ? (V(), H("div", {
|
|
1199
1199
|
key: 1,
|
|
1200
1200
|
class: "qy-dialog__btn qy-dialog__btn--default",
|
|
1201
1201
|
onClick: ue(l, ["stop"]),
|
|
1202
1202
|
onMousedown: m[1] || (m[1] = ue(() => {
|
|
1203
1203
|
}, ["stop"]))
|
|
1204
1204
|
}, [
|
|
1205
|
-
|
|
1206
|
-
], 32)) :
|
|
1207
|
-
|
|
1205
|
+
j.value ? (V(), H("span", ra)) : (V(), H("span", oa))
|
|
1206
|
+
], 32)) : X("", !0),
|
|
1207
|
+
W("div", {
|
|
1208
1208
|
class: "qy-dialog__btn qy-dialog__btn--danger",
|
|
1209
1209
|
onClick: ue(n, ["stop"]),
|
|
1210
1210
|
onMousedown: m[2] || (m[2] = ue(() => {
|
|
1211
1211
|
}, ["stop"]))
|
|
1212
1212
|
}, [...m[5] || (m[5] = [
|
|
1213
|
-
|
|
1213
|
+
W("span", {
|
|
1214
1214
|
class: "icon-[ri--close-line] text-xl",
|
|
1215
1215
|
role: "img",
|
|
1216
1216
|
"aria-hidden": "true"
|
|
1217
1217
|
}, null, -1)
|
|
1218
1218
|
])], 32)
|
|
1219
1219
|
], 32)
|
|
1220
|
-
], 36)) :
|
|
1220
|
+
], 36)) : X("", !0)
|
|
1221
1221
|
]),
|
|
1222
1222
|
default: S(() => [
|
|
1223
|
-
|
|
1224
|
-
class: he(["qy-dialog__wrapper", C($l)(
|
|
1223
|
+
W("div", {
|
|
1224
|
+
class: he(["qy-dialog__wrapper", C($l)(j.value && "qy-dialog__wrapper--fullscreen")]),
|
|
1225
1225
|
style: Ae({
|
|
1226
|
-
maxHeight:
|
|
1226
|
+
maxHeight: Q.value ? "calc(100vh - var(--header-height) - var(--footer-height) - var(--sides-gap))" : "calc(100vh - var(--header-height) - var(--sides-gap))",
|
|
1227
1227
|
padding: e.size === "small" ? "var(--small-content-padding)" : "var(--content-padding)"
|
|
1228
1228
|
})
|
|
1229
1229
|
}, [
|
|
1230
|
-
e.size === "small" ? (V(),
|
|
1231
|
-
|
|
1230
|
+
e.size === "small" ? (V(), H("div", ua, [
|
|
1231
|
+
J(ae, {
|
|
1232
1232
|
size: 36,
|
|
1233
1233
|
class: "cursor-pointer text-gray-100 active:scale-75 rounded-sm transition-all",
|
|
1234
1234
|
onClick: n
|
|
1235
1235
|
}, {
|
|
1236
1236
|
default: S(() => [
|
|
1237
|
-
|
|
1237
|
+
J(_)
|
|
1238
1238
|
]),
|
|
1239
1239
|
_: 1
|
|
1240
1240
|
})
|
|
1241
|
-
])) :
|
|
1242
|
-
|
|
1241
|
+
])) : X("", !0),
|
|
1242
|
+
O(z.$slots, "default")
|
|
1243
1243
|
], 6)
|
|
1244
1244
|
]),
|
|
1245
1245
|
_: 2
|
|
1246
1246
|
}, [
|
|
1247
|
-
!
|
|
1247
|
+
!z.$slots.footer && Array.isArray(K.value) ? {
|
|
1248
1248
|
name: "footer",
|
|
1249
1249
|
fn: S(() => [
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1250
|
+
W("div", ia, [
|
|
1251
|
+
W("div", null, [
|
|
1252
|
+
O(z.$slots, "footer-left")
|
|
1253
1253
|
]),
|
|
1254
|
-
|
|
1254
|
+
W("div", {
|
|
1255
1255
|
class: he([{
|
|
1256
1256
|
"qy-dialog__footer--outline": u.value
|
|
1257
1257
|
}, "qy-dialog__footer flex items-center justify-end"])
|
|
1258
1258
|
}, [
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1259
|
+
K.value.includes("cancel") ? (V(), ee(y, { key: 0 })) : X("", !0),
|
|
1260
|
+
K.value.includes("confirm") ? (V(), ee(le, { key: 1 })) : X("", !0),
|
|
1261
|
+
O(z.$slots, "footer-append")
|
|
1262
1262
|
], 2)
|
|
1263
1263
|
])
|
|
1264
1264
|
]),
|
|
1265
1265
|
key: "0"
|
|
1266
|
-
} :
|
|
1266
|
+
} : Q.value ? {
|
|
1267
1267
|
name: "footer",
|
|
1268
1268
|
fn: S(() => [
|
|
1269
|
-
|
|
1269
|
+
W("div", {
|
|
1270
1270
|
class: he([{
|
|
1271
1271
|
"qy-dialog__footer--outline": u.value
|
|
1272
1272
|
}, "qy-dialog__footer px-[var(--content-padding)] min-h-[var(--footer-height)] flex items-center justify-end"])
|
|
1273
1273
|
}, [
|
|
1274
|
-
|
|
1275
|
-
layouts:
|
|
1276
|
-
layoutsNode: Object.values(
|
|
1274
|
+
O(z.$slots, "footer", {
|
|
1275
|
+
layouts: I.value,
|
|
1276
|
+
layoutsNode: Object.values(I.value)
|
|
1277
1277
|
})
|
|
1278
1278
|
], 2)
|
|
1279
1279
|
]),
|
|
1280
1280
|
key: "1"
|
|
1281
1281
|
} : void 0
|
|
1282
1282
|
]), 1040, ["class", "model-value", "fullscreen", "z-index"]),
|
|
1283
|
-
et(
|
|
1283
|
+
et(W("div", {
|
|
1284
1284
|
ref_key: "minimizedRef",
|
|
1285
1285
|
ref: i,
|
|
1286
1286
|
class: "fixed left-0 top-0 bg-white rounded shadow-lg cursor-pointer z-[9999] hover:bg-gray-50",
|
|
1287
|
-
style: Ae([
|
|
1287
|
+
style: Ae([k.value, { width: "300px", height: "50px", "will-change": "transform" }])
|
|
1288
1288
|
}, [
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
m[6] || (m[6] =
|
|
1292
|
-
|
|
1289
|
+
W("div", sa, [
|
|
1290
|
+
W("div", da, [
|
|
1291
|
+
m[6] || (m[6] = W("div", { class: "icon-[mdi--window-restore] text-gray-600" }, null, -1)),
|
|
1292
|
+
W("span", ca, fe(C(E).title), 1)
|
|
1293
1293
|
]),
|
|
1294
|
-
|
|
1295
|
-
|
|
1294
|
+
W("div", fa, [
|
|
1295
|
+
W("div", {
|
|
1296
1296
|
class: "p-1 hover:bg-gray-200 rounded",
|
|
1297
|
-
onClick: ue(
|
|
1297
|
+
onClick: ue(N, ["stop"])
|
|
1298
1298
|
}, [...m[7] || (m[7] = [
|
|
1299
|
-
|
|
1299
|
+
W("div", { class: "icon-[mdi--window-maximize] text-gray-600" }, null, -1)
|
|
1300
1300
|
])]),
|
|
1301
|
-
|
|
1301
|
+
W("div", {
|
|
1302
1302
|
class: "p-1 hover:bg-red-100 rounded",
|
|
1303
1303
|
onClick: ue(n, ["stop"])
|
|
1304
1304
|
}, [...m[8] || (m[8] = [
|
|
1305
|
-
|
|
1305
|
+
W("div", { class: "icon-[mdi--close] text-red-600" }, null, -1)
|
|
1306
1306
|
])])
|
|
1307
1307
|
])
|
|
1308
1308
|
])
|
|
1309
1309
|
], 4), [
|
|
1310
|
-
[
|
|
1310
|
+
[ht, x.value]
|
|
1311
1311
|
])
|
|
1312
1312
|
]);
|
|
1313
1313
|
};
|
|
1314
1314
|
}
|
|
1315
1315
|
});
|
|
1316
|
-
function
|
|
1316
|
+
function ft(t) {
|
|
1317
1317
|
const b = t == null ? void 0 : t.match(/(\[url\:(.*?)\])(.*)/);
|
|
1318
1318
|
return b ? {
|
|
1319
1319
|
imageUrl: b[2],
|
|
@@ -1327,25 +1327,28 @@ function ma(t) {
|
|
|
1327
1327
|
const b = String(t || "").match(/(\[url\:.*?\])([\s\S]*)/);
|
|
1328
1328
|
return b ? b[2] : t;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function mt(t, b) {
|
|
1331
1331
|
return b ? `[url:${b}]${t}` : t;
|
|
1332
1332
|
}
|
|
1333
|
-
const pa = { class: "qy-remark-image__field" }, ya = {
|
|
1333
|
+
const pa = { class: "qy-remark-image__field" }, ya = {
|
|
1334
|
+
key: 1,
|
|
1335
|
+
class: "qy-remark-image__divider"
|
|
1336
|
+
}, ga = { class: "qy-remark-image__upload-anchor" }, ha = {
|
|
1334
1337
|
key: 0,
|
|
1335
1338
|
class: "icon-[line-md--loading-twotone-loop]",
|
|
1336
1339
|
role: "img",
|
|
1337
1340
|
"aria-hidden": "true"
|
|
1338
|
-
},
|
|
1341
|
+
}, va = {
|
|
1339
1342
|
key: 1,
|
|
1340
1343
|
class: "icon-[ion--cloud-upload-outline]",
|
|
1341
1344
|
role: "img",
|
|
1342
1345
|
"aria-hidden": "true"
|
|
1343
|
-
},
|
|
1346
|
+
}, ba = {
|
|
1344
1347
|
key: 2,
|
|
1345
1348
|
class: "icon-[ph--images-thin]",
|
|
1346
1349
|
role: "img",
|
|
1347
1350
|
"aria-hidden": "true"
|
|
1348
|
-
},
|
|
1351
|
+
}, wa = { class: "qy-remark-image__popover" }, ka = ["src"], Sa = { class: "qy-remark-image__popover-footer" }, Va = /* @__PURE__ */ se({
|
|
1349
1352
|
__name: "index",
|
|
1350
1353
|
props: {
|
|
1351
1354
|
defaultValue: { default: "" },
|
|
@@ -1356,16 +1359,24 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1356
1359
|
disabled: { type: Boolean, default: !1 },
|
|
1357
1360
|
placeholder: { default: "粘贴图片上传" },
|
|
1358
1361
|
type: { default: "textarea" },
|
|
1362
|
+
layout: { default: "default" },
|
|
1363
|
+
selectValue: { type: [String, Number, Boolean], default: "" },
|
|
1364
|
+
selectOptions: { default: () => [] },
|
|
1365
|
+
selectDisabled: { type: Boolean, default: !1 },
|
|
1359
1366
|
api: { default: "/permission-api/common/uploads" },
|
|
1360
1367
|
tokenKey: { default: "Admin-Token" },
|
|
1361
1368
|
uploadName: { default: "files" },
|
|
1362
1369
|
uploadRequest: {}
|
|
1363
1370
|
},
|
|
1364
|
-
emits: ["change"],
|
|
1371
|
+
emits: ["change", "update:selectValue", "select-change"],
|
|
1365
1372
|
setup(t, { expose: b, emit: w }) {
|
|
1366
|
-
const e = t, a = w,
|
|
1367
|
-
() => e.
|
|
1368
|
-
),
|
|
1373
|
+
const e = t, a = w, A = pe(), u = U(null), c = U(""), f = U(""), B = U(!1), R = F(
|
|
1374
|
+
() => e.layout === "select-prefix"
|
|
1375
|
+
), K = F(() => ({
|
|
1376
|
+
"qy-remark-image--select-prefix": R.value
|
|
1377
|
+
})), I = F(
|
|
1378
|
+
() => R.value || e.type === "text" ? "text" : "textarea"
|
|
1379
|
+
), Q = F(() => {
|
|
1369
1380
|
if (e.width)
|
|
1370
1381
|
return {
|
|
1371
1382
|
width: typeof e.width == "number" ? `${e.width}px` : e.width
|
|
@@ -1373,45 +1384,48 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1373
1384
|
});
|
|
1374
1385
|
re(
|
|
1375
1386
|
() => e.defaultValue,
|
|
1376
|
-
(
|
|
1377
|
-
const
|
|
1378
|
-
c.value =
|
|
1387
|
+
(v) => {
|
|
1388
|
+
const D = ft(v || "");
|
|
1389
|
+
c.value = D.text, f.value = D.imageUrl || e.defaultImage || "";
|
|
1379
1390
|
},
|
|
1380
1391
|
{ immediate: !0 }
|
|
1381
1392
|
), re(
|
|
1382
1393
|
() => e.defaultImage,
|
|
1383
|
-
(
|
|
1384
|
-
|
|
1394
|
+
(v) => {
|
|
1395
|
+
v !== void 0 && !ft(e.defaultValue || "").imageUrl && (f.value = v || "");
|
|
1385
1396
|
},
|
|
1386
1397
|
{ immediate: !0 }
|
|
1387
1398
|
), Je(() => {
|
|
1388
|
-
De(
|
|
1389
|
-
}),
|
|
1390
|
-
const
|
|
1391
|
-
|
|
1399
|
+
De(j);
|
|
1400
|
+
}), gt(() => {
|
|
1401
|
+
const v = h();
|
|
1402
|
+
v && v.removeEventListener("paste", x);
|
|
1392
1403
|
});
|
|
1393
|
-
function
|
|
1394
|
-
var
|
|
1395
|
-
return ((
|
|
1404
|
+
function h() {
|
|
1405
|
+
var v, D;
|
|
1406
|
+
return ((v = u.value) == null ? void 0 : v.textarea) || ((D = u.value) == null ? void 0 : D.input) || null;
|
|
1396
1407
|
}
|
|
1397
|
-
function
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1408
|
+
function j() {
|
|
1409
|
+
const v = h();
|
|
1410
|
+
v && (v.removeEventListener("paste", x), v.addEventListener("paste", x));
|
|
1400
1411
|
}
|
|
1401
|
-
function
|
|
1402
|
-
c.value = ma(
|
|
1412
|
+
function P(v) {
|
|
1413
|
+
c.value = ma(v || "");
|
|
1403
1414
|
}
|
|
1404
|
-
function
|
|
1405
|
-
|
|
1415
|
+
function G(v) {
|
|
1416
|
+
a("update:selectValue", v), a("select-change", v);
|
|
1406
1417
|
}
|
|
1407
|
-
function
|
|
1408
|
-
|
|
1418
|
+
function E() {
|
|
1419
|
+
f.value = "", k();
|
|
1409
1420
|
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1421
|
+
function d() {
|
|
1422
|
+
c.value = "", f.value = "", k();
|
|
1423
|
+
}
|
|
1424
|
+
async function x(v) {
|
|
1425
|
+
var n;
|
|
1426
|
+
const l = Array.from(((n = v.clipboardData) == null ? void 0 : n.files) || []).find((M) => M.type.startsWith("image/"));
|
|
1427
|
+
l && (v.preventDefault(), await i({
|
|
1428
|
+
file: l,
|
|
1415
1429
|
onError: () => {
|
|
1416
1430
|
},
|
|
1417
1431
|
onProgress: () => {
|
|
@@ -1420,116 +1434,136 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1420
1434
|
}
|
|
1421
1435
|
}));
|
|
1422
1436
|
}
|
|
1423
|
-
async function
|
|
1424
|
-
var
|
|
1425
|
-
if (
|
|
1437
|
+
async function i(v) {
|
|
1438
|
+
var D, l;
|
|
1439
|
+
if (v.file.size > 51200 * 1e3)
|
|
1426
1440
|
return ge.error("图片过大"), !1;
|
|
1427
1441
|
B.value = !0;
|
|
1428
1442
|
try {
|
|
1429
|
-
const
|
|
1430
|
-
return f.value =
|
|
1431
|
-
} catch (
|
|
1432
|
-
return (
|
|
1443
|
+
const n = await Z(v);
|
|
1444
|
+
return f.value = Y(n), k(), ge.success("上传图片成功"), (D = v.onSuccess) == null || D.call(v, n), !0;
|
|
1445
|
+
} catch (n) {
|
|
1446
|
+
return (l = v.onError) == null || l.call(v, n), ge.error("上传失败"), !1;
|
|
1433
1447
|
} finally {
|
|
1434
1448
|
B.value = !1;
|
|
1435
1449
|
}
|
|
1436
1450
|
}
|
|
1437
|
-
async function
|
|
1438
|
-
const
|
|
1439
|
-
if (
|
|
1451
|
+
async function Z(v) {
|
|
1452
|
+
const D = new FormData();
|
|
1453
|
+
if (D.append(e.uploadName, v.file), e.uploadRequest)
|
|
1440
1454
|
return e.uploadRequest({
|
|
1441
|
-
file:
|
|
1442
|
-
formData:
|
|
1443
|
-
options:
|
|
1455
|
+
file: v.file,
|
|
1456
|
+
formData: D,
|
|
1457
|
+
options: v,
|
|
1444
1458
|
api: e.api,
|
|
1445
1459
|
tokenKey: e.tokenKey
|
|
1446
1460
|
});
|
|
1447
|
-
const
|
|
1461
|
+
const l = St.get(e.tokenKey);
|
|
1448
1462
|
return (await fetch(e.api, {
|
|
1449
1463
|
method: "POST",
|
|
1450
|
-
body:
|
|
1464
|
+
body: D,
|
|
1451
1465
|
credentials: "include",
|
|
1452
|
-
headers:
|
|
1466
|
+
headers: l ? { Authorization: `Bearer ${l}` } : void 0
|
|
1453
1467
|
})).json();
|
|
1454
1468
|
}
|
|
1455
|
-
function
|
|
1456
|
-
var
|
|
1457
|
-
if (typeof
|
|
1458
|
-
const
|
|
1459
|
-
return Array.isArray(
|
|
1469
|
+
function Y(v) {
|
|
1470
|
+
var n, M;
|
|
1471
|
+
if (typeof v == "string") return v;
|
|
1472
|
+
const D = v, l = (D == null ? void 0 : D.urls) ?? ((n = D == null ? void 0 : D.data) == null ? void 0 : n.urls) ?? ((M = D == null ? void 0 : D.data) == null ? void 0 : M.url) ?? (D == null ? void 0 : D.url) ?? "";
|
|
1473
|
+
return Array.isArray(l) ? l[0] || "" : l || "";
|
|
1460
1474
|
}
|
|
1461
|
-
function
|
|
1475
|
+
function k() {
|
|
1462
1476
|
a(
|
|
1463
1477
|
"change",
|
|
1464
|
-
|
|
1478
|
+
mt(c.value || "", f.value || ""),
|
|
1465
1479
|
f.value || ""
|
|
1466
1480
|
);
|
|
1467
1481
|
}
|
|
1468
1482
|
return b({
|
|
1469
|
-
deleteImage:
|
|
1483
|
+
deleteImage: E,
|
|
1470
1484
|
// 兼容旧 remarkImage,在表单 reset/clearFrom 时清空文字和图片。
|
|
1471
|
-
clearContent:
|
|
1485
|
+
clearContent: d,
|
|
1472
1486
|
// 给表单保存或外部调试读取当前拆分值。
|
|
1473
1487
|
getValue: () => ({
|
|
1474
1488
|
text: c.value || "",
|
|
1475
1489
|
imageUrl: f.value || "",
|
|
1476
|
-
value:
|
|
1490
|
+
value: mt(c.value || "", f.value || "")
|
|
1477
1491
|
})
|
|
1478
|
-
}), (
|
|
1479
|
-
class: "qy-remark-image",
|
|
1480
|
-
style: Ae(
|
|
1492
|
+
}), (v, D) => (V(), H("div", {
|
|
1493
|
+
class: he(["qy-remark-image", K.value]),
|
|
1494
|
+
style: Ae(Q.value)
|
|
1481
1495
|
}, [
|
|
1482
|
-
|
|
1483
|
-
|
|
1496
|
+
W("div", pa, [
|
|
1497
|
+
R.value ? (V(), ee(C(tt), {
|
|
1498
|
+
key: 0,
|
|
1499
|
+
class: "qy-remark-image__prefix-select",
|
|
1500
|
+
"model-value": t.selectValue,
|
|
1501
|
+
options: t.selectOptions,
|
|
1502
|
+
disabled: t.disabled || t.selectDisabled,
|
|
1503
|
+
size: "small",
|
|
1504
|
+
"onUpdate:modelValue": G
|
|
1505
|
+
}, {
|
|
1506
|
+
default: S(() => [
|
|
1507
|
+
(V(!0), H(Be, null, Ue(t.selectOptions, (l) => (V(), ee(C(lt), {
|
|
1508
|
+
key: String(l.value),
|
|
1509
|
+
label: l.label,
|
|
1510
|
+
value: l.value,
|
|
1511
|
+
disabled: l.disabled
|
|
1512
|
+
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
1513
|
+
]),
|
|
1514
|
+
_: 1
|
|
1515
|
+
}, 8, ["model-value", "options", "disabled"])) : X("", !0),
|
|
1516
|
+
R.value ? (V(), H("span", ya)) : X("", !0),
|
|
1517
|
+
J(C(Me), ie({
|
|
1484
1518
|
ref_key: "inputRef",
|
|
1485
1519
|
ref: u,
|
|
1486
1520
|
"model-value": c.value,
|
|
1487
|
-
type:
|
|
1521
|
+
type: I.value,
|
|
1488
1522
|
rows: t.rows,
|
|
1489
1523
|
autosize: t.autosize,
|
|
1490
1524
|
disabled: t.disabled,
|
|
1491
1525
|
placeholder: t.placeholder
|
|
1492
|
-
}, C(
|
|
1493
|
-
"onUpdate:modelValue":
|
|
1494
|
-
onBlur:
|
|
1526
|
+
}, C(A), {
|
|
1527
|
+
"onUpdate:modelValue": P,
|
|
1528
|
+
onBlur: k
|
|
1495
1529
|
}), null, 16, ["model-value", "type", "rows", "autosize", "disabled", "placeholder"]),
|
|
1496
|
-
|
|
1530
|
+
J(C(yl), {
|
|
1497
1531
|
placement: "top-start",
|
|
1498
1532
|
width: 400,
|
|
1499
1533
|
trigger: "hover",
|
|
1500
1534
|
disabled: !f.value
|
|
1501
1535
|
}, {
|
|
1502
1536
|
reference: S(() => [
|
|
1503
|
-
|
|
1504
|
-
|
|
1537
|
+
W("div", ga, [
|
|
1538
|
+
J(C(gl), {
|
|
1505
1539
|
disabled: B.value || t.disabled,
|
|
1506
1540
|
class: "qy-remark-image__upload",
|
|
1507
1541
|
"show-file-list": !1,
|
|
1508
|
-
"http-request":
|
|
1542
|
+
"http-request": i
|
|
1509
1543
|
}, {
|
|
1510
1544
|
default: S(() => [
|
|
1511
|
-
B.value ? (V(),
|
|
1545
|
+
B.value ? (V(), H("span", ha)) : f.value ? (V(), H("span", ba)) : (V(), H("span", va))
|
|
1512
1546
|
]),
|
|
1513
1547
|
_: 1
|
|
1514
1548
|
}, 8, ["disabled"])
|
|
1515
1549
|
])
|
|
1516
1550
|
]),
|
|
1517
1551
|
default: S(() => [
|
|
1518
|
-
|
|
1519
|
-
|
|
1552
|
+
W("div", wa, [
|
|
1553
|
+
W("img", {
|
|
1520
1554
|
src: f.value,
|
|
1521
1555
|
class: "qy-remark-image__preview-img"
|
|
1522
|
-
}, null, 8,
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1556
|
+
}, null, 8, ka),
|
|
1557
|
+
W("div", Sa, [
|
|
1558
|
+
D[1] || (D[1] = W("span", { class: "qy-remark-image__popover-tip" }, "再次点击按钮可更换图片", -1)),
|
|
1559
|
+
J(C(ke), {
|
|
1526
1560
|
link: "",
|
|
1527
1561
|
size: "small",
|
|
1528
1562
|
type: "danger",
|
|
1529
1563
|
disabled: t.disabled,
|
|
1530
|
-
onClick:
|
|
1564
|
+
onClick: E
|
|
1531
1565
|
}, {
|
|
1532
|
-
default: S(() => [...
|
|
1566
|
+
default: S(() => [...D[0] || (D[0] = [
|
|
1533
1567
|
me(" 删除图片 ", -1)
|
|
1534
1568
|
])]),
|
|
1535
1569
|
_: 1
|
|
@@ -1540,9 +1574,9 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1540
1574
|
_: 1
|
|
1541
1575
|
}, 8, ["disabled"])
|
|
1542
1576
|
])
|
|
1543
|
-
],
|
|
1577
|
+
], 6));
|
|
1544
1578
|
}
|
|
1545
|
-
}),
|
|
1579
|
+
}), xa = /* @__PURE__ */ ze(Va, [["__scopeId", "data-v-3158c066"]]), Ca = /* @__PURE__ */ se({
|
|
1546
1580
|
name: "QyInput",
|
|
1547
1581
|
inheritAttrs: !1,
|
|
1548
1582
|
__name: "index",
|
|
@@ -1553,7 +1587,7 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1553
1587
|
},
|
|
1554
1588
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "enter"],
|
|
1555
1589
|
setup(t, { expose: b, emit: w }) {
|
|
1556
|
-
const e = t, a = w,
|
|
1590
|
+
const e = t, a = w, A = pe(), u = U(null), c = U(B(e.modelValue)), f = F(() => B(e.modelValue));
|
|
1557
1591
|
re(
|
|
1558
1592
|
() => e.modelValue,
|
|
1559
1593
|
(n) => {
|
|
@@ -1563,35 +1597,35 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1563
1597
|
function B(n) {
|
|
1564
1598
|
return n == null ? "" : String(n);
|
|
1565
1599
|
}
|
|
1566
|
-
function
|
|
1600
|
+
function R(n) {
|
|
1567
1601
|
return e.removeSpace ? n.replace(/\s+/g, "") : n;
|
|
1568
1602
|
}
|
|
1569
|
-
function
|
|
1570
|
-
return e.trimMode !==
|
|
1603
|
+
function K(n, M) {
|
|
1604
|
+
return e.trimMode !== M ? n : n.trim();
|
|
1571
1605
|
}
|
|
1572
|
-
function
|
|
1573
|
-
return
|
|
1606
|
+
function I(n) {
|
|
1607
|
+
return R(B(n));
|
|
1574
1608
|
}
|
|
1575
|
-
function
|
|
1609
|
+
function Q(n) {
|
|
1576
1610
|
c.value = n, a("update:modelValue", n);
|
|
1577
1611
|
}
|
|
1578
1612
|
function h(n) {
|
|
1579
|
-
const
|
|
1580
|
-
|
|
1613
|
+
const M = I(n);
|
|
1614
|
+
Q(M);
|
|
1581
1615
|
}
|
|
1582
|
-
function
|
|
1616
|
+
function j(n) {
|
|
1583
1617
|
c.value = B(n), a("input", B(n));
|
|
1584
1618
|
}
|
|
1585
|
-
function
|
|
1586
|
-
const
|
|
1587
|
-
|
|
1619
|
+
function P(n) {
|
|
1620
|
+
const M = K(I(n), "change");
|
|
1621
|
+
M !== B(e.modelValue) && Q(M), a("change", M);
|
|
1588
1622
|
}
|
|
1589
|
-
function
|
|
1623
|
+
function G(n) {
|
|
1590
1624
|
a("focus", n);
|
|
1591
1625
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const
|
|
1594
|
-
|
|
1626
|
+
function E(n) {
|
|
1627
|
+
const M = K(c.value, "blur");
|
|
1628
|
+
M !== B(e.modelValue) && Q(M), a("blur", n);
|
|
1595
1629
|
}
|
|
1596
1630
|
function d() {
|
|
1597
1631
|
c.value = "", a("update:modelValue", ""), a("clear");
|
|
@@ -1600,26 +1634,26 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1600
1634
|
a("enter", n);
|
|
1601
1635
|
}
|
|
1602
1636
|
function i() {
|
|
1603
|
-
var n,
|
|
1604
|
-
(
|
|
1637
|
+
var n, M;
|
|
1638
|
+
(M = (n = u.value) == null ? void 0 : n.focus) == null || M.call(n);
|
|
1605
1639
|
}
|
|
1606
|
-
function
|
|
1607
|
-
var n,
|
|
1608
|
-
(
|
|
1640
|
+
function Z() {
|
|
1641
|
+
var n, M;
|
|
1642
|
+
(M = (n = u.value) == null ? void 0 : n.blur) == null || M.call(n);
|
|
1643
|
+
}
|
|
1644
|
+
function Y() {
|
|
1645
|
+
var n, M;
|
|
1646
|
+
(M = (n = u.value) == null ? void 0 : n.select) == null || M.call(n);
|
|
1609
1647
|
}
|
|
1610
|
-
function
|
|
1611
|
-
var n,
|
|
1612
|
-
(
|
|
1648
|
+
function k() {
|
|
1649
|
+
var n, M;
|
|
1650
|
+
(M = (n = u.value) == null ? void 0 : n.clear) == null || M.call(n);
|
|
1613
1651
|
}
|
|
1614
1652
|
function v() {
|
|
1615
|
-
var n,
|
|
1616
|
-
(
|
|
1653
|
+
var n, M;
|
|
1654
|
+
(M = (n = u.value) == null ? void 0 : n.resizeTextarea) == null || M.call(n);
|
|
1617
1655
|
}
|
|
1618
1656
|
function D() {
|
|
1619
|
-
var n, U;
|
|
1620
|
-
(U = (n = u.value) == null ? void 0 : n.resizeTextarea) == null || U.call(n);
|
|
1621
|
-
}
|
|
1622
|
-
function _() {
|
|
1623
1657
|
var n;
|
|
1624
1658
|
return ((n = u.value) == null ? void 0 : n.input) || null;
|
|
1625
1659
|
}
|
|
@@ -1630,56 +1664,56 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1630
1664
|
return b({
|
|
1631
1665
|
// 暴露 Element Plus 常用输入框方法,方便业务弹窗做聚焦、选中和 textarea 重算高度。
|
|
1632
1666
|
focus: i,
|
|
1633
|
-
blur:
|
|
1634
|
-
select:
|
|
1635
|
-
clear:
|
|
1636
|
-
resizeTextarea:
|
|
1637
|
-
getNativeInput:
|
|
1667
|
+
blur: Z,
|
|
1668
|
+
select: Y,
|
|
1669
|
+
clear: k,
|
|
1670
|
+
resizeTextarea: v,
|
|
1671
|
+
getNativeInput: D,
|
|
1638
1672
|
getTextarea: l
|
|
1639
|
-
}), (n,
|
|
1673
|
+
}), (n, M) => (V(), ee(C(Me), ie({
|
|
1640
1674
|
ref_key: "inputRef",
|
|
1641
1675
|
ref: u
|
|
1642
|
-
}, C(
|
|
1676
|
+
}, C(A), {
|
|
1643
1677
|
"model-value": f.value,
|
|
1644
1678
|
"onUpdate:modelValue": h,
|
|
1645
|
-
onInput:
|
|
1646
|
-
onChange:
|
|
1647
|
-
onFocus:
|
|
1648
|
-
onBlur:
|
|
1679
|
+
onInput: j,
|
|
1680
|
+
onChange: P,
|
|
1681
|
+
onFocus: G,
|
|
1682
|
+
onBlur: E,
|
|
1649
1683
|
onClear: d,
|
|
1650
|
-
onKeydown:
|
|
1684
|
+
onKeydown: Ke(x, ["enter"])
|
|
1651
1685
|
}), Re({ _: 2 }, [
|
|
1652
1686
|
n.$slots.prefix ? {
|
|
1653
1687
|
name: "prefix",
|
|
1654
1688
|
fn: S(() => [
|
|
1655
|
-
|
|
1689
|
+
O(n.$slots, "prefix")
|
|
1656
1690
|
]),
|
|
1657
1691
|
key: "0"
|
|
1658
1692
|
} : void 0,
|
|
1659
1693
|
n.$slots.suffix ? {
|
|
1660
1694
|
name: "suffix",
|
|
1661
1695
|
fn: S(() => [
|
|
1662
|
-
|
|
1696
|
+
O(n.$slots, "suffix")
|
|
1663
1697
|
]),
|
|
1664
1698
|
key: "1"
|
|
1665
1699
|
} : void 0,
|
|
1666
1700
|
n.$slots.prepend ? {
|
|
1667
1701
|
name: "prepend",
|
|
1668
1702
|
fn: S(() => [
|
|
1669
|
-
|
|
1703
|
+
O(n.$slots, "prepend")
|
|
1670
1704
|
]),
|
|
1671
1705
|
key: "2"
|
|
1672
1706
|
} : void 0,
|
|
1673
1707
|
n.$slots.append ? {
|
|
1674
1708
|
name: "append",
|
|
1675
1709
|
fn: S(() => [
|
|
1676
|
-
|
|
1710
|
+
O(n.$slots, "append")
|
|
1677
1711
|
]),
|
|
1678
1712
|
key: "3"
|
|
1679
1713
|
} : void 0
|
|
1680
1714
|
]), 1040, ["model-value"]));
|
|
1681
1715
|
}
|
|
1682
|
-
}),
|
|
1716
|
+
}), $a = /* @__PURE__ */ se({
|
|
1683
1717
|
name: "QyInputNumber",
|
|
1684
1718
|
inheritAttrs: !1,
|
|
1685
1719
|
__name: "index",
|
|
@@ -1698,33 +1732,33 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1698
1732
|
},
|
|
1699
1733
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1700
1734
|
setup(t, { expose: b, emit: w }) {
|
|
1701
|
-
const e = w, a = pe(),
|
|
1702
|
-
function u(
|
|
1703
|
-
e("update:modelValue",
|
|
1735
|
+
const e = w, a = pe(), A = U(null);
|
|
1736
|
+
function u(I) {
|
|
1737
|
+
e("update:modelValue", I);
|
|
1704
1738
|
}
|
|
1705
|
-
function c(
|
|
1706
|
-
e("change",
|
|
1739
|
+
function c(I, Q) {
|
|
1740
|
+
e("change", I, Q);
|
|
1707
1741
|
}
|
|
1708
|
-
function f(
|
|
1709
|
-
e("focus",
|
|
1742
|
+
function f(I) {
|
|
1743
|
+
e("focus", I);
|
|
1710
1744
|
}
|
|
1711
|
-
function B(
|
|
1712
|
-
e("blur",
|
|
1745
|
+
function B(I) {
|
|
1746
|
+
e("blur", I);
|
|
1713
1747
|
}
|
|
1714
|
-
function
|
|
1715
|
-
var
|
|
1716
|
-
(
|
|
1748
|
+
function R() {
|
|
1749
|
+
var I, Q;
|
|
1750
|
+
(Q = (I = A.value) == null ? void 0 : I.focus) == null || Q.call(I);
|
|
1717
1751
|
}
|
|
1718
|
-
function
|
|
1719
|
-
var
|
|
1720
|
-
(
|
|
1752
|
+
function K() {
|
|
1753
|
+
var I, Q;
|
|
1754
|
+
(Q = (I = A.value) == null ? void 0 : I.blur) == null || Q.call(I);
|
|
1721
1755
|
}
|
|
1722
1756
|
return b({
|
|
1723
|
-
focus:
|
|
1724
|
-
blur:
|
|
1725
|
-
}), (
|
|
1757
|
+
focus: R,
|
|
1758
|
+
blur: K
|
|
1759
|
+
}), (I, Q) => (V(), ee(C(hl), ie({
|
|
1726
1760
|
ref_key: "inputNumberRef",
|
|
1727
|
-
ref:
|
|
1761
|
+
ref: A
|
|
1728
1762
|
}, C(a), {
|
|
1729
1763
|
"model-value": t.modelValue,
|
|
1730
1764
|
min: t.min,
|
|
@@ -1743,7 +1777,7 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1743
1777
|
onBlur: B
|
|
1744
1778
|
}), null, 16, ["model-value", "min", "max", "step", "step-strictly", "precision", "controls", "controls-position", "placeholder", "disabled", "size"]));
|
|
1745
1779
|
}
|
|
1746
|
-
}),
|
|
1780
|
+
}), Ba = /* @__PURE__ */ se({
|
|
1747
1781
|
name: "QyMoneyInput",
|
|
1748
1782
|
inheritAttrs: !1,
|
|
1749
1783
|
__name: "index",
|
|
@@ -1758,7 +1792,7 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1758
1792
|
},
|
|
1759
1793
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "enter"],
|
|
1760
1794
|
setup(t, { expose: b, emit: w }) {
|
|
1761
|
-
const e = t, a = w,
|
|
1795
|
+
const e = t, a = w, A = pe(), u = U(null), c = U(B(e.modelValue)), f = F(() => B(e.modelValue));
|
|
1762
1796
|
re(
|
|
1763
1797
|
() => e.modelValue,
|
|
1764
1798
|
(l) => {
|
|
@@ -1768,65 +1802,65 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1768
1802
|
function B(l) {
|
|
1769
1803
|
return l == null ? "" : String(l);
|
|
1770
1804
|
}
|
|
1771
|
-
function
|
|
1805
|
+
function R(l) {
|
|
1772
1806
|
return Number.isFinite(l) ? Math.max(0, Math.floor(l)) : 2;
|
|
1773
1807
|
}
|
|
1774
|
-
function
|
|
1808
|
+
function K(l) {
|
|
1775
1809
|
const n = B(l);
|
|
1776
|
-
let
|
|
1777
|
-
const $ =
|
|
1778
|
-
for (let
|
|
1779
|
-
const
|
|
1780
|
-
if (
|
|
1781
|
-
|
|
1810
|
+
let M = "", le = !1, y = !1;
|
|
1811
|
+
const $ = R(e.precision);
|
|
1812
|
+
for (let N = 0; N < n.length; N += 1) {
|
|
1813
|
+
const z = n[N];
|
|
1814
|
+
if (z >= "0" && z <= "9") {
|
|
1815
|
+
M += z;
|
|
1782
1816
|
continue;
|
|
1783
1817
|
}
|
|
1784
|
-
if (
|
|
1785
|
-
|
|
1818
|
+
if (z === "." && $ > 0 && !le) {
|
|
1819
|
+
M += z, le = !0;
|
|
1786
1820
|
continue;
|
|
1787
1821
|
}
|
|
1788
|
-
|
|
1822
|
+
z === "-" && e.allowNegative && N === 0 && !y && (M += z, y = !0);
|
|
1789
1823
|
}
|
|
1790
1824
|
if ($ > 0 && le) {
|
|
1791
|
-
const [
|
|
1792
|
-
return `${
|
|
1825
|
+
const [N, z = ""] = M.split(".");
|
|
1826
|
+
return `${N}.${z.slice(0, $)}`;
|
|
1793
1827
|
}
|
|
1794
|
-
return
|
|
1828
|
+
return M;
|
|
1795
1829
|
}
|
|
1796
|
-
function
|
|
1830
|
+
function I(l) {
|
|
1797
1831
|
let n = l;
|
|
1798
1832
|
return typeof e.min == "number" && Number.isFinite(e.min) && (n = Math.max(n, e.min)), typeof e.max == "number" && Number.isFinite(e.max) && (n = Math.min(n, e.max)), n;
|
|
1799
1833
|
}
|
|
1800
|
-
function
|
|
1801
|
-
const n =
|
|
1834
|
+
function Q(l) {
|
|
1835
|
+
const n = K(l);
|
|
1802
1836
|
if (!n || n === "-" || n === ".")
|
|
1803
1837
|
return B(e.emptyValue);
|
|
1804
|
-
const
|
|
1805
|
-
if (Number.isNaN(
|
|
1806
|
-
const le =
|
|
1807
|
-
return
|
|
1838
|
+
const M = Number(n);
|
|
1839
|
+
if (Number.isNaN(M)) return B(e.emptyValue);
|
|
1840
|
+
const le = R(e.precision);
|
|
1841
|
+
return I(M).toFixed(le);
|
|
1808
1842
|
}
|
|
1809
1843
|
function h(l) {
|
|
1810
1844
|
c.value = l, a("update:modelValue", l);
|
|
1811
1845
|
}
|
|
1812
|
-
function
|
|
1813
|
-
const n =
|
|
1846
|
+
function j(l) {
|
|
1847
|
+
const n = K(l);
|
|
1814
1848
|
h(n);
|
|
1815
1849
|
}
|
|
1816
|
-
function
|
|
1817
|
-
const n =
|
|
1850
|
+
function P(l) {
|
|
1851
|
+
const n = K(l);
|
|
1818
1852
|
c.value = n, a("input", n);
|
|
1819
1853
|
}
|
|
1820
|
-
function
|
|
1821
|
-
const n = e.formatTrigger === "change" ?
|
|
1854
|
+
function G(l) {
|
|
1855
|
+
const n = e.formatTrigger === "change" ? Q(l) : K(l);
|
|
1822
1856
|
n !== B(e.modelValue) && h(n), a("change", n);
|
|
1823
1857
|
}
|
|
1824
|
-
function
|
|
1858
|
+
function E(l) {
|
|
1825
1859
|
a("focus", l);
|
|
1826
1860
|
}
|
|
1827
1861
|
function d(l) {
|
|
1828
1862
|
if (e.formatTrigger === "blur") {
|
|
1829
|
-
const n =
|
|
1863
|
+
const n = Q(c.value);
|
|
1830
1864
|
n !== B(e.modelValue) && h(n);
|
|
1831
1865
|
}
|
|
1832
1866
|
a("blur", l);
|
|
@@ -1838,77 +1872,77 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1838
1872
|
function i(l) {
|
|
1839
1873
|
a("enter", l);
|
|
1840
1874
|
}
|
|
1841
|
-
function
|
|
1875
|
+
function Z() {
|
|
1842
1876
|
var l, n;
|
|
1843
1877
|
(n = (l = u.value) == null ? void 0 : l.focus) == null || n.call(l);
|
|
1844
1878
|
}
|
|
1845
|
-
function
|
|
1879
|
+
function Y() {
|
|
1846
1880
|
var l, n;
|
|
1847
1881
|
(n = (l = u.value) == null ? void 0 : l.blur) == null || n.call(l);
|
|
1848
1882
|
}
|
|
1849
|
-
function
|
|
1883
|
+
function k() {
|
|
1850
1884
|
var l, n;
|
|
1851
1885
|
(n = (l = u.value) == null ? void 0 : l.select) == null || n.call(l);
|
|
1852
1886
|
}
|
|
1853
|
-
function
|
|
1887
|
+
function v() {
|
|
1854
1888
|
var l, n;
|
|
1855
1889
|
(n = (l = u.value) == null ? void 0 : l.clear) == null || n.call(l);
|
|
1856
1890
|
}
|
|
1857
|
-
function
|
|
1891
|
+
function D() {
|
|
1858
1892
|
var l;
|
|
1859
1893
|
return ((l = u.value) == null ? void 0 : l.input) || null;
|
|
1860
1894
|
}
|
|
1861
1895
|
return b({
|
|
1862
|
-
focus:
|
|
1863
|
-
blur:
|
|
1864
|
-
select:
|
|
1865
|
-
clear:
|
|
1866
|
-
getNativeInput:
|
|
1867
|
-
}), (l, n) => (V(),
|
|
1896
|
+
focus: Z,
|
|
1897
|
+
blur: Y,
|
|
1898
|
+
select: k,
|
|
1899
|
+
clear: v,
|
|
1900
|
+
getNativeInput: D
|
|
1901
|
+
}), (l, n) => (V(), ee(C(Me), ie({
|
|
1868
1902
|
ref_key: "inputRef",
|
|
1869
1903
|
ref: u
|
|
1870
|
-
}, C(
|
|
1904
|
+
}, C(A), {
|
|
1871
1905
|
"model-value": f.value,
|
|
1872
1906
|
inputmode: "decimal",
|
|
1873
|
-
"onUpdate:modelValue":
|
|
1874
|
-
onInput:
|
|
1875
|
-
onChange:
|
|
1876
|
-
onFocus:
|
|
1907
|
+
"onUpdate:modelValue": j,
|
|
1908
|
+
onInput: P,
|
|
1909
|
+
onChange: G,
|
|
1910
|
+
onFocus: E,
|
|
1877
1911
|
onBlur: d,
|
|
1878
1912
|
onClear: x,
|
|
1879
|
-
onKeydown:
|
|
1913
|
+
onKeydown: Ke(i, ["enter"])
|
|
1880
1914
|
}), Re({ _: 2 }, [
|
|
1881
1915
|
l.$slots.prefix ? {
|
|
1882
1916
|
name: "prefix",
|
|
1883
1917
|
fn: S(() => [
|
|
1884
|
-
|
|
1918
|
+
O(l.$slots, "prefix")
|
|
1885
1919
|
]),
|
|
1886
1920
|
key: "0"
|
|
1887
1921
|
} : void 0,
|
|
1888
1922
|
l.$slots.suffix ? {
|
|
1889
1923
|
name: "suffix",
|
|
1890
1924
|
fn: S(() => [
|
|
1891
|
-
|
|
1925
|
+
O(l.$slots, "suffix")
|
|
1892
1926
|
]),
|
|
1893
1927
|
key: "1"
|
|
1894
1928
|
} : void 0,
|
|
1895
1929
|
l.$slots.prepend ? {
|
|
1896
1930
|
name: "prepend",
|
|
1897
1931
|
fn: S(() => [
|
|
1898
|
-
|
|
1932
|
+
O(l.$slots, "prepend")
|
|
1899
1933
|
]),
|
|
1900
1934
|
key: "2"
|
|
1901
1935
|
} : void 0,
|
|
1902
1936
|
l.$slots.append ? {
|
|
1903
1937
|
name: "append",
|
|
1904
1938
|
fn: S(() => [
|
|
1905
|
-
|
|
1939
|
+
O(l.$slots, "append")
|
|
1906
1940
|
]),
|
|
1907
1941
|
key: "3"
|
|
1908
1942
|
} : void 0
|
|
1909
1943
|
]), 1040, ["model-value"]));
|
|
1910
1944
|
}
|
|
1911
|
-
}),
|
|
1945
|
+
}), za = /* @__PURE__ */ se({
|
|
1912
1946
|
name: "QyDatePicker",
|
|
1913
1947
|
inheritAttrs: !1,
|
|
1914
1948
|
__name: "index",
|
|
@@ -1934,77 +1968,77 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
1934
1968
|
},
|
|
1935
1969
|
emits: ["update:modelValue", "change", "clear", "calendar-change", "panel-change", "visible-change", "focus", "blur"],
|
|
1936
1970
|
setup(t, { expose: b, emit: w }) {
|
|
1937
|
-
const e = t, a = w,
|
|
1971
|
+
const e = t, a = w, A = pe(), u = U(null), c = F(
|
|
1938
1972
|
() => ["qy-date-picker__popper", e.popperClass].filter(Boolean).join(" ")
|
|
1939
1973
|
);
|
|
1940
|
-
function f(
|
|
1941
|
-
return Array.isArray(
|
|
1974
|
+
function f(k) {
|
|
1975
|
+
return Array.isArray(k);
|
|
1942
1976
|
}
|
|
1943
|
-
function B(
|
|
1944
|
-
const
|
|
1945
|
-
return
|
|
1977
|
+
function B(k) {
|
|
1978
|
+
const v = new Date(k);
|
|
1979
|
+
return v.getHours() === 0 && v.getMinutes() === 0 && v.getSeconds() === 0 && v.setHours(23, 59, 59, 0), v;
|
|
1946
1980
|
}
|
|
1947
|
-
function
|
|
1948
|
-
return /\s00:00:00$/.test(
|
|
1981
|
+
function R(k) {
|
|
1982
|
+
return /\s00:00:00$/.test(k) ? k.replace(/\s00:00:00$/, " 23:59:59") : /T00:00:00(?:\.000)?(?:Z|[+-]\d{2}:?\d{2})?$/.test(k) ? k.replace(
|
|
1949
1983
|
/T00:00:00(\.000)?(Z|[+-]\d{2}:?\d{2})?$/,
|
|
1950
1984
|
"T23:59:59$1$2"
|
|
1951
|
-
) :
|
|
1985
|
+
) : k;
|
|
1952
1986
|
}
|
|
1953
|
-
function
|
|
1954
|
-
if (!e.normalizeRangeEndTime || !f(
|
|
1955
|
-
return
|
|
1956
|
-
const
|
|
1957
|
-
return
|
|
1987
|
+
function K(k) {
|
|
1988
|
+
if (!e.normalizeRangeEndTime || !f(k) || k.length < 2)
|
|
1989
|
+
return k;
|
|
1990
|
+
const v = [...k], D = v[1];
|
|
1991
|
+
return D instanceof Date ? v[1] = B(D) : typeof D == "string" && (v[1] = R(D)), v;
|
|
1958
1992
|
}
|
|
1959
|
-
function
|
|
1960
|
-
a("update:modelValue",
|
|
1993
|
+
function I(k) {
|
|
1994
|
+
a("update:modelValue", K(k));
|
|
1961
1995
|
}
|
|
1962
|
-
function
|
|
1963
|
-
a("change",
|
|
1996
|
+
function Q(k) {
|
|
1997
|
+
a("change", K(k));
|
|
1964
1998
|
}
|
|
1965
1999
|
function h() {
|
|
1966
2000
|
a("clear");
|
|
1967
2001
|
}
|
|
1968
|
-
function
|
|
1969
|
-
a("calendar-change",
|
|
2002
|
+
function j(k) {
|
|
2003
|
+
a("calendar-change", k);
|
|
1970
2004
|
}
|
|
1971
|
-
function
|
|
1972
|
-
a("panel-change", v, D
|
|
2005
|
+
function P(k, v, D) {
|
|
2006
|
+
a("panel-change", k, v, D);
|
|
1973
2007
|
}
|
|
1974
|
-
function
|
|
1975
|
-
a("visible-change",
|
|
2008
|
+
function G(k) {
|
|
2009
|
+
a("visible-change", k);
|
|
1976
2010
|
}
|
|
1977
|
-
function
|
|
1978
|
-
a("focus",
|
|
2011
|
+
function E(k) {
|
|
2012
|
+
a("focus", k);
|
|
1979
2013
|
}
|
|
1980
|
-
function d(
|
|
1981
|
-
a("blur",
|
|
2014
|
+
function d(k) {
|
|
2015
|
+
a("blur", k);
|
|
1982
2016
|
}
|
|
1983
2017
|
function x() {
|
|
1984
|
-
var
|
|
1985
|
-
(
|
|
2018
|
+
var k, v;
|
|
2019
|
+
(v = (k = u.value) == null ? void 0 : k.focus) == null || v.call(k);
|
|
1986
2020
|
}
|
|
1987
2021
|
function i() {
|
|
1988
|
-
var
|
|
1989
|
-
(
|
|
2022
|
+
var k, v;
|
|
2023
|
+
(v = (k = u.value) == null ? void 0 : k.blur) == null || v.call(k);
|
|
1990
2024
|
}
|
|
1991
|
-
function
|
|
1992
|
-
var
|
|
1993
|
-
(
|
|
2025
|
+
function Z() {
|
|
2026
|
+
var k, v;
|
|
2027
|
+
(v = (k = u.value) == null ? void 0 : k.handleOpen) == null || v.call(k);
|
|
1994
2028
|
}
|
|
1995
|
-
function
|
|
1996
|
-
var
|
|
1997
|
-
(
|
|
2029
|
+
function Y() {
|
|
2030
|
+
var k, v;
|
|
2031
|
+
(v = (k = u.value) == null ? void 0 : k.handleClose) == null || v.call(k);
|
|
1998
2032
|
}
|
|
1999
2033
|
return b({
|
|
2000
2034
|
focus: x,
|
|
2001
2035
|
blur: i,
|
|
2002
|
-
handleOpen:
|
|
2003
|
-
handleClose:
|
|
2004
|
-
}), (
|
|
2036
|
+
handleOpen: Z,
|
|
2037
|
+
handleClose: Y
|
|
2038
|
+
}), (k, v) => (V(), ee(C(vl), ie({
|
|
2005
2039
|
ref_key: "datePickerRef",
|
|
2006
2040
|
ref: u
|
|
2007
|
-
}, C(
|
|
2041
|
+
}, C(A), {
|
|
2008
2042
|
"model-value": t.modelValue,
|
|
2009
2043
|
type: t.type,
|
|
2010
2044
|
placeholder: t.placeholder,
|
|
@@ -2022,17 +2056,17 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2022
2056
|
teleported: t.teleported,
|
|
2023
2057
|
"append-to": t.appendTo,
|
|
2024
2058
|
"popper-class": c.value,
|
|
2025
|
-
"onUpdate:modelValue":
|
|
2026
|
-
onChange:
|
|
2059
|
+
"onUpdate:modelValue": I,
|
|
2060
|
+
onChange: Q,
|
|
2027
2061
|
onClear: h,
|
|
2028
|
-
onCalendarChange:
|
|
2029
|
-
onPanelChange:
|
|
2030
|
-
onVisibleChange:
|
|
2031
|
-
onFocus:
|
|
2062
|
+
onCalendarChange: j,
|
|
2063
|
+
onPanelChange: P,
|
|
2064
|
+
onVisibleChange: G,
|
|
2065
|
+
onFocus: E,
|
|
2032
2066
|
onBlur: d
|
|
2033
2067
|
}), null, 16, ["model-value", "type", "placeholder", "start-placeholder", "end-placeholder", "range-separator", "format", "value-format", "default-time", "disabled-date", "shortcuts", "clearable", "disabled", "size", "teleported", "append-to", "popper-class"]));
|
|
2034
2068
|
}
|
|
2035
|
-
}),
|
|
2069
|
+
}), qa = /* @__PURE__ */ se({
|
|
2036
2070
|
name: "QyCheckbox",
|
|
2037
2071
|
inheritAttrs: !1,
|
|
2038
2072
|
__name: "index",
|
|
@@ -2045,31 +2079,31 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2045
2079
|
},
|
|
2046
2080
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
2047
2081
|
setup(t, { expose: b, emit: w }) {
|
|
2048
|
-
const e = t, a = w,
|
|
2082
|
+
const e = t, a = w, A = pe(), u = U(null), c = F(() => typeof e.trueValue == "boolean" && typeof e.falseValue == "boolean" ? {} : {
|
|
2049
2083
|
trueValue: e.trueValue,
|
|
2050
2084
|
falseValue: e.falseValue
|
|
2051
|
-
}), f =
|
|
2052
|
-
...
|
|
2085
|
+
}), f = F(() => ({
|
|
2086
|
+
...A,
|
|
2053
2087
|
...c.value
|
|
2054
2088
|
}));
|
|
2055
2089
|
function B(h) {
|
|
2056
2090
|
a("update:modelValue", h);
|
|
2057
2091
|
}
|
|
2058
|
-
function
|
|
2092
|
+
function R(h) {
|
|
2059
2093
|
a("change", h);
|
|
2060
2094
|
}
|
|
2061
|
-
function
|
|
2095
|
+
function K(h) {
|
|
2062
2096
|
a("focus", h);
|
|
2063
2097
|
}
|
|
2064
|
-
function
|
|
2098
|
+
function I(h) {
|
|
2065
2099
|
a("blur", h);
|
|
2066
2100
|
}
|
|
2067
|
-
function
|
|
2101
|
+
function Q() {
|
|
2068
2102
|
return u.value;
|
|
2069
2103
|
}
|
|
2070
2104
|
return b({
|
|
2071
|
-
getCheckboxInstance:
|
|
2072
|
-
}), (h,
|
|
2105
|
+
getCheckboxInstance: Q
|
|
2106
|
+
}), (h, j) => (V(), ee(C(bl), ie({
|
|
2073
2107
|
ref_key: "checkboxRef",
|
|
2074
2108
|
ref: u
|
|
2075
2109
|
}, f.value, {
|
|
@@ -2077,17 +2111,17 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2077
2111
|
disabled: t.disabled,
|
|
2078
2112
|
size: t.size,
|
|
2079
2113
|
"onUpdate:modelValue": B,
|
|
2080
|
-
onChange:
|
|
2081
|
-
onFocus:
|
|
2082
|
-
onBlur:
|
|
2114
|
+
onChange: R,
|
|
2115
|
+
onFocus: K,
|
|
2116
|
+
onBlur: I
|
|
2083
2117
|
}), {
|
|
2084
2118
|
default: S(() => [
|
|
2085
|
-
|
|
2119
|
+
O(h.$slots, "default")
|
|
2086
2120
|
]),
|
|
2087
2121
|
_: 3
|
|
2088
2122
|
}, 16, ["model-value", "disabled", "size"]));
|
|
2089
2123
|
}
|
|
2090
|
-
}),
|
|
2124
|
+
}), Ia = /* @__PURE__ */ se({
|
|
2091
2125
|
name: "QyAutocomplete",
|
|
2092
2126
|
inheritAttrs: !1,
|
|
2093
2127
|
__name: "index",
|
|
@@ -2107,9 +2141,9 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2107
2141
|
},
|
|
2108
2142
|
emits: ["update:modelValue", "input", "change", "select", "focus", "blur", "clear"],
|
|
2109
2143
|
setup(t, { expose: b, emit: w }) {
|
|
2110
|
-
const e = t, a = w,
|
|
2144
|
+
const e = t, a = w, A = pe(), u = U(null), c = F(
|
|
2111
2145
|
() => ["qy-autocomplete__popper", e.popperClass].filter(Boolean).join(" ")
|
|
2112
|
-
), f =
|
|
2146
|
+
), f = F(() => {
|
|
2113
2147
|
const d = C(e.options);
|
|
2114
2148
|
return (Array.isArray(d) ? d : C(d == null ? void 0 : d.value) || []).map((i) => ({
|
|
2115
2149
|
...i,
|
|
@@ -2117,46 +2151,46 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2117
2151
|
}));
|
|
2118
2152
|
});
|
|
2119
2153
|
function B(d, x) {
|
|
2120
|
-
const i = String(d ?? ""),
|
|
2121
|
-
x(
|
|
2154
|
+
const i = String(d ?? ""), Z = f.value.filter((Y) => e.filterMethod ? e.filterMethod(i, Y) : i ? String(Y.value ?? "").includes(i) : !0);
|
|
2155
|
+
x(Z);
|
|
2122
2156
|
}
|
|
2123
|
-
function
|
|
2157
|
+
function R(d) {
|
|
2124
2158
|
a("update:modelValue", d);
|
|
2125
2159
|
}
|
|
2126
|
-
function
|
|
2160
|
+
function K(d) {
|
|
2127
2161
|
a("input", d);
|
|
2128
2162
|
}
|
|
2129
|
-
function
|
|
2163
|
+
function I(d) {
|
|
2130
2164
|
a("change", d);
|
|
2131
2165
|
}
|
|
2132
|
-
function
|
|
2166
|
+
function Q(d) {
|
|
2133
2167
|
a("select", d);
|
|
2134
2168
|
}
|
|
2135
2169
|
function h(d) {
|
|
2136
2170
|
a("focus", d);
|
|
2137
2171
|
}
|
|
2138
|
-
function
|
|
2172
|
+
function j(d) {
|
|
2139
2173
|
a("blur", d);
|
|
2140
2174
|
}
|
|
2141
|
-
function
|
|
2175
|
+
function P() {
|
|
2142
2176
|
a("clear");
|
|
2143
2177
|
}
|
|
2144
|
-
function
|
|
2178
|
+
function G() {
|
|
2145
2179
|
var d, x;
|
|
2146
2180
|
(x = (d = u.value) == null ? void 0 : d.focus) == null || x.call(d);
|
|
2147
2181
|
}
|
|
2148
|
-
function
|
|
2182
|
+
function E() {
|
|
2149
2183
|
var d, x;
|
|
2150
2184
|
(x = (d = u.value) == null ? void 0 : d.blur) == null || x.call(d);
|
|
2151
2185
|
}
|
|
2152
2186
|
return b({
|
|
2153
2187
|
querySearch: B,
|
|
2154
|
-
focus:
|
|
2155
|
-
blur:
|
|
2156
|
-
}), (d, x) => (V(),
|
|
2188
|
+
focus: G,
|
|
2189
|
+
blur: E
|
|
2190
|
+
}), (d, x) => (V(), ee(C(bt), ie({
|
|
2157
2191
|
ref_key: "autocompleteRef",
|
|
2158
2192
|
ref: u
|
|
2159
|
-
}, C(
|
|
2193
|
+
}, C(A), {
|
|
2160
2194
|
"model-value": t.modelValue,
|
|
2161
2195
|
"fetch-suggestions": B,
|
|
2162
2196
|
placeholder: t.placeholder,
|
|
@@ -2166,16 +2200,16 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2166
2200
|
teleported: t.teleported,
|
|
2167
2201
|
"append-to": t.appendTo,
|
|
2168
2202
|
"popper-class": c.value,
|
|
2169
|
-
"onUpdate:modelValue":
|
|
2170
|
-
onInput:
|
|
2171
|
-
onChange:
|
|
2172
|
-
onSelect:
|
|
2203
|
+
"onUpdate:modelValue": R,
|
|
2204
|
+
onInput: K,
|
|
2205
|
+
onChange: I,
|
|
2206
|
+
onSelect: Q,
|
|
2173
2207
|
onFocus: h,
|
|
2174
|
-
onBlur:
|
|
2175
|
-
onClear:
|
|
2208
|
+
onBlur: j,
|
|
2209
|
+
onClear: P
|
|
2176
2210
|
}), null, 16, ["model-value", "placeholder", "disabled", "clearable", "size", "teleported", "append-to", "popper-class"]));
|
|
2177
2211
|
}
|
|
2178
|
-
}),
|
|
2212
|
+
}), Ra = /* @__PURE__ */ se({
|
|
2179
2213
|
name: "QyRadioGroup",
|
|
2180
2214
|
inheritAttrs: !1,
|
|
2181
2215
|
__name: "index",
|
|
@@ -2193,9 +2227,9 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2193
2227
|
},
|
|
2194
2228
|
emits: ["update:modelValue", "change"],
|
|
2195
2229
|
setup(t, { expose: b, emit: w }) {
|
|
2196
|
-
const e = t, a = w,
|
|
2230
|
+
const e = t, a = w, A = pe(), u = U(null), c = F(
|
|
2197
2231
|
() => e.type === "button" ? wl : kl
|
|
2198
|
-
), f =
|
|
2232
|
+
), f = F(
|
|
2199
2233
|
() => (e.options || []).map((h) => ({
|
|
2200
2234
|
raw: h,
|
|
2201
2235
|
label: (h == null ? void 0 : h[e.labelKey]) ?? (h == null ? void 0 : h.label) ?? (h == null ? void 0 : h.value) ?? "",
|
|
@@ -2204,53 +2238,53 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2204
2238
|
}))
|
|
2205
2239
|
);
|
|
2206
2240
|
function B(h) {
|
|
2207
|
-
const
|
|
2241
|
+
const j = {
|
|
2208
2242
|
value: h.value,
|
|
2209
2243
|
label: h.value,
|
|
2210
2244
|
disabled: h.disabled
|
|
2211
2245
|
};
|
|
2212
|
-
return e.type === "button" ?
|
|
2213
|
-
...
|
|
2246
|
+
return e.type === "button" ? j : {
|
|
2247
|
+
...j,
|
|
2214
2248
|
border: e.border
|
|
2215
2249
|
};
|
|
2216
2250
|
}
|
|
2217
|
-
function
|
|
2218
|
-
return `${String(h.value ?? h.label ?? "")}-${
|
|
2251
|
+
function R(h, j) {
|
|
2252
|
+
return `${String(h.value ?? h.label ?? "")}-${j}`;
|
|
2219
2253
|
}
|
|
2220
|
-
function
|
|
2254
|
+
function K(h) {
|
|
2221
2255
|
a("update:modelValue", h);
|
|
2222
2256
|
}
|
|
2223
|
-
function
|
|
2257
|
+
function I(h) {
|
|
2224
2258
|
a("change", h);
|
|
2225
2259
|
}
|
|
2226
|
-
function
|
|
2260
|
+
function Q() {
|
|
2227
2261
|
return u.value;
|
|
2228
2262
|
}
|
|
2229
2263
|
return b({
|
|
2230
|
-
getRadioGroupInstance:
|
|
2231
|
-
}), (h,
|
|
2264
|
+
getRadioGroupInstance: Q
|
|
2265
|
+
}), (h, j) => (V(), ee(C(Sl), ie({
|
|
2232
2266
|
ref_key: "radioGroupRef",
|
|
2233
2267
|
ref: u
|
|
2234
|
-
}, C(
|
|
2268
|
+
}, C(A), {
|
|
2235
2269
|
"model-value": t.modelValue,
|
|
2236
2270
|
disabled: t.disabled,
|
|
2237
2271
|
size: t.size,
|
|
2238
2272
|
name: t.name,
|
|
2239
|
-
"onUpdate:modelValue":
|
|
2240
|
-
onChange:
|
|
2273
|
+
"onUpdate:modelValue": K,
|
|
2274
|
+
onChange: I
|
|
2241
2275
|
}), {
|
|
2242
2276
|
default: S(() => [
|
|
2243
|
-
h.$slots.default ?
|
|
2244
|
-
key:
|
|
2245
|
-
}, { ref_for: !0 }, B(
|
|
2277
|
+
h.$slots.default ? O(h.$slots, "default", { key: 0 }) : (V(!0), H(Be, { key: 1 }, Ue(f.value, (P, G) => (V(), ee(il(c.value), ie({
|
|
2278
|
+
key: R(P, G)
|
|
2279
|
+
}, { ref_for: !0 }, B(P)), {
|
|
2246
2280
|
default: S(() => [
|
|
2247
|
-
|
|
2248
|
-
option:
|
|
2249
|
-
label:
|
|
2250
|
-
value:
|
|
2251
|
-
disabled:
|
|
2281
|
+
O(h.$slots, "option", {
|
|
2282
|
+
option: P.raw,
|
|
2283
|
+
label: P.label,
|
|
2284
|
+
value: P.value,
|
|
2285
|
+
disabled: P.disabled
|
|
2252
2286
|
}, () => [
|
|
2253
|
-
me(fe(
|
|
2287
|
+
me(fe(P.label), 1)
|
|
2254
2288
|
])
|
|
2255
2289
|
]),
|
|
2256
2290
|
_: 2
|
|
@@ -2259,7 +2293,7 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2259
2293
|
_: 3
|
|
2260
2294
|
}, 16, ["model-value", "disabled", "size", "name"]));
|
|
2261
2295
|
}
|
|
2262
|
-
}),
|
|
2296
|
+
}), at = /* @__PURE__ */ se({
|
|
2263
2297
|
name: "QySelect",
|
|
2264
2298
|
inheritAttrs: !1,
|
|
2265
2299
|
__name: "index",
|
|
@@ -2285,20 +2319,20 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2285
2319
|
},
|
|
2286
2320
|
emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur"],
|
|
2287
2321
|
setup(t, { expose: b, emit: w }) {
|
|
2288
|
-
const e = t, a = w,
|
|
2322
|
+
const e = t, a = w, A = pe(), u = _e(), c = U(null), f = F(
|
|
2289
2323
|
() => ["qy-select__popper", e.popperClass].filter(Boolean).join(" ")
|
|
2290
|
-
), B =
|
|
2324
|
+
), B = F(
|
|
2291
2325
|
() => (e.options || []).map((i) => ({
|
|
2292
2326
|
raw: i,
|
|
2293
2327
|
label: (i == null ? void 0 : i[e.labelKey]) ?? (i == null ? void 0 : i.label) ?? (i == null ? void 0 : i.value) ?? "",
|
|
2294
2328
|
value: (i == null ? void 0 : i[e.valueKey]) ?? (i == null ? void 0 : i.value) ?? (i == null ? void 0 : i.label),
|
|
2295
2329
|
disabled: !!(i != null && i[e.disabledKey])
|
|
2296
2330
|
}))
|
|
2297
|
-
),
|
|
2331
|
+
), R = F(() => {
|
|
2298
2332
|
const i = u.default;
|
|
2299
|
-
return i ? i().some((
|
|
2333
|
+
return i ? i().some((Z) => Z.type !== sl) : !1;
|
|
2300
2334
|
});
|
|
2301
|
-
function
|
|
2335
|
+
function K(i) {
|
|
2302
2336
|
return Array.isArray(i) ? i.length === 0 : i === "" || i === null || i === void 0;
|
|
2303
2337
|
}
|
|
2304
2338
|
re(
|
|
@@ -2310,51 +2344,51 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2310
2344
|
() => e.multiple
|
|
2311
2345
|
],
|
|
2312
2346
|
([i]) => {
|
|
2313
|
-
if (!e.autoSelectSingle || e.disabled || !
|
|
2314
|
-
const [
|
|
2315
|
-
if (
|
|
2316
|
-
const
|
|
2317
|
-
a("update:modelValue",
|
|
2347
|
+
if (!e.autoSelectSingle || e.disabled || !K(e.modelValue) || i.length !== 1) return;
|
|
2348
|
+
const [Z] = i;
|
|
2349
|
+
if (Z.disabled) return;
|
|
2350
|
+
const Y = e.multiple ? [Z.value] : Z.value;
|
|
2351
|
+
a("update:modelValue", Y), a("change", Y);
|
|
2318
2352
|
},
|
|
2319
2353
|
{ immediate: !0 }
|
|
2320
2354
|
);
|
|
2321
|
-
function
|
|
2322
|
-
return `${String(i.value ?? i.label ?? "")}-${
|
|
2355
|
+
function I(i, Z) {
|
|
2356
|
+
return `${String(i.value ?? i.label ?? "")}-${Z}`;
|
|
2323
2357
|
}
|
|
2324
|
-
function
|
|
2358
|
+
function Q(i) {
|
|
2325
2359
|
a("update:modelValue", i);
|
|
2326
2360
|
}
|
|
2327
2361
|
function h(i) {
|
|
2328
2362
|
a("change", i);
|
|
2329
2363
|
}
|
|
2330
|
-
function
|
|
2364
|
+
function j() {
|
|
2331
2365
|
a("clear");
|
|
2332
2366
|
}
|
|
2333
|
-
function
|
|
2367
|
+
function P(i) {
|
|
2334
2368
|
a("visible-change", i);
|
|
2335
2369
|
}
|
|
2336
|
-
function
|
|
2370
|
+
function G(i) {
|
|
2337
2371
|
a("focus", i);
|
|
2338
2372
|
}
|
|
2339
|
-
function
|
|
2373
|
+
function E(i) {
|
|
2340
2374
|
a("blur", i);
|
|
2341
2375
|
}
|
|
2342
2376
|
function d() {
|
|
2343
|
-
var i,
|
|
2344
|
-
(
|
|
2377
|
+
var i, Z;
|
|
2378
|
+
(Z = (i = c.value) == null ? void 0 : i.focus) == null || Z.call(i);
|
|
2345
2379
|
}
|
|
2346
2380
|
function x() {
|
|
2347
|
-
var i,
|
|
2348
|
-
(
|
|
2381
|
+
var i, Z;
|
|
2382
|
+
(Z = (i = c.value) == null ? void 0 : i.blur) == null || Z.call(i);
|
|
2349
2383
|
}
|
|
2350
2384
|
return b({
|
|
2351
2385
|
// 仅暴露业务常用焦点方法,复杂下拉行为仍交给 Element Plus 自身处理。
|
|
2352
2386
|
focus: d,
|
|
2353
2387
|
blur: x
|
|
2354
|
-
}), (i,
|
|
2388
|
+
}), (i, Z) => (V(), ee(C(tt), ie({
|
|
2355
2389
|
ref_key: "selectRef",
|
|
2356
2390
|
ref: c
|
|
2357
|
-
}, C(
|
|
2391
|
+
}, C(A), {
|
|
2358
2392
|
"model-value": t.modelValue,
|
|
2359
2393
|
placeholder: t.placeholder,
|
|
2360
2394
|
disabled: t.disabled,
|
|
@@ -2368,19 +2402,19 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2368
2402
|
"fit-input-width": t.fitInputWidth,
|
|
2369
2403
|
"popper-class": f.value,
|
|
2370
2404
|
"append-to": t.appendTo,
|
|
2371
|
-
"onUpdate:modelValue":
|
|
2405
|
+
"onUpdate:modelValue": Q,
|
|
2372
2406
|
onChange: h,
|
|
2373
|
-
onClear:
|
|
2374
|
-
onVisibleChange:
|
|
2375
|
-
onFocus:
|
|
2376
|
-
onBlur:
|
|
2407
|
+
onClear: j,
|
|
2408
|
+
onVisibleChange: P,
|
|
2409
|
+
onFocus: G,
|
|
2410
|
+
onBlur: E
|
|
2377
2411
|
}), Re({
|
|
2378
2412
|
default: S(() => [
|
|
2379
|
-
|
|
2380
|
-
key:
|
|
2381
|
-
label:
|
|
2382
|
-
value:
|
|
2383
|
-
disabled:
|
|
2413
|
+
R.value ? O(i.$slots, "default", { key: 0 }) : (V(!0), H(Be, { key: 1 }, Ue(B.value, (Y, k) => (V(), ee(C(lt), {
|
|
2414
|
+
key: I(Y, k),
|
|
2415
|
+
label: Y.label,
|
|
2416
|
+
value: Y.value,
|
|
2417
|
+
disabled: Y.disabled
|
|
2384
2418
|
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
2385
2419
|
]),
|
|
2386
2420
|
_: 2
|
|
@@ -2388,34 +2422,34 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2388
2422
|
i.$slots.prefix ? {
|
|
2389
2423
|
name: "prefix",
|
|
2390
2424
|
fn: S(() => [
|
|
2391
|
-
|
|
2425
|
+
O(i.$slots, "prefix")
|
|
2392
2426
|
]),
|
|
2393
2427
|
key: "0"
|
|
2394
2428
|
} : void 0,
|
|
2395
2429
|
i.$slots.empty ? {
|
|
2396
2430
|
name: "empty",
|
|
2397
2431
|
fn: S(() => [
|
|
2398
|
-
|
|
2432
|
+
O(i.$slots, "empty")
|
|
2399
2433
|
]),
|
|
2400
2434
|
key: "1"
|
|
2401
2435
|
} : void 0,
|
|
2402
2436
|
i.$slots.loading ? {
|
|
2403
2437
|
name: "loading",
|
|
2404
2438
|
fn: S(() => [
|
|
2405
|
-
|
|
2439
|
+
O(i.$slots, "loading")
|
|
2406
2440
|
]),
|
|
2407
2441
|
key: "2"
|
|
2408
2442
|
} : void 0,
|
|
2409
2443
|
i.$slots.tag ? {
|
|
2410
2444
|
name: "tag",
|
|
2411
|
-
fn: S((
|
|
2412
|
-
|
|
2445
|
+
fn: S((Y) => [
|
|
2446
|
+
O(i.$slots, "tag", Oe(Qe(Y)))
|
|
2413
2447
|
]),
|
|
2414
2448
|
key: "3"
|
|
2415
2449
|
} : void 0
|
|
2416
2450
|
]), 1040, ["model-value", "placeholder", "disabled", "clearable", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "size", "teleported", "fit-input-width", "popper-class", "append-to"]));
|
|
2417
2451
|
}
|
|
2418
|
-
}),
|
|
2452
|
+
}), Aa = /* @__PURE__ */ se({
|
|
2419
2453
|
name: "QyRemoteSelect",
|
|
2420
2454
|
inheritAttrs: !1,
|
|
2421
2455
|
__name: "index",
|
|
@@ -2447,37 +2481,37 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2447
2481
|
},
|
|
2448
2482
|
emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur", "options-change", "loading-change", "error"],
|
|
2449
2483
|
setup(t, { expose: b, emit: w }) {
|
|
2450
|
-
const e = t, a = w,
|
|
2451
|
-
let
|
|
2452
|
-
const
|
|
2453
|
-
const m = /* @__PURE__ */ new Map(),
|
|
2454
|
-
m.set(
|
|
2484
|
+
const e = t, a = w, A = pe(), u = U(null), c = U([]), f = U(/* @__PURE__ */ new Map()), B = U(!1), R = U("");
|
|
2485
|
+
let K = 0, I = null;
|
|
2486
|
+
const Q = F(() => e.loading || B.value), h = U(!1), j = F(() => {
|
|
2487
|
+
const m = /* @__PURE__ */ new Map(), _ = (ae) => {
|
|
2488
|
+
m.set(P(ae), ae);
|
|
2455
2489
|
};
|
|
2456
|
-
return e.defaultOptions.forEach(
|
|
2490
|
+
return e.defaultOptions.forEach(_), e.reserveSelectedOption && f.value.forEach((ae) => _(ae)), c.value.forEach(_), Array.from(m.values());
|
|
2457
2491
|
});
|
|
2458
2492
|
re(
|
|
2459
2493
|
() => e.defaultOptions,
|
|
2460
2494
|
(m) => {
|
|
2461
|
-
m.forEach(
|
|
2495
|
+
m.forEach(E);
|
|
2462
2496
|
},
|
|
2463
2497
|
{ immediate: !0 }
|
|
2464
2498
|
), re(
|
|
2465
2499
|
() => e.modelValue,
|
|
2466
2500
|
() => {
|
|
2467
|
-
|
|
2501
|
+
j.value.forEach(E);
|
|
2468
2502
|
},
|
|
2469
2503
|
{ immediate: !0 }
|
|
2470
2504
|
);
|
|
2471
|
-
function
|
|
2505
|
+
function P(m) {
|
|
2472
2506
|
return (m == null ? void 0 : m[e.valueKey]) ?? (m == null ? void 0 : m.value) ?? (m == null ? void 0 : m.label);
|
|
2473
2507
|
}
|
|
2474
|
-
function
|
|
2508
|
+
function G(m) {
|
|
2475
2509
|
return Array.isArray(e.modelValue) ? e.modelValue.includes(m) : e.modelValue === m;
|
|
2476
2510
|
}
|
|
2477
|
-
function
|
|
2511
|
+
function E(m) {
|
|
2478
2512
|
if (!e.reserveSelectedOption) return;
|
|
2479
|
-
const
|
|
2480
|
-
|
|
2513
|
+
const _ = P(m);
|
|
2514
|
+
G(_) && f.value.set(_, m);
|
|
2481
2515
|
}
|
|
2482
2516
|
function d(m) {
|
|
2483
2517
|
return e.disabled ? !1 : m ? m.length >= e.minLength : e.remoteOnFocus;
|
|
@@ -2486,81 +2520,81 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2486
2520
|
B.value !== m && (B.value = m, a("loading-change", m));
|
|
2487
2521
|
}
|
|
2488
2522
|
async function i(m) {
|
|
2489
|
-
if (
|
|
2490
|
-
|
|
2523
|
+
if (R.value = m, !d(m)) {
|
|
2524
|
+
K += 1, c.value = [], x(!1), a("options-change", j.value);
|
|
2491
2525
|
return;
|
|
2492
2526
|
}
|
|
2493
|
-
const
|
|
2527
|
+
const _ = ++K;
|
|
2494
2528
|
x(!0);
|
|
2495
2529
|
try {
|
|
2496
2530
|
const ae = await e.fetchMethod(m);
|
|
2497
|
-
if (
|
|
2498
|
-
c.value = Array.isArray(ae) ? ae : [], c.value.forEach(
|
|
2531
|
+
if (_ !== K) return;
|
|
2532
|
+
c.value = Array.isArray(ae) ? ae : [], c.value.forEach(E), a("options-change", j.value);
|
|
2499
2533
|
} catch (ae) {
|
|
2500
|
-
if (
|
|
2501
|
-
c.value = [], a("error", ae), a("options-change",
|
|
2534
|
+
if (_ !== K) return;
|
|
2535
|
+
c.value = [], a("error", ae), a("options-change", j.value);
|
|
2502
2536
|
} finally {
|
|
2503
|
-
|
|
2537
|
+
_ === K && x(!1);
|
|
2504
2538
|
}
|
|
2505
2539
|
}
|
|
2506
|
-
function
|
|
2540
|
+
function Z() {
|
|
2507
2541
|
h.value || (h.value = !0, i(""));
|
|
2508
2542
|
}
|
|
2509
|
-
function
|
|
2510
|
-
|
|
2543
|
+
function Y(m) {
|
|
2544
|
+
I && (clearTimeout(I), I = null), I = setTimeout(() => {
|
|
2511
2545
|
i(m);
|
|
2512
2546
|
}, e.debounce);
|
|
2513
2547
|
}
|
|
2514
|
-
function
|
|
2548
|
+
function k() {
|
|
2515
2549
|
h.value = !0, i("");
|
|
2516
2550
|
}
|
|
2517
|
-
function
|
|
2518
|
-
i(
|
|
2551
|
+
function v() {
|
|
2552
|
+
i(R.value);
|
|
2519
2553
|
}
|
|
2520
|
-
function
|
|
2554
|
+
function D(m) {
|
|
2521
2555
|
a("update:modelValue", m);
|
|
2522
2556
|
}
|
|
2523
2557
|
function l(m) {
|
|
2524
|
-
|
|
2558
|
+
j.value.forEach(E), a("change", m);
|
|
2525
2559
|
}
|
|
2526
2560
|
function n() {
|
|
2527
2561
|
a("clear");
|
|
2528
2562
|
}
|
|
2529
|
-
function
|
|
2530
|
-
m && e.remoteOnFocus && !
|
|
2563
|
+
function M(m) {
|
|
2564
|
+
m && e.remoteOnFocus && !R.value && Z(), a("visible-change", m);
|
|
2531
2565
|
}
|
|
2532
2566
|
function le(m) {
|
|
2533
|
-
e.remoteOnFocus && !
|
|
2567
|
+
e.remoteOnFocus && !R.value && Z(), a("focus", m);
|
|
2534
2568
|
}
|
|
2535
2569
|
function y(m) {
|
|
2536
2570
|
a("blur", m);
|
|
2537
2571
|
}
|
|
2538
2572
|
function $() {
|
|
2539
|
-
var m,
|
|
2540
|
-
(
|
|
2573
|
+
var m, _;
|
|
2574
|
+
(_ = (m = u.value) == null ? void 0 : m.focus) == null || _.call(m);
|
|
2541
2575
|
}
|
|
2542
|
-
function
|
|
2543
|
-
var m,
|
|
2544
|
-
(
|
|
2576
|
+
function N() {
|
|
2577
|
+
var m, _;
|
|
2578
|
+
(_ = (m = u.value) == null ? void 0 : m.blur) == null || _.call(m);
|
|
2545
2579
|
}
|
|
2546
|
-
function
|
|
2580
|
+
function z() {
|
|
2547
2581
|
a("update:modelValue", e.multiple ? [] : ""), a("clear");
|
|
2548
2582
|
}
|
|
2549
2583
|
return Ye(() => {
|
|
2550
|
-
|
|
2584
|
+
I && clearTimeout(I);
|
|
2551
2585
|
}), b({
|
|
2552
2586
|
// 暴露远程选择常用控制方法,供弹窗打开后聚焦或请求失败后重试。
|
|
2553
2587
|
focus: $,
|
|
2554
|
-
blur:
|
|
2555
|
-
clear:
|
|
2556
|
-
retryFetch:
|
|
2557
|
-
fetchDefaultOptions:
|
|
2558
|
-
}), (m,
|
|
2588
|
+
blur: N,
|
|
2589
|
+
clear: z,
|
|
2590
|
+
retryFetch: v,
|
|
2591
|
+
fetchDefaultOptions: k
|
|
2592
|
+
}), (m, _) => (V(), ee(at, ie({
|
|
2559
2593
|
ref_key: "selectRef",
|
|
2560
2594
|
ref: u
|
|
2561
|
-
}, C(
|
|
2595
|
+
}, C(A), {
|
|
2562
2596
|
"model-value": t.modelValue,
|
|
2563
|
-
options:
|
|
2597
|
+
options: j.value,
|
|
2564
2598
|
"label-key": t.labelKey,
|
|
2565
2599
|
"value-key": t.valueKey,
|
|
2566
2600
|
"disabled-key": t.disabledKey,
|
|
@@ -2579,54 +2613,54 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2579
2613
|
"popper-class": t.popperClass,
|
|
2580
2614
|
remote: "",
|
|
2581
2615
|
"remote-show-suffix": t.remoteShowSuffix,
|
|
2582
|
-
"remote-method":
|
|
2583
|
-
loading:
|
|
2584
|
-
"onUpdate:modelValue":
|
|
2616
|
+
"remote-method": Y,
|
|
2617
|
+
loading: Q.value,
|
|
2618
|
+
"onUpdate:modelValue": D,
|
|
2585
2619
|
onChange: l,
|
|
2586
2620
|
onClear: n,
|
|
2587
|
-
onVisibleChange:
|
|
2621
|
+
onVisibleChange: M,
|
|
2588
2622
|
onFocus: le,
|
|
2589
2623
|
onBlur: y
|
|
2590
2624
|
}), Re({
|
|
2591
2625
|
default: S(() => [
|
|
2592
|
-
m.$slots.default ?
|
|
2626
|
+
m.$slots.default ? O(m.$slots, "default", { key: 0 }) : X("", !0)
|
|
2593
2627
|
]),
|
|
2594
2628
|
_: 2
|
|
2595
2629
|
}, [
|
|
2596
2630
|
m.$slots.prefix ? {
|
|
2597
2631
|
name: "prefix",
|
|
2598
2632
|
fn: S(() => [
|
|
2599
|
-
|
|
2633
|
+
O(m.$slots, "prefix")
|
|
2600
2634
|
]),
|
|
2601
2635
|
key: "0"
|
|
2602
2636
|
} : void 0,
|
|
2603
2637
|
m.$slots.empty ? {
|
|
2604
2638
|
name: "empty",
|
|
2605
2639
|
fn: S(() => [
|
|
2606
|
-
|
|
2640
|
+
O(m.$slots, "empty")
|
|
2607
2641
|
]),
|
|
2608
2642
|
key: "1"
|
|
2609
2643
|
} : void 0,
|
|
2610
2644
|
m.$slots.loading ? {
|
|
2611
2645
|
name: "loading",
|
|
2612
2646
|
fn: S(() => [
|
|
2613
|
-
|
|
2647
|
+
O(m.$slots, "loading")
|
|
2614
2648
|
]),
|
|
2615
2649
|
key: "2"
|
|
2616
2650
|
} : void 0,
|
|
2617
2651
|
m.$slots.tag ? {
|
|
2618
2652
|
name: "tag",
|
|
2619
2653
|
fn: S((ae) => [
|
|
2620
|
-
|
|
2654
|
+
O(m.$slots, "tag", Oe(Qe(ae)))
|
|
2621
2655
|
]),
|
|
2622
2656
|
key: "3"
|
|
2623
2657
|
} : void 0
|
|
2624
2658
|
]), 1040, ["model-value", "options", "label-key", "value-key", "disabled-key", "placeholder", "disabled", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "auto-select-single", "size", "teleported", "append-to", "fit-input-width", "popper-class", "remote-show-suffix", "loading"]));
|
|
2625
2659
|
}
|
|
2626
|
-
}),
|
|
2660
|
+
}), Ta = { class: "qy-search-input__item" }, Pa = ["innerHTML"], Ma = {
|
|
2627
2661
|
key: 0,
|
|
2628
2662
|
class: "qy-search-input__item-description"
|
|
2629
|
-
},
|
|
2663
|
+
}, Fa = /* @__PURE__ */ se({
|
|
2630
2664
|
name: "QySearchInput",
|
|
2631
2665
|
inheritAttrs: !1,
|
|
2632
2666
|
__name: "index",
|
|
@@ -2657,50 +2691,50 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2657
2691
|
},
|
|
2658
2692
|
emits: ["update:modelValue", "search", "clear", "input", "change", "focus", "blur", "enter", "select", "visible-change", "suggestions-change", "error"],
|
|
2659
2693
|
setup(t, { expose: b, emit: w }) {
|
|
2660
|
-
const e = t, a = w,
|
|
2694
|
+
const e = t, a = w, A = pe(), u = U(null), c = U(I(e.modelValue)), f = F(() => I(e.modelValue)), B = F(
|
|
2661
2695
|
() => ["qy-search-input__popper", e.popperClass].filter(Boolean).join(" ")
|
|
2662
|
-
),
|
|
2696
|
+
), R = F(() => I(e.modelValue)), K = U("");
|
|
2663
2697
|
re(
|
|
2664
2698
|
() => e.modelValue,
|
|
2665
2699
|
(p) => {
|
|
2666
|
-
c.value =
|
|
2700
|
+
c.value = I(p);
|
|
2667
2701
|
}
|
|
2668
2702
|
);
|
|
2669
|
-
function
|
|
2703
|
+
function I(p) {
|
|
2670
2704
|
return p == null ? "" : String(p);
|
|
2671
2705
|
}
|
|
2672
|
-
function
|
|
2706
|
+
function Q(p) {
|
|
2673
2707
|
return e.removeSpace ? p.replace(/\s+/g, "") : p;
|
|
2674
2708
|
}
|
|
2675
|
-
function h(p,
|
|
2676
|
-
return e.trimMode !==
|
|
2709
|
+
function h(p, L) {
|
|
2710
|
+
return e.trimMode !== L ? p : p.trim();
|
|
2677
2711
|
}
|
|
2678
|
-
function
|
|
2679
|
-
return
|
|
2712
|
+
function j(p) {
|
|
2713
|
+
return Q(I(p));
|
|
2680
2714
|
}
|
|
2681
|
-
function
|
|
2715
|
+
function P(p) {
|
|
2682
2716
|
c.value = p, a("update:modelValue", p);
|
|
2683
2717
|
}
|
|
2684
|
-
function
|
|
2718
|
+
function G(p, L = "") {
|
|
2685
2719
|
return {
|
|
2686
2720
|
...p,
|
|
2687
2721
|
label: p.label || p.value,
|
|
2688
2722
|
value: p.value || p.label,
|
|
2689
|
-
description: p.description ||
|
|
2723
|
+
description: p.description || L
|
|
2690
2724
|
};
|
|
2691
2725
|
}
|
|
2692
|
-
function
|
|
2693
|
-
return p.flatMap((
|
|
2694
|
-
if (Array.isArray(
|
|
2695
|
-
const
|
|
2696
|
-
return
|
|
2726
|
+
function E(p = []) {
|
|
2727
|
+
return p.flatMap((L) => {
|
|
2728
|
+
if (Array.isArray(L.items)) {
|
|
2729
|
+
const te = L;
|
|
2730
|
+
return te.items.map((be) => G(be, te.groupLabel));
|
|
2697
2731
|
}
|
|
2698
|
-
return
|
|
2732
|
+
return G(L);
|
|
2699
2733
|
});
|
|
2700
2734
|
}
|
|
2701
2735
|
function d(p) {
|
|
2702
|
-
const
|
|
2703
|
-
return (
|
|
2736
|
+
const L = p.toLowerCase();
|
|
2737
|
+
return (te) => [te.label, te.value, te.description].filter(Boolean).some((be) => String(be).toLowerCase().includes(L));
|
|
2704
2738
|
}
|
|
2705
2739
|
function x(p) {
|
|
2706
2740
|
return p ? p.length >= e.minLength : e.triggerOnFocus;
|
|
@@ -2708,56 +2742,56 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2708
2742
|
function i(p) {
|
|
2709
2743
|
a("suggestions-change", p), a("visible-change", p.length > 0);
|
|
2710
2744
|
}
|
|
2711
|
-
async function
|
|
2745
|
+
async function Z(p) {
|
|
2712
2746
|
if (!x(p))
|
|
2713
2747
|
return i([]), [];
|
|
2714
2748
|
if (e.fetchSuggestionsMethod) {
|
|
2715
2749
|
const be = await new Promise((Se) => {
|
|
2716
2750
|
var de;
|
|
2717
2751
|
(de = e.fetchSuggestionsMethod) == null || de.call(e, p, (Te) => {
|
|
2718
|
-
Se(
|
|
2752
|
+
Se(E(Te));
|
|
2719
2753
|
});
|
|
2720
2754
|
});
|
|
2721
2755
|
return i(be), be;
|
|
2722
2756
|
}
|
|
2723
2757
|
if (e.fetchSuggestions) {
|
|
2724
|
-
const be = await e.fetchSuggestions(p), Se =
|
|
2758
|
+
const be = await e.fetchSuggestions(p), Se = E(Array.isArray(be) ? be : []);
|
|
2725
2759
|
return i(Se), Se;
|
|
2726
2760
|
}
|
|
2727
|
-
const
|
|
2728
|
-
return i(
|
|
2761
|
+
const L = E(e.suggestions), te = p ? L.filter(d(p)) : L;
|
|
2762
|
+
return i(te), te;
|
|
2729
2763
|
}
|
|
2730
|
-
async function
|
|
2731
|
-
|
|
2764
|
+
async function Y(p, L) {
|
|
2765
|
+
K.value = p;
|
|
2732
2766
|
try {
|
|
2733
|
-
const
|
|
2734
|
-
|
|
2735
|
-
} catch (
|
|
2736
|
-
a("error",
|
|
2767
|
+
const te = await Z(p);
|
|
2768
|
+
L(te);
|
|
2769
|
+
} catch (te) {
|
|
2770
|
+
a("error", te), i([]), L([]);
|
|
2737
2771
|
}
|
|
2738
2772
|
}
|
|
2739
|
-
function
|
|
2740
|
-
var p,
|
|
2741
|
-
|
|
2773
|
+
function k() {
|
|
2774
|
+
var p, L;
|
|
2775
|
+
K.value && ((L = (p = u.value) == null ? void 0 : p.getData) == null || L.call(p, K.value));
|
|
2742
2776
|
}
|
|
2743
|
-
function
|
|
2744
|
-
const
|
|
2745
|
-
|
|
2777
|
+
function v(p) {
|
|
2778
|
+
const L = j(p);
|
|
2779
|
+
P(L);
|
|
2746
2780
|
}
|
|
2747
|
-
function
|
|
2748
|
-
const
|
|
2749
|
-
c.value =
|
|
2781
|
+
function D(p) {
|
|
2782
|
+
const L = j(p);
|
|
2783
|
+
c.value = L, a("input", L);
|
|
2750
2784
|
}
|
|
2751
2785
|
function l(p) {
|
|
2752
|
-
const
|
|
2753
|
-
|
|
2786
|
+
const L = h(j(p), "change");
|
|
2787
|
+
L !== I(e.modelValue) && P(L), a("change", L);
|
|
2754
2788
|
}
|
|
2755
2789
|
function n(p) {
|
|
2756
2790
|
a("focus", p);
|
|
2757
2791
|
}
|
|
2758
|
-
function
|
|
2759
|
-
const
|
|
2760
|
-
|
|
2792
|
+
function M(p) {
|
|
2793
|
+
const L = h(c.value, "blur");
|
|
2794
|
+
L !== I(e.modelValue) && P(L), a("blur", p), a("visible-change", !1);
|
|
2761
2795
|
}
|
|
2762
2796
|
function le() {
|
|
2763
2797
|
c.value = "", a("update:modelValue", ""), a("clear"), i([]);
|
|
@@ -2766,45 +2800,45 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2766
2800
|
a("enter", p), e.searchOnEnter && $();
|
|
2767
2801
|
}
|
|
2768
2802
|
function $() {
|
|
2769
|
-
a("search",
|
|
2803
|
+
a("search", I(e.modelValue));
|
|
2770
2804
|
}
|
|
2771
|
-
function
|
|
2805
|
+
function N(p) {
|
|
2772
2806
|
a("select", p), e.searchOnSelect && a("search", p.value);
|
|
2773
2807
|
}
|
|
2774
|
-
function
|
|
2808
|
+
function z(p) {
|
|
2775
2809
|
return p.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2776
2810
|
}
|
|
2777
2811
|
function m(p) {
|
|
2778
2812
|
return p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2779
2813
|
}
|
|
2780
|
-
function
|
|
2781
|
-
const
|
|
2782
|
-
if (!e.highlightKeyword || !f.value) return
|
|
2783
|
-
const
|
|
2784
|
-
return
|
|
2785
|
-
new RegExp(`(${
|
|
2814
|
+
function _(p) {
|
|
2815
|
+
const L = z(p || "");
|
|
2816
|
+
if (!e.highlightKeyword || !f.value) return L;
|
|
2817
|
+
const te = m(z(f.value));
|
|
2818
|
+
return te ? L.replace(
|
|
2819
|
+
new RegExp(`(${te})`, "ig"),
|
|
2786
2820
|
'<mark class="qy-search-input__mark">$1</mark>'
|
|
2787
|
-
) :
|
|
2821
|
+
) : L;
|
|
2788
2822
|
}
|
|
2789
2823
|
function ae() {
|
|
2790
|
-
var p,
|
|
2791
|
-
(
|
|
2824
|
+
var p, L;
|
|
2825
|
+
(L = (p = u.value) == null ? void 0 : p.focus) == null || L.call(p);
|
|
2792
2826
|
}
|
|
2793
2827
|
function ve() {
|
|
2794
|
-
var p,
|
|
2795
|
-
(
|
|
2828
|
+
var p, L;
|
|
2829
|
+
(L = (p = u.value) == null ? void 0 : p.blur) == null || L.call(p);
|
|
2796
2830
|
}
|
|
2797
2831
|
function xe() {
|
|
2798
|
-
var p,
|
|
2799
|
-
(
|
|
2832
|
+
var p, L, te;
|
|
2833
|
+
(te = (L = (p = u.value) == null ? void 0 : p.inputRef) == null ? void 0 : L.select) == null || te.call(L);
|
|
2800
2834
|
}
|
|
2801
2835
|
function $e() {
|
|
2802
|
-
var p,
|
|
2803
|
-
(
|
|
2836
|
+
var p, L;
|
|
2837
|
+
(L = (p = u.value) == null ? void 0 : p.clear) == null || L.call(p);
|
|
2804
2838
|
}
|
|
2805
2839
|
function Ce() {
|
|
2806
|
-
var p,
|
|
2807
|
-
(
|
|
2840
|
+
var p, L;
|
|
2841
|
+
(L = (p = u.value) == null ? void 0 : p.close) == null || L.call(p);
|
|
2808
2842
|
}
|
|
2809
2843
|
return b({
|
|
2810
2844
|
// 暴露搜索框常用控制方法,供弹窗打开后聚焦或失败后重试建议项。
|
|
@@ -2813,46 +2847,46 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2813
2847
|
select: xe,
|
|
2814
2848
|
clear: $e,
|
|
2815
2849
|
closePanel: Ce,
|
|
2816
|
-
retryFetch:
|
|
2817
|
-
}), (p,
|
|
2850
|
+
retryFetch: k
|
|
2851
|
+
}), (p, L) => (V(), H("div", {
|
|
2818
2852
|
class: he(["qy-search-input", { "is-disabled": t.disabled }])
|
|
2819
2853
|
}, [
|
|
2820
|
-
|
|
2854
|
+
J(C(bt), ie({
|
|
2821
2855
|
ref_key: "autocompleteRef",
|
|
2822
2856
|
ref: u
|
|
2823
|
-
}, C(
|
|
2824
|
-
"model-value":
|
|
2857
|
+
}, C(A), {
|
|
2858
|
+
"model-value": R.value,
|
|
2825
2859
|
disabled: t.disabled,
|
|
2826
2860
|
placeholder: t.placeholder,
|
|
2827
2861
|
clearable: t.clearable,
|
|
2828
2862
|
debounce: t.debounce,
|
|
2829
|
-
"fetch-suggestions":
|
|
2863
|
+
"fetch-suggestions": Y,
|
|
2830
2864
|
"trigger-on-focus": t.triggerOnFocus,
|
|
2831
2865
|
teleported: t.teleported,
|
|
2832
2866
|
"fit-input-width": t.fitInputWidth,
|
|
2833
2867
|
"popper-class": B.value,
|
|
2834
2868
|
"append-to": t.appendTo,
|
|
2835
2869
|
"value-key": "value",
|
|
2836
|
-
"onUpdate:modelValue":
|
|
2837
|
-
onInput:
|
|
2870
|
+
"onUpdate:modelValue": v,
|
|
2871
|
+
onInput: D,
|
|
2838
2872
|
onChange: l,
|
|
2839
2873
|
onFocus: n,
|
|
2840
|
-
onBlur:
|
|
2874
|
+
onBlur: M,
|
|
2841
2875
|
onClear: le,
|
|
2842
|
-
onSelect:
|
|
2843
|
-
onKeydown:
|
|
2876
|
+
onSelect: N,
|
|
2877
|
+
onKeydown: Ke(y, ["enter"])
|
|
2844
2878
|
}), Re({
|
|
2845
|
-
default: S(({ item:
|
|
2846
|
-
|
|
2847
|
-
item:
|
|
2879
|
+
default: S(({ item: te }) => [
|
|
2880
|
+
O(p.$slots, "item", {
|
|
2881
|
+
item: te,
|
|
2848
2882
|
keyword: f.value
|
|
2849
2883
|
}, () => [
|
|
2850
|
-
|
|
2851
|
-
|
|
2884
|
+
W("div", Ta, [
|
|
2885
|
+
W("div", {
|
|
2852
2886
|
class: "qy-search-input__item-label",
|
|
2853
|
-
innerHTML:
|
|
2854
|
-
}, null, 8,
|
|
2855
|
-
|
|
2887
|
+
innerHTML: _(te.label || te.value || "")
|
|
2888
|
+
}, null, 8, Pa),
|
|
2889
|
+
te.description ? (V(), H("div", Ma, fe(te.description), 1)) : X("", !0)
|
|
2856
2890
|
])
|
|
2857
2891
|
], !0)
|
|
2858
2892
|
]),
|
|
@@ -2861,28 +2895,28 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2861
2895
|
p.$slots.prefix ? {
|
|
2862
2896
|
name: "prefix",
|
|
2863
2897
|
fn: S(() => [
|
|
2864
|
-
|
|
2898
|
+
O(p.$slots, "prefix", {}, void 0, !0)
|
|
2865
2899
|
]),
|
|
2866
2900
|
key: "0"
|
|
2867
2901
|
} : void 0,
|
|
2868
2902
|
p.$slots.suffix ? {
|
|
2869
2903
|
name: "suffix",
|
|
2870
2904
|
fn: S(() => [
|
|
2871
|
-
|
|
2905
|
+
O(p.$slots, "suffix", {}, void 0, !0)
|
|
2872
2906
|
]),
|
|
2873
2907
|
key: "1"
|
|
2874
2908
|
} : void 0,
|
|
2875
2909
|
p.$slots.prepend ? {
|
|
2876
2910
|
name: "prepend",
|
|
2877
2911
|
fn: S(() => [
|
|
2878
|
-
|
|
2912
|
+
O(p.$slots, "prepend", {}, void 0, !0)
|
|
2879
2913
|
]),
|
|
2880
2914
|
key: "2"
|
|
2881
2915
|
} : void 0,
|
|
2882
2916
|
p.$slots.append || t.showButton ? {
|
|
2883
2917
|
name: "append",
|
|
2884
2918
|
fn: S(() => [
|
|
2885
|
-
p.$slots.append ?
|
|
2919
|
+
p.$slots.append ? O(p.$slots, "append", { key: 0 }, void 0, !0) : (V(), ee(C(ke), ie({ key: 1 }, t.buttonProps, {
|
|
2886
2920
|
loading: t.loading,
|
|
2887
2921
|
disabled: t.disabled,
|
|
2888
2922
|
onClick: $
|
|
@@ -2898,16 +2932,16 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2898
2932
|
]), 1040, ["model-value", "disabled", "placeholder", "clearable", "debounce", "trigger-on-focus", "teleported", "fit-input-width", "popper-class", "append-to"])
|
|
2899
2933
|
], 2));
|
|
2900
2934
|
}
|
|
2901
|
-
}), $t = /* @__PURE__ */
|
|
2935
|
+
}), $t = /* @__PURE__ */ ze(Fa, [["__scopeId", "data-v-cd7f5dfc"]]), Oa = { class: "qy-record-quote-search" }, Qa = {
|
|
2902
2936
|
key: 0,
|
|
2903
2937
|
class: "qy-record-quote-search__header"
|
|
2904
|
-
},
|
|
2938
|
+
}, Da = {
|
|
2905
2939
|
key: 0,
|
|
2906
2940
|
class: "qy-record-quote-search__label"
|
|
2907
|
-
},
|
|
2941
|
+
}, Ua = {
|
|
2908
2942
|
key: 1,
|
|
2909
2943
|
class: "qy-record-quote-search__description"
|
|
2910
|
-
},
|
|
2944
|
+
}, Ka = /* @__PURE__ */ se({
|
|
2911
2945
|
name: "QyRecordQuoteSearch",
|
|
2912
2946
|
inheritAttrs: !1,
|
|
2913
2947
|
__name: "index",
|
|
@@ -2936,35 +2970,35 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2936
2970
|
},
|
|
2937
2971
|
emits: ["update:modelValue", "search", "clear", "normalize", "enter", "select", "error", "success"],
|
|
2938
2972
|
setup(t, { expose: b, emit: w }) {
|
|
2939
|
-
const e = t, a = w,
|
|
2940
|
-
function
|
|
2973
|
+
const e = t, a = w, A = pe(), u = U(null), c = U(!1), f = F(() => e.statusText || ""), B = F(() => e.loading || c.value);
|
|
2974
|
+
function R(l) {
|
|
2941
2975
|
return l == null ? "" : String(l);
|
|
2942
2976
|
}
|
|
2943
|
-
function
|
|
2944
|
-
const n =
|
|
2945
|
-
return le ? le[0] :
|
|
2977
|
+
function K(l) {
|
|
2978
|
+
const n = R(l).trim(), M = I(n), le = M.match(/BJ\d{8}[A-Z0-9]{4}/i);
|
|
2979
|
+
return le ? le[0] : M;
|
|
2946
2980
|
}
|
|
2947
|
-
function
|
|
2948
|
-
return
|
|
2981
|
+
function I(l) {
|
|
2982
|
+
return R(l).replace(/\s+/g, "").trim().toUpperCase();
|
|
2949
2983
|
}
|
|
2950
|
-
function
|
|
2951
|
-
return e.extractMethod ? e.extractMethod(l) :
|
|
2984
|
+
function Q(l) {
|
|
2985
|
+
return e.extractMethod ? e.extractMethod(l) : K(l);
|
|
2952
2986
|
}
|
|
2953
2987
|
function h(l) {
|
|
2954
|
-
return e.normalizeMethod ? e.normalizeMethod(l) :
|
|
2988
|
+
return e.normalizeMethod ? e.normalizeMethod(l) : I(l);
|
|
2955
2989
|
}
|
|
2956
|
-
function
|
|
2957
|
-
const
|
|
2958
|
-
return a("normalize", { rawValue:
|
|
2959
|
-
rawValue:
|
|
2990
|
+
function j(l, n) {
|
|
2991
|
+
const M = R(l), le = Q(M), y = e.autoNormalize ? h(le) : le;
|
|
2992
|
+
return a("normalize", { rawValue: M, code: y }), {
|
|
2993
|
+
rawValue: M,
|
|
2960
2994
|
code: y,
|
|
2961
2995
|
item: n
|
|
2962
2996
|
};
|
|
2963
2997
|
}
|
|
2964
|
-
function
|
|
2998
|
+
function P(l) {
|
|
2965
2999
|
a("update:modelValue", l);
|
|
2966
3000
|
}
|
|
2967
|
-
async function
|
|
3001
|
+
async function G(l) {
|
|
2968
3002
|
if (a("search", l), !!e.searchMethod) {
|
|
2969
3003
|
c.value = !0;
|
|
2970
3004
|
try {
|
|
@@ -2977,9 +3011,9 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2977
3011
|
}
|
|
2978
3012
|
}
|
|
2979
3013
|
}
|
|
2980
|
-
function
|
|
2981
|
-
const n =
|
|
2982
|
-
n.code !==
|
|
3014
|
+
function E(l) {
|
|
3015
|
+
const n = j(l);
|
|
3016
|
+
n.code !== R(e.modelValue) && a("update:modelValue", n.code), G(n);
|
|
2983
3017
|
}
|
|
2984
3018
|
function d() {
|
|
2985
3019
|
a("clear");
|
|
@@ -2989,46 +3023,46 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
2989
3023
|
}
|
|
2990
3024
|
function i(l) {
|
|
2991
3025
|
if (a("select", l), !e.searchOnSelect) return;
|
|
2992
|
-
const n =
|
|
2993
|
-
n.code !==
|
|
3026
|
+
const n = j(l.value, l);
|
|
3027
|
+
n.code !== R(e.modelValue) && a("update:modelValue", n.code), G(n);
|
|
2994
3028
|
}
|
|
2995
|
-
function
|
|
3029
|
+
function Z(l) {
|
|
2996
3030
|
a("error", l);
|
|
2997
3031
|
}
|
|
2998
|
-
function
|
|
3032
|
+
function Y() {
|
|
2999
3033
|
var l, n;
|
|
3000
3034
|
(n = (l = u.value) == null ? void 0 : l.focus) == null || n.call(l);
|
|
3001
3035
|
}
|
|
3002
|
-
function
|
|
3036
|
+
function k() {
|
|
3003
3037
|
var l, n;
|
|
3004
3038
|
(n = (l = u.value) == null ? void 0 : l.blur) == null || n.call(l);
|
|
3005
3039
|
}
|
|
3006
|
-
function
|
|
3040
|
+
function v() {
|
|
3007
3041
|
var l, n;
|
|
3008
3042
|
(n = (l = u.value) == null ? void 0 : l.select) == null || n.call(l);
|
|
3009
3043
|
}
|
|
3010
|
-
function
|
|
3044
|
+
function D() {
|
|
3011
3045
|
var l, n;
|
|
3012
3046
|
(n = (l = u.value) == null ? void 0 : l.clear) == null || n.call(l);
|
|
3013
3047
|
}
|
|
3014
3048
|
return b({
|
|
3015
|
-
focus:
|
|
3016
|
-
blur:
|
|
3017
|
-
select:
|
|
3018
|
-
clear:
|
|
3019
|
-
extractQuoteOrderCode:
|
|
3049
|
+
focus: Y,
|
|
3050
|
+
blur: k,
|
|
3051
|
+
select: v,
|
|
3052
|
+
clear: D,
|
|
3053
|
+
extractQuoteOrderCode: Q,
|
|
3020
3054
|
normalizeQuoteOrderCode: h
|
|
3021
|
-
}), (l, n) => (V(),
|
|
3022
|
-
|
|
3023
|
-
t.label || t.description ? (V(),
|
|
3024
|
-
t.label ? (V(),
|
|
3025
|
-
t.description ? (V(),
|
|
3026
|
-
])) :
|
|
3055
|
+
}), (l, n) => (V(), H("div", Oa, [
|
|
3056
|
+
O(l.$slots, "label", {}, () => [
|
|
3057
|
+
t.label || t.description ? (V(), H("div", Qa, [
|
|
3058
|
+
t.label ? (V(), H("div", Da, fe(t.label), 1)) : X("", !0),
|
|
3059
|
+
t.description ? (V(), H("div", Ua, fe(t.description), 1)) : X("", !0)
|
|
3060
|
+
])) : X("", !0)
|
|
3027
3061
|
], !0),
|
|
3028
|
-
|
|
3062
|
+
J($t, ie({
|
|
3029
3063
|
ref_key: "searchRef",
|
|
3030
3064
|
ref: u
|
|
3031
|
-
}, C(
|
|
3065
|
+
}, C(A), {
|
|
3032
3066
|
"model-value": t.modelValue,
|
|
3033
3067
|
loading: B.value,
|
|
3034
3068
|
disabled: t.disabled,
|
|
@@ -3042,61 +3076,61 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3042
3076
|
debounce: t.debounce,
|
|
3043
3077
|
"min-length": t.minLength,
|
|
3044
3078
|
"search-on-select": !1,
|
|
3045
|
-
"onUpdate:modelValue":
|
|
3046
|
-
onSearch:
|
|
3079
|
+
"onUpdate:modelValue": P,
|
|
3080
|
+
onSearch: E,
|
|
3047
3081
|
onClear: d,
|
|
3048
3082
|
onEnter: x,
|
|
3049
3083
|
onSelect: i,
|
|
3050
|
-
onError:
|
|
3084
|
+
onError: Z
|
|
3051
3085
|
}), Re({ _: 2 }, [
|
|
3052
3086
|
l.$slots.prefix ? {
|
|
3053
3087
|
name: "prefix",
|
|
3054
3088
|
fn: S(() => [
|
|
3055
|
-
|
|
3089
|
+
O(l.$slots, "prefix", {}, void 0, !0)
|
|
3056
3090
|
]),
|
|
3057
3091
|
key: "0"
|
|
3058
3092
|
} : void 0,
|
|
3059
3093
|
l.$slots.suffix ? {
|
|
3060
3094
|
name: "suffix",
|
|
3061
3095
|
fn: S(() => [
|
|
3062
|
-
|
|
3096
|
+
O(l.$slots, "suffix", {}, void 0, !0)
|
|
3063
3097
|
]),
|
|
3064
3098
|
key: "1"
|
|
3065
3099
|
} : void 0,
|
|
3066
3100
|
l.$slots.item ? {
|
|
3067
3101
|
name: "item",
|
|
3068
|
-
fn: S((
|
|
3069
|
-
|
|
3102
|
+
fn: S((M) => [
|
|
3103
|
+
O(l.$slots, "item", Oe(Qe(M)), void 0, !0)
|
|
3070
3104
|
]),
|
|
3071
3105
|
key: "2"
|
|
3072
3106
|
} : void 0,
|
|
3073
3107
|
l.$slots.empty ? {
|
|
3074
3108
|
name: "empty",
|
|
3075
3109
|
fn: S(() => [
|
|
3076
|
-
|
|
3110
|
+
O(l.$slots, "empty", {}, void 0, !0)
|
|
3077
3111
|
]),
|
|
3078
3112
|
key: "3"
|
|
3079
3113
|
} : void 0,
|
|
3080
3114
|
l.$slots.loading ? {
|
|
3081
3115
|
name: "loading",
|
|
3082
3116
|
fn: S(() => [
|
|
3083
|
-
|
|
3117
|
+
O(l.$slots, "loading", {}, void 0, !0)
|
|
3084
3118
|
]),
|
|
3085
3119
|
key: "4"
|
|
3086
3120
|
} : void 0
|
|
3087
3121
|
]), 1040, ["model-value", "loading", "disabled", "placeholder", "trim-mode", "button-text", "suggestions", "fetch-suggestions", "fetch-suggestions-method", "debounce", "min-length"]),
|
|
3088
|
-
t.showStatus && f.value ?
|
|
3122
|
+
t.showStatus && f.value ? O(l.$slots, "status", {
|
|
3089
3123
|
key: 0,
|
|
3090
3124
|
status: t.status,
|
|
3091
3125
|
statusText: f.value
|
|
3092
3126
|
}, () => [
|
|
3093
|
-
|
|
3127
|
+
W("div", {
|
|
3094
3128
|
class: he(["qy-record-quote-search__status", `is-${t.status}`])
|
|
3095
3129
|
}, fe(f.value), 3)
|
|
3096
|
-
], !0) :
|
|
3130
|
+
], !0) : X("", !0)
|
|
3097
3131
|
]));
|
|
3098
3132
|
}
|
|
3099
|
-
}),
|
|
3133
|
+
}), Ea = /* @__PURE__ */ ze(Ka, [["__scopeId", "data-v-3a314f64"]]), Bt = /* @__PURE__ */ se({
|
|
3100
3134
|
name: "QyTreeSelect",
|
|
3101
3135
|
inheritAttrs: !1,
|
|
3102
3136
|
__name: "index",
|
|
@@ -3127,21 +3161,21 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3127
3161
|
},
|
|
3128
3162
|
emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur"],
|
|
3129
3163
|
setup(t, { expose: b, emit: w }) {
|
|
3130
|
-
const e = t, a = w,
|
|
3164
|
+
const e = t, a = w, A = pe(), u = U(null), c = F(
|
|
3131
3165
|
() => ["qy-tree-select__popper", e.popperClass].filter(Boolean).join(" ")
|
|
3132
|
-
), f =
|
|
3166
|
+
), f = F(() => ({
|
|
3133
3167
|
label: "label",
|
|
3134
3168
|
value: "value",
|
|
3135
3169
|
children: "children",
|
|
3136
3170
|
disabled: "disabled",
|
|
3137
3171
|
...e.props
|
|
3138
|
-
})), B =
|
|
3172
|
+
})), B = F(
|
|
3139
3173
|
() => {
|
|
3140
3174
|
var d;
|
|
3141
|
-
return
|
|
3175
|
+
return R((d = e.options) != null && d.length ? e.options : e.data || []);
|
|
3142
3176
|
}
|
|
3143
3177
|
);
|
|
3144
|
-
function
|
|
3178
|
+
function R(d) {
|
|
3145
3179
|
return d.map((x) => {
|
|
3146
3180
|
const i = x == null ? void 0 : x[e.childrenKey];
|
|
3147
3181
|
return {
|
|
@@ -3149,44 +3183,44 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3149
3183
|
label: (x == null ? void 0 : x[e.labelKey]) ?? (x == null ? void 0 : x.label) ?? (x == null ? void 0 : x.value) ?? "",
|
|
3150
3184
|
value: (x == null ? void 0 : x[e.valueKey]) ?? (x == null ? void 0 : x.value) ?? (x == null ? void 0 : x.label),
|
|
3151
3185
|
disabled: !!(x != null && x[e.disabledKey]),
|
|
3152
|
-
children: Array.isArray(i) ?
|
|
3186
|
+
children: Array.isArray(i) ? R(i) : i
|
|
3153
3187
|
};
|
|
3154
3188
|
});
|
|
3155
3189
|
}
|
|
3156
|
-
function
|
|
3190
|
+
function K(d) {
|
|
3157
3191
|
a("update:modelValue", d);
|
|
3158
3192
|
}
|
|
3159
|
-
function
|
|
3193
|
+
function I(d) {
|
|
3160
3194
|
a("change", d);
|
|
3161
3195
|
}
|
|
3162
|
-
function
|
|
3196
|
+
function Q() {
|
|
3163
3197
|
a("clear");
|
|
3164
3198
|
}
|
|
3165
3199
|
function h(d) {
|
|
3166
3200
|
a("visible-change", d);
|
|
3167
3201
|
}
|
|
3168
|
-
function
|
|
3202
|
+
function j(d) {
|
|
3169
3203
|
a("focus", d);
|
|
3170
3204
|
}
|
|
3171
|
-
function
|
|
3205
|
+
function P(d) {
|
|
3172
3206
|
a("blur", d);
|
|
3173
3207
|
}
|
|
3174
|
-
function
|
|
3208
|
+
function G() {
|
|
3175
3209
|
var d, x;
|
|
3176
3210
|
(x = (d = u.value) == null ? void 0 : d.focus) == null || x.call(d);
|
|
3177
3211
|
}
|
|
3178
|
-
function
|
|
3212
|
+
function E() {
|
|
3179
3213
|
var d, x;
|
|
3180
3214
|
(x = (d = u.value) == null ? void 0 : d.blur) == null || x.call(d);
|
|
3181
3215
|
}
|
|
3182
3216
|
return b({
|
|
3183
3217
|
// 暴露最常用的焦点控制;复杂树选择能力仍通过 attrs 透传给 Element Plus。
|
|
3184
|
-
focus:
|
|
3185
|
-
blur:
|
|
3186
|
-
}), (d, x) => (V(),
|
|
3218
|
+
focus: G,
|
|
3219
|
+
blur: E
|
|
3220
|
+
}), (d, x) => (V(), ee(C(wt), ie({
|
|
3187
3221
|
ref_key: "treeSelectRef",
|
|
3188
3222
|
ref: u
|
|
3189
|
-
}, C(
|
|
3223
|
+
}, C(A), {
|
|
3190
3224
|
"model-value": t.modelValue,
|
|
3191
3225
|
data: B.value,
|
|
3192
3226
|
props: f.value,
|
|
@@ -3205,59 +3239,59 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3205
3239
|
"append-to": t.appendTo,
|
|
3206
3240
|
"fit-input-width": t.fitInputWidth,
|
|
3207
3241
|
"popper-class": c.value,
|
|
3208
|
-
"onUpdate:modelValue":
|
|
3209
|
-
onChange:
|
|
3210
|
-
onClear:
|
|
3242
|
+
"onUpdate:modelValue": K,
|
|
3243
|
+
onChange: I,
|
|
3244
|
+
onClear: Q,
|
|
3211
3245
|
onVisibleChange: h,
|
|
3212
|
-
onFocus:
|
|
3213
|
-
onBlur:
|
|
3246
|
+
onFocus: j,
|
|
3247
|
+
onBlur: P
|
|
3214
3248
|
}), Re({ _: 2 }, [
|
|
3215
3249
|
d.$slots.prefix ? {
|
|
3216
3250
|
name: "prefix",
|
|
3217
3251
|
fn: S(() => [
|
|
3218
|
-
|
|
3252
|
+
O(d.$slots, "prefix")
|
|
3219
3253
|
]),
|
|
3220
3254
|
key: "0"
|
|
3221
3255
|
} : void 0,
|
|
3222
3256
|
d.$slots.empty ? {
|
|
3223
3257
|
name: "empty",
|
|
3224
3258
|
fn: S(() => [
|
|
3225
|
-
|
|
3259
|
+
O(d.$slots, "empty")
|
|
3226
3260
|
]),
|
|
3227
3261
|
key: "1"
|
|
3228
3262
|
} : void 0,
|
|
3229
3263
|
d.$slots.tag ? {
|
|
3230
3264
|
name: "tag",
|
|
3231
3265
|
fn: S((i) => [
|
|
3232
|
-
|
|
3266
|
+
O(d.$slots, "tag", Oe(Qe(i)))
|
|
3233
3267
|
]),
|
|
3234
3268
|
key: "2"
|
|
3235
3269
|
} : void 0,
|
|
3236
3270
|
d.$slots.default ? {
|
|
3237
3271
|
name: "default",
|
|
3238
3272
|
fn: S((i) => [
|
|
3239
|
-
|
|
3273
|
+
O(d.$slots, "default", Oe(Qe(i)))
|
|
3240
3274
|
]),
|
|
3241
3275
|
key: "3"
|
|
3242
3276
|
} : void 0
|
|
3243
3277
|
]), 1040, ["model-value", "data", "props", "placeholder", "disabled", "clearable", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "check-strictly", "default-expand-all", "render-after-expand", "size", "teleported", "append-to", "fit-input-width", "popper-class"]));
|
|
3244
3278
|
}
|
|
3245
|
-
}),
|
|
3279
|
+
}), La = { class: "qy-selection-dialog" }, ja = { class: "qy-selection-dialog__main" }, Na = {
|
|
3246
3280
|
key: 0,
|
|
3247
3281
|
class: "qy-selection-dialog__selected"
|
|
3248
|
-
},
|
|
3282
|
+
}, Ha = { class: "qy-selection-dialog__selected-tags" }, Wa = {
|
|
3249
3283
|
key: 0,
|
|
3250
3284
|
class: "qy-selection-dialog__selected-actions"
|
|
3251
|
-
},
|
|
3285
|
+
}, Za = {
|
|
3252
3286
|
key: 1,
|
|
3253
3287
|
class: "qy-selection-dialog__search-row"
|
|
3254
|
-
},
|
|
3288
|
+
}, Ga = {
|
|
3255
3289
|
key: 0,
|
|
3256
3290
|
class: "qy-selection-dialog__toolbar"
|
|
3257
|
-
},
|
|
3291
|
+
}, Xa = {
|
|
3258
3292
|
key: 2,
|
|
3259
3293
|
class: "qy-selection-dialog__pagination"
|
|
3260
|
-
},
|
|
3294
|
+
}, Ja = { class: "qy-selection-dialog__paste-actions" }, Ya = /* @__PURE__ */ se({
|
|
3261
3295
|
name: "QySelectionDialog",
|
|
3262
3296
|
inheritAttrs: !1,
|
|
3263
3297
|
__name: "index",
|
|
@@ -3297,21 +3331,21 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3297
3331
|
},
|
|
3298
3332
|
emits: ["update:modelValue", "selection-change", "confirm", "submit", "cancel", "close", "append", "loaded"],
|
|
3299
3333
|
setup(t, { expose: b, emit: w }) {
|
|
3300
|
-
const e = t, a = w,
|
|
3334
|
+
const e = t, a = w, A = pe(), u = _e(), c = dl(), f = U(null), B = U([]), R = U([]), K = U([]), I = U(!1), Q = U(0), h = U(!1), j = U(""), P = Ze({
|
|
3301
3335
|
category: [],
|
|
3302
3336
|
type: "",
|
|
3303
3337
|
page: 1,
|
|
3304
3338
|
pageSize: 10,
|
|
3305
3339
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
3306
3340
|
...e.queryParams
|
|
3307
|
-
}),
|
|
3341
|
+
}), G = F(() => e.selectionMode ? e.selectionMode : e.selection === "multi" ? "multiple" : e.selection), E = F(() => e.mainKey || e.rowKey), d = F(() => e.tagName || e.labelKey), x = F(() => e.typeOptions.length ? e.typeOptions : e.type || []), i = F(() => ({
|
|
3308
3342
|
...e.typeSelectionProps,
|
|
3309
3343
|
...e.typeSelectProps
|
|
3310
|
-
})),
|
|
3311
|
-
() => e.showSearch || !!
|
|
3312
|
-
),
|
|
3313
|
-
() =>
|
|
3314
|
-
),
|
|
3344
|
+
})), Z = F(() => e.tableProps || {}), Y = F(
|
|
3345
|
+
() => e.showSearch || !!A["search-visible"]
|
|
3346
|
+
), k = F(() => e.showAppend || e.append), v = F(
|
|
3347
|
+
() => k.value || !!u.toolbar || !!u.bar
|
|
3348
|
+
), D = F(() => e.fetchMethod || e.query), l = F(() => n() ? e.modelValue : e.selected);
|
|
3315
3349
|
function n() {
|
|
3316
3350
|
const o = (c == null ? void 0 : c.vnode.props) || {};
|
|
3317
3351
|
return Object.prototype.hasOwnProperty.call(o, "modelValue") || Object.prototype.hasOwnProperty.call(o, "model-value") || Object.prototype.hasOwnProperty.call(o, "onUpdate:modelValue");
|
|
@@ -3319,54 +3353,54 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3319
3353
|
re(
|
|
3320
3354
|
[() => e.modelValue, () => e.selected, () => e.open],
|
|
3321
3355
|
() => {
|
|
3322
|
-
e.open && (
|
|
3356
|
+
e.open && (R.value = g(l.value), te());
|
|
3323
3357
|
},
|
|
3324
3358
|
{ immediate: !0, deep: !0 }
|
|
3325
3359
|
), re(
|
|
3326
3360
|
[() => e.categoryOptions, () => e.category],
|
|
3327
3361
|
(o) => {
|
|
3328
3362
|
if (Array.isArray(e.category) && e.category.length) {
|
|
3329
|
-
|
|
3363
|
+
K.value = e.category;
|
|
3330
3364
|
return;
|
|
3331
3365
|
}
|
|
3332
|
-
|
|
3366
|
+
K.value = e.categoryOptions || [];
|
|
3333
3367
|
},
|
|
3334
3368
|
{ immediate: !0 }
|
|
3335
3369
|
), re(h, (o) => {
|
|
3336
|
-
o || (
|
|
3370
|
+
o || (j.value = "");
|
|
3337
3371
|
});
|
|
3338
|
-
async function
|
|
3339
|
-
|
|
3372
|
+
async function M() {
|
|
3373
|
+
R.value = g(l.value), await le(), await y(), te();
|
|
3340
3374
|
}
|
|
3341
3375
|
async function le() {
|
|
3342
3376
|
const o = e.categoryFetchMethod || (typeof e.category == "function" ? e.category : null);
|
|
3343
3377
|
if (!o) return;
|
|
3344
3378
|
const r = await o();
|
|
3345
|
-
|
|
3379
|
+
K.value = ae(r);
|
|
3346
3380
|
}
|
|
3347
3381
|
async function y() {
|
|
3348
|
-
if (
|
|
3349
|
-
|
|
3382
|
+
if (D.value) {
|
|
3383
|
+
I.value = !0;
|
|
3350
3384
|
try {
|
|
3351
|
-
const o = await
|
|
3352
|
-
return B.value =
|
|
3385
|
+
const o = await D.value(xe()), r = e.responseFormatter ? await e.responseFormatter(o) : o, { rows: T, total: q } = _(r);
|
|
3386
|
+
return B.value = T, Q.value = q, a("loaded", T), te(), r;
|
|
3353
3387
|
} finally {
|
|
3354
|
-
|
|
3388
|
+
I.value = !1;
|
|
3355
3389
|
}
|
|
3356
3390
|
}
|
|
3357
3391
|
}
|
|
3358
3392
|
function $() {
|
|
3359
|
-
return
|
|
3393
|
+
return P.page = 1, y();
|
|
3360
3394
|
}
|
|
3361
|
-
function
|
|
3362
|
-
return
|
|
3395
|
+
function N() {
|
|
3396
|
+
return P.page = 1, y();
|
|
3363
3397
|
}
|
|
3364
|
-
function
|
|
3365
|
-
return Object.assign(
|
|
3398
|
+
function z() {
|
|
3399
|
+
return Object.assign(P, {
|
|
3366
3400
|
category: [],
|
|
3367
3401
|
type: "",
|
|
3368
3402
|
page: 1,
|
|
3369
|
-
pageSize:
|
|
3403
|
+
pageSize: P.pageSize,
|
|
3370
3404
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
3371
3405
|
...e.queryParams
|
|
3372
3406
|
}), y();
|
|
@@ -3374,14 +3408,14 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3374
3408
|
function m() {
|
|
3375
3409
|
a("append");
|
|
3376
3410
|
}
|
|
3377
|
-
function
|
|
3411
|
+
function _(o) {
|
|
3378
3412
|
if (Array.isArray(o))
|
|
3379
3413
|
return { rows: o, total: o.length };
|
|
3380
3414
|
const r = o == null ? void 0 : o.data;
|
|
3381
3415
|
if (Array.isArray(r))
|
|
3382
3416
|
return { rows: r, total: (o == null ? void 0 : o.total) ?? r.length };
|
|
3383
|
-
const
|
|
3384
|
-
return { rows:
|
|
3417
|
+
const T = (o == null ? void 0 : o.records) || (o == null ? void 0 : o.rows) || (r == null ? void 0 : r.records) || [], q = (o == null ? void 0 : o.total) ?? (r == null ? void 0 : r.total) ?? T.length;
|
|
3418
|
+
return { rows: T, total: q };
|
|
3385
3419
|
}
|
|
3386
3420
|
function ae(o) {
|
|
3387
3421
|
const r = (o == null ? void 0 : o.data) ?? o;
|
|
@@ -3389,123 +3423,123 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3389
3423
|
if (typeof e.categoryFormatter == "function")
|
|
3390
3424
|
return e.categoryFormatter(r);
|
|
3391
3425
|
if (Array.isArray(e.categoryFormatter)) {
|
|
3392
|
-
const [
|
|
3426
|
+
const [T, q] = e.categoryFormatter;
|
|
3393
3427
|
return r.map((ne) => ({
|
|
3394
3428
|
...ne,
|
|
3395
|
-
label: ne[
|
|
3396
|
-
value: ne[
|
|
3397
|
-
children: Array.isArray(ne.children) ? ve(ne.children,
|
|
3429
|
+
label: ne[T],
|
|
3430
|
+
value: ne[q],
|
|
3431
|
+
children: Array.isArray(ne.children) ? ve(ne.children, T, q) : ne.children
|
|
3398
3432
|
}));
|
|
3399
3433
|
}
|
|
3400
3434
|
return r;
|
|
3401
3435
|
}
|
|
3402
|
-
function ve(o, r,
|
|
3403
|
-
return o.map((
|
|
3404
|
-
...
|
|
3405
|
-
label:
|
|
3406
|
-
value:
|
|
3407
|
-
children: Array.isArray(
|
|
3436
|
+
function ve(o, r, T) {
|
|
3437
|
+
return o.map((q) => ({
|
|
3438
|
+
...q,
|
|
3439
|
+
label: q[r],
|
|
3440
|
+
value: q[T],
|
|
3441
|
+
children: Array.isArray(q.children) ? ve(q.children, r, T) : q.children
|
|
3408
3442
|
}));
|
|
3409
3443
|
}
|
|
3410
3444
|
function xe() {
|
|
3411
|
-
const o = { ...e.queryParams, ...
|
|
3445
|
+
const o = { ...e.queryParams, ...P };
|
|
3412
3446
|
return e.searchKey && (o[e.searchKey] = String(o[e.searchKey] || "").trim()), o.category = $e(), o;
|
|
3413
3447
|
}
|
|
3414
3448
|
function $e() {
|
|
3415
3449
|
if (Object.prototype.hasOwnProperty.call(e.queryParams, "category"))
|
|
3416
3450
|
return e.queryParams.category;
|
|
3417
|
-
const o =
|
|
3451
|
+
const o = P.category;
|
|
3418
3452
|
return Array.isArray(o) ? o : o ? [o] : [];
|
|
3419
3453
|
}
|
|
3420
3454
|
function Ce(o) {
|
|
3421
|
-
var r,
|
|
3422
|
-
if (
|
|
3423
|
-
if (
|
|
3424
|
-
|
|
3455
|
+
var r, T;
|
|
3456
|
+
if (G.value !== "none") {
|
|
3457
|
+
if (G.value === "single") {
|
|
3458
|
+
R.value = [o], (r = f.value) == null || r.setCurrentRow(o), Pe();
|
|
3425
3459
|
return;
|
|
3426
3460
|
}
|
|
3427
|
-
be(o) && ((
|
|
3461
|
+
be(o) && ((T = f.value) == null || T.toggleRowSelection(o, !Se(o)));
|
|
3428
3462
|
}
|
|
3429
3463
|
}
|
|
3430
3464
|
function p(o) {
|
|
3431
|
-
if (
|
|
3432
|
-
const r = new Set(B.value.map(de)),
|
|
3433
|
-
|
|
3434
|
-
(
|
|
3435
|
-
), o.forEach((
|
|
3436
|
-
Se(
|
|
3465
|
+
if (G.value !== "multiple") return;
|
|
3466
|
+
const r = new Set(B.value.map(de)), T = new Set(o.map(de));
|
|
3467
|
+
R.value = R.value.filter(
|
|
3468
|
+
(q) => !r.has(de(q)) || T.has(de(q))
|
|
3469
|
+
), o.forEach((q) => {
|
|
3470
|
+
Se(q) || R.value.push(q);
|
|
3437
3471
|
}), Pe();
|
|
3438
3472
|
}
|
|
3439
|
-
function
|
|
3440
|
-
var
|
|
3441
|
-
|
|
3473
|
+
function L(o) {
|
|
3474
|
+
var T, q;
|
|
3475
|
+
R.value = R.value.filter(
|
|
3442
3476
|
(ne) => de(ne) !== de(o)
|
|
3443
3477
|
);
|
|
3444
3478
|
const r = B.value.find((ne) => de(ne) === de(o));
|
|
3445
|
-
r && (
|
|
3479
|
+
r && (G.value === "multiple" ? (T = f.value) == null || T.toggleRowSelection(r, !1) : (q = f.value) == null || q.setCurrentRow()), Pe();
|
|
3446
3480
|
}
|
|
3447
|
-
function
|
|
3481
|
+
function te() {
|
|
3448
3482
|
De(() => {
|
|
3449
3483
|
var o;
|
|
3450
3484
|
if (f.value) {
|
|
3451
|
-
if (
|
|
3452
|
-
const [r] =
|
|
3453
|
-
(
|
|
3485
|
+
if (G.value === "single") {
|
|
3486
|
+
const [r] = R.value, T = B.value.find(
|
|
3487
|
+
(q) => r && de(q) === de(r)
|
|
3454
3488
|
);
|
|
3455
|
-
(o = f.value) == null || o.setCurrentRow(
|
|
3489
|
+
(o = f.value) == null || o.setCurrentRow(T);
|
|
3456
3490
|
return;
|
|
3457
3491
|
}
|
|
3458
|
-
|
|
3459
|
-
var
|
|
3460
|
-
(
|
|
3492
|
+
G.value === "multiple" && B.value.forEach((r) => {
|
|
3493
|
+
var T;
|
|
3494
|
+
(T = f.value) == null || T.toggleRowSelection(r, Se(r));
|
|
3461
3495
|
});
|
|
3462
3496
|
}
|
|
3463
3497
|
});
|
|
3464
3498
|
}
|
|
3465
3499
|
function be(o) {
|
|
3466
|
-
var
|
|
3467
|
-
const r = (
|
|
3500
|
+
var T;
|
|
3501
|
+
const r = (T = Z.value) == null ? void 0 : T.selectable;
|
|
3468
3502
|
return typeof r == "function" ? r(o) !== !1 : !0;
|
|
3469
3503
|
}
|
|
3470
3504
|
function Se(o) {
|
|
3471
|
-
return
|
|
3505
|
+
return R.value.some((r) => de(r) === de(o));
|
|
3472
3506
|
}
|
|
3473
3507
|
function de(o) {
|
|
3474
|
-
return
|
|
3508
|
+
return qe(o, E.value);
|
|
3475
3509
|
}
|
|
3476
3510
|
function Te(o) {
|
|
3477
|
-
return
|
|
3511
|
+
return qe(o, d.value) ?? de(o);
|
|
3478
3512
|
}
|
|
3479
|
-
function
|
|
3513
|
+
function qe(o, r) {
|
|
3480
3514
|
if (!(!o || !r))
|
|
3481
|
-
return r.split(".").reduce((
|
|
3515
|
+
return r.split(".").reduce((T, q) => T == null ? void 0 : T[q], o);
|
|
3482
3516
|
}
|
|
3483
3517
|
function Pe() {
|
|
3484
|
-
const o = g(
|
|
3518
|
+
const o = g(R.value);
|
|
3485
3519
|
a("selection-change", o);
|
|
3486
3520
|
}
|
|
3487
3521
|
function Le() {
|
|
3488
|
-
const o = g(
|
|
3489
|
-
a("update:modelValue", o), a("confirm", o), a("submit", { selection: o, rows: o, query: { ...
|
|
3522
|
+
const o = g(R.value);
|
|
3523
|
+
a("update:modelValue", o), a("confirm", o), a("submit", { selection: o, rows: o, query: { ...P } });
|
|
3490
3524
|
}
|
|
3491
3525
|
function je() {
|
|
3492
|
-
|
|
3526
|
+
R.value = g(l.value), a("cancel"), a("close");
|
|
3493
3527
|
}
|
|
3494
3528
|
async function Ne() {
|
|
3495
3529
|
var r;
|
|
3496
|
-
const o = JSON.stringify(
|
|
3530
|
+
const o = JSON.stringify(R.value);
|
|
3497
3531
|
await ((r = navigator.clipboard) == null ? void 0 : r.writeText(o)), ge.success("复制成功");
|
|
3498
3532
|
}
|
|
3499
3533
|
function s() {
|
|
3500
3534
|
try {
|
|
3501
|
-
const o = JSON.parse(
|
|
3535
|
+
const o = JSON.parse(j.value);
|
|
3502
3536
|
if (!Array.isArray(o)) {
|
|
3503
3537
|
ge.error("粘贴内容需要是数组");
|
|
3504
3538
|
return;
|
|
3505
3539
|
}
|
|
3506
3540
|
o.forEach((r) => {
|
|
3507
|
-
Se(r) ||
|
|
3508
|
-
}), h.value = !1, Pe(),
|
|
3541
|
+
Se(r) || R.value.push(r);
|
|
3542
|
+
}), h.value = !1, Pe(), te();
|
|
3509
3543
|
} catch (o) {
|
|
3510
3544
|
ge.error(`粘贴错误: ${(o == null ? void 0 : o.message) || "内容格式错误"}`);
|
|
3511
3545
|
}
|
|
@@ -3517,13 +3551,13 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3517
3551
|
search: $,
|
|
3518
3552
|
handleSearch: y,
|
|
3519
3553
|
handleQuerySearch: $,
|
|
3520
|
-
resetSearch:
|
|
3554
|
+
resetSearch: z,
|
|
3521
3555
|
getTableRef: () => f.value,
|
|
3522
3556
|
getTableData: () => B.value,
|
|
3523
|
-
getSelection: () => g(
|
|
3557
|
+
getSelection: () => g(R.value)
|
|
3524
3558
|
}), (o, r) => {
|
|
3525
|
-
const
|
|
3526
|
-
return V(),
|
|
3559
|
+
const T = al;
|
|
3560
|
+
return V(), ee(Xe, ie(C(A), {
|
|
3527
3561
|
"model-value": t.open,
|
|
3528
3562
|
title: t.title,
|
|
3529
3563
|
width: t.width,
|
|
@@ -3531,29 +3565,29 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3531
3565
|
draggable: "",
|
|
3532
3566
|
"align-center": "",
|
|
3533
3567
|
"append-to-body": "",
|
|
3534
|
-
onOpened:
|
|
3568
|
+
onOpened: M,
|
|
3535
3569
|
onConfirm: Le,
|
|
3536
3570
|
onCancel: je
|
|
3537
3571
|
}), {
|
|
3538
3572
|
default: S(() => [
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
t.showSelected ? (V(),
|
|
3543
|
-
r[12] || (r[12] =
|
|
3544
|
-
|
|
3545
|
-
(V(!0),
|
|
3546
|
-
key: de(
|
|
3573
|
+
W("div", La, [
|
|
3574
|
+
O(o.$slots, "side", {}, void 0, !0),
|
|
3575
|
+
W("div", ja, [
|
|
3576
|
+
t.showSelected ? (V(), H("div", Na, [
|
|
3577
|
+
r[12] || (r[12] = W("span", { class: "qy-selection-dialog__selected-label" }, "已选项", -1)),
|
|
3578
|
+
W("div", Ha, [
|
|
3579
|
+
(V(!0), H(Be, null, Ue(R.value, (q) => (V(), ee(C(dt), {
|
|
3580
|
+
key: de(q),
|
|
3547
3581
|
closable: "",
|
|
3548
3582
|
class: "qy-selection-dialog__selected-tag",
|
|
3549
|
-
onClose: (ne) =>
|
|
3583
|
+
onClose: (ne) => L(q)
|
|
3550
3584
|
}, {
|
|
3551
3585
|
default: S(() => [
|
|
3552
|
-
me(fe(Te(
|
|
3586
|
+
me(fe(Te(q)), 1)
|
|
3553
3587
|
]),
|
|
3554
3588
|
_: 2
|
|
3555
3589
|
}, 1032, ["onClose"]))), 128)),
|
|
3556
|
-
|
|
3590
|
+
R.value.length ? X("", !0) : (V(), ee(C(dt), {
|
|
3557
3591
|
key: 0,
|
|
3558
3592
|
type: "info"
|
|
3559
3593
|
}, {
|
|
@@ -3563,8 +3597,8 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3563
3597
|
_: 1
|
|
3564
3598
|
}))
|
|
3565
3599
|
]),
|
|
3566
|
-
t.showCopyPaste ? (V(),
|
|
3567
|
-
|
|
3600
|
+
t.showCopyPaste ? (V(), H("div", Wa, [
|
|
3601
|
+
J(C(ke), {
|
|
3568
3602
|
size: "small",
|
|
3569
3603
|
onClick: Ne
|
|
3570
3604
|
}, {
|
|
@@ -3573,39 +3607,39 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3573
3607
|
])]),
|
|
3574
3608
|
_: 1
|
|
3575
3609
|
}),
|
|
3576
|
-
|
|
3610
|
+
J(C(ke), {
|
|
3577
3611
|
size: "small",
|
|
3578
|
-
onClick: r[0] || (r[0] = (
|
|
3612
|
+
onClick: r[0] || (r[0] = (q) => h.value = !0)
|
|
3579
3613
|
}, {
|
|
3580
3614
|
default: S(() => [...r[11] || (r[11] = [
|
|
3581
3615
|
me("粘贴", -1)
|
|
3582
3616
|
])]),
|
|
3583
3617
|
_: 1
|
|
3584
3618
|
})
|
|
3585
|
-
])) :
|
|
3586
|
-
])) :
|
|
3587
|
-
|
|
3588
|
-
|
|
3619
|
+
])) : X("", !0)
|
|
3620
|
+
])) : X("", !0),
|
|
3621
|
+
Y.value ? (V(), H("div", Za, [
|
|
3622
|
+
J(C(kt), {
|
|
3589
3623
|
class: "qy-selection-dialog__search",
|
|
3590
3624
|
inline: "",
|
|
3591
|
-
model:
|
|
3625
|
+
model: P
|
|
3592
3626
|
}, {
|
|
3593
3627
|
default: S(() => [
|
|
3594
|
-
|
|
3595
|
-
query:
|
|
3628
|
+
O(o.$slots, "search", {
|
|
3629
|
+
query: P,
|
|
3596
3630
|
search: $,
|
|
3597
|
-
reset:
|
|
3631
|
+
reset: z
|
|
3598
3632
|
}, () => [
|
|
3599
|
-
|
|
3633
|
+
K.value.length ? (V(), ee(C(Ie), {
|
|
3600
3634
|
key: 0,
|
|
3601
3635
|
label: "分类"
|
|
3602
3636
|
}, {
|
|
3603
3637
|
default: S(() => [
|
|
3604
|
-
|
|
3605
|
-
modelValue:
|
|
3606
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
3638
|
+
J(Bt, {
|
|
3639
|
+
modelValue: P.category,
|
|
3640
|
+
"onUpdate:modelValue": r[1] || (r[1] = (q) => P.category = q),
|
|
3607
3641
|
class: "qy-selection-dialog__category",
|
|
3608
|
-
options:
|
|
3642
|
+
options: K.value,
|
|
3609
3643
|
clearable: "",
|
|
3610
3644
|
filterable: "",
|
|
3611
3645
|
"check-strictly": "",
|
|
@@ -3614,15 +3648,15 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3614
3648
|
}, null, 8, ["modelValue", "options"])
|
|
3615
3649
|
]),
|
|
3616
3650
|
_: 1
|
|
3617
|
-
})) :
|
|
3618
|
-
x.value.length ? (V(),
|
|
3651
|
+
})) : X("", !0),
|
|
3652
|
+
x.value.length ? (V(), ee(C(Ie), {
|
|
3619
3653
|
key: 1,
|
|
3620
3654
|
label: "类型"
|
|
3621
3655
|
}, {
|
|
3622
3656
|
default: S(() => [
|
|
3623
|
-
|
|
3624
|
-
modelValue:
|
|
3625
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
3657
|
+
J(at, ie({
|
|
3658
|
+
modelValue: P.type,
|
|
3659
|
+
"onUpdate:modelValue": r[2] || (r[2] = (q) => P.type = q),
|
|
3626
3660
|
class: "qy-selection-dialog__type",
|
|
3627
3661
|
options: x.value,
|
|
3628
3662
|
placeholder: "请选择类型",
|
|
@@ -3630,26 +3664,26 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3630
3664
|
}, i.value, { onChange: $ }), null, 16, ["modelValue", "options"])
|
|
3631
3665
|
]),
|
|
3632
3666
|
_: 1
|
|
3633
|
-
})) :
|
|
3634
|
-
t.searchKey ? (V(),
|
|
3667
|
+
})) : X("", !0),
|
|
3668
|
+
t.searchKey ? (V(), ee(C(Ie), {
|
|
3635
3669
|
key: 2,
|
|
3636
3670
|
label: "搜索"
|
|
3637
3671
|
}, {
|
|
3638
3672
|
default: S(() => [
|
|
3639
|
-
|
|
3640
|
-
modelValue:
|
|
3641
|
-
"onUpdate:modelValue": r[3] || (r[3] = (
|
|
3673
|
+
J(C(Me), {
|
|
3674
|
+
modelValue: P[t.searchKey],
|
|
3675
|
+
"onUpdate:modelValue": r[3] || (r[3] = (q) => P[t.searchKey] = q),
|
|
3642
3676
|
clearable: "",
|
|
3643
3677
|
placeholder: "请输入",
|
|
3644
3678
|
class: "qy-selection-dialog__search-input",
|
|
3645
|
-
onKeydown:
|
|
3679
|
+
onKeydown: Ke(ue($, ["prevent"]), ["enter"])
|
|
3646
3680
|
}, null, 8, ["modelValue", "onKeydown"])
|
|
3647
3681
|
]),
|
|
3648
3682
|
_: 1
|
|
3649
|
-
})) :
|
|
3650
|
-
|
|
3683
|
+
})) : X("", !0),
|
|
3684
|
+
J(C(Ie), null, {
|
|
3651
3685
|
default: S(() => [
|
|
3652
|
-
|
|
3686
|
+
J(C(ke), {
|
|
3653
3687
|
type: "primary",
|
|
3654
3688
|
onClick: $
|
|
3655
3689
|
}, {
|
|
@@ -3658,7 +3692,7 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3658
3692
|
])]),
|
|
3659
3693
|
_: 1
|
|
3660
3694
|
}),
|
|
3661
|
-
|
|
3695
|
+
J(C(ke), { onClick: z }, {
|
|
3662
3696
|
default: S(() => [...r[14] || (r[14] = [
|
|
3663
3697
|
me("重置", -1)
|
|
3664
3698
|
])]),
|
|
@@ -3671,8 +3705,8 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3671
3705
|
]),
|
|
3672
3706
|
_: 3
|
|
3673
3707
|
}, 8, ["model"]),
|
|
3674
|
-
|
|
3675
|
-
|
|
3708
|
+
v.value ? (V(), H("div", Ga, [
|
|
3709
|
+
k.value ? (V(), ee(C(ke), {
|
|
3676
3710
|
key: 0,
|
|
3677
3711
|
type: "primary",
|
|
3678
3712
|
onClick: m
|
|
@@ -3681,86 +3715,86 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3681
3715
|
me(" 新增 ", -1)
|
|
3682
3716
|
])]),
|
|
3683
3717
|
_: 1
|
|
3684
|
-
})) :
|
|
3685
|
-
|
|
3686
|
-
query:
|
|
3718
|
+
})) : X("", !0),
|
|
3719
|
+
O(o.$slots, "toolbar", {
|
|
3720
|
+
query: P,
|
|
3687
3721
|
search: $
|
|
3688
3722
|
}, void 0, !0),
|
|
3689
|
-
|
|
3690
|
-
query:
|
|
3723
|
+
O(o.$slots, "bar", {
|
|
3724
|
+
query: P,
|
|
3691
3725
|
search: $
|
|
3692
3726
|
}, void 0, !0)
|
|
3693
|
-
])) :
|
|
3694
|
-
])) :
|
|
3695
|
-
et((V(),
|
|
3727
|
+
])) : X("", !0)
|
|
3728
|
+
])) : X("", !0),
|
|
3729
|
+
et((V(), ee(C(Vl), ie({
|
|
3696
3730
|
ref_key: "tableRef",
|
|
3697
3731
|
ref: f,
|
|
3698
3732
|
data: B.value,
|
|
3699
|
-
"row-key":
|
|
3733
|
+
"row-key": E.value,
|
|
3700
3734
|
border: "",
|
|
3701
3735
|
"highlight-current-row": "",
|
|
3702
3736
|
"max-height": "550px"
|
|
3703
|
-
},
|
|
3737
|
+
}, Z.value, {
|
|
3704
3738
|
onSelectionChange: p,
|
|
3705
3739
|
onRowClick: Ce
|
|
3706
3740
|
}), {
|
|
3707
3741
|
default: S(() => {
|
|
3708
|
-
var
|
|
3742
|
+
var q;
|
|
3709
3743
|
return [
|
|
3710
|
-
|
|
3744
|
+
G.value === "multiple" ? (V(), ee(C(xl), {
|
|
3711
3745
|
key: 0,
|
|
3712
3746
|
type: "selection",
|
|
3713
3747
|
"reserve-selection": "",
|
|
3714
3748
|
width: "42",
|
|
3715
|
-
selectable: (
|
|
3716
|
-
}, null, 8, ["selectable"])) :
|
|
3717
|
-
|
|
3718
|
-
|
|
3749
|
+
selectable: (q = Z.value) == null ? void 0 : q.selectable
|
|
3750
|
+
}, null, 8, ["selectable"])) : X("", !0),
|
|
3751
|
+
O(o.$slots, "columns", {}, void 0, !0),
|
|
3752
|
+
O(o.$slots, "cols", {}, void 0, !0)
|
|
3719
3753
|
];
|
|
3720
3754
|
}),
|
|
3721
3755
|
_: 3
|
|
3722
3756
|
}, 16, ["data", "row-key"])), [
|
|
3723
|
-
[
|
|
3757
|
+
[T, I.value]
|
|
3724
3758
|
]),
|
|
3725
|
-
t.showPagination &&
|
|
3726
|
-
|
|
3727
|
-
"current-page":
|
|
3728
|
-
"onUpdate:currentPage": r[4] || (r[4] = (
|
|
3729
|
-
"page-size":
|
|
3730
|
-
"onUpdate:pageSize": r[5] || (r[5] = (
|
|
3731
|
-
total:
|
|
3759
|
+
t.showPagination && Q.value > 0 ? (V(), H("div", Xa, [
|
|
3760
|
+
J(C(Cl), {
|
|
3761
|
+
"current-page": P.page,
|
|
3762
|
+
"onUpdate:currentPage": r[4] || (r[4] = (q) => P.page = q),
|
|
3763
|
+
"page-size": P.pageSize,
|
|
3764
|
+
"onUpdate:pageSize": r[5] || (r[5] = (q) => P.pageSize = q),
|
|
3765
|
+
total: Q.value,
|
|
3732
3766
|
"page-sizes": t.pageSizes,
|
|
3733
3767
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
3734
|
-
onSizeChange:
|
|
3768
|
+
onSizeChange: N,
|
|
3735
3769
|
onCurrentChange: y
|
|
3736
3770
|
}, null, 8, ["current-page", "page-size", "total", "page-sizes"])
|
|
3737
|
-
])) :
|
|
3771
|
+
])) : X("", !0)
|
|
3738
3772
|
])
|
|
3739
3773
|
]),
|
|
3740
|
-
|
|
3774
|
+
J(Xe, {
|
|
3741
3775
|
modelValue: h.value,
|
|
3742
|
-
"onUpdate:modelValue": r[8] || (r[8] = (
|
|
3776
|
+
"onUpdate:modelValue": r[8] || (r[8] = (q) => h.value = q),
|
|
3743
3777
|
title: "粘贴数据",
|
|
3744
3778
|
layout: !1,
|
|
3745
3779
|
width: "560px"
|
|
3746
3780
|
}, {
|
|
3747
3781
|
default: S(() => [
|
|
3748
|
-
|
|
3749
|
-
modelValue:
|
|
3750
|
-
"onUpdate:modelValue": r[6] || (r[6] = (
|
|
3782
|
+
J(C(Me), {
|
|
3783
|
+
modelValue: j.value,
|
|
3784
|
+
"onUpdate:modelValue": r[6] || (r[6] = (q) => j.value = q),
|
|
3751
3785
|
type: "textarea",
|
|
3752
3786
|
rows: 8
|
|
3753
3787
|
}, null, 8, ["modelValue"]),
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
onClick: r[7] || (r[7] = (
|
|
3788
|
+
W("div", Ja, [
|
|
3789
|
+
J(C(ke), {
|
|
3790
|
+
onClick: r[7] || (r[7] = (q) => h.value = !1)
|
|
3757
3791
|
}, {
|
|
3758
3792
|
default: S(() => [...r[16] || (r[16] = [
|
|
3759
3793
|
me("取消", -1)
|
|
3760
3794
|
])]),
|
|
3761
3795
|
_: 1
|
|
3762
3796
|
}),
|
|
3763
|
-
|
|
3797
|
+
J(C(ke), {
|
|
3764
3798
|
type: "primary",
|
|
3765
3799
|
onClick: s
|
|
3766
3800
|
}, {
|
|
@@ -3778,7 +3812,7 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3778
3812
|
}, 16, ["model-value", "title", "width"]);
|
|
3779
3813
|
};
|
|
3780
3814
|
}
|
|
3781
|
-
}), zt = /* @__PURE__ */
|
|
3815
|
+
}), zt = /* @__PURE__ */ ze(Ya, [["__scopeId", "data-v-30377f54"]]), _a = /* @__PURE__ */ se({
|
|
3782
3816
|
name: "QyLegacySelectionDialog",
|
|
3783
3817
|
inheritAttrs: !1,
|
|
3784
3818
|
__name: "index",
|
|
@@ -3805,7 +3839,7 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3805
3839
|
},
|
|
3806
3840
|
emits: ["close", "submit", "openDialog", "changeIndexShow"],
|
|
3807
3841
|
setup(t, { expose: b, emit: w }) {
|
|
3808
|
-
const e = t, a = w,
|
|
3842
|
+
const e = t, a = w, A = pe(), u = U(null), c = Ze({
|
|
3809
3843
|
category: [],
|
|
3810
3844
|
code: "",
|
|
3811
3845
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
@@ -3825,10 +3859,10 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3825
3859
|
dialogOpen: !1,
|
|
3826
3860
|
pasteData: "",
|
|
3827
3861
|
pasteDataDialog: !1
|
|
3828
|
-
}), B =
|
|
3862
|
+
}), B = F(() => e.type || []), R = F(() => f.categories), K = async (y) => {
|
|
3829
3863
|
if (!e.query) return { data: { records: [], total: 0 } };
|
|
3830
|
-
const $ = await e.query(i(y)),
|
|
3831
|
-
return f.total =
|
|
3864
|
+
const $ = await e.query(i(y)), N = e.responseFormatter ? await e.responseFormatter($) : $;
|
|
3865
|
+
return f.total = M(N), N;
|
|
3832
3866
|
};
|
|
3833
3867
|
re(
|
|
3834
3868
|
() => e.open,
|
|
@@ -3868,36 +3902,36 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3868
3902
|
), re(
|
|
3869
3903
|
() => e.open,
|
|
3870
3904
|
async (y) => {
|
|
3871
|
-
y && (f.dialogOpen = !1, await
|
|
3905
|
+
y && (f.dialogOpen = !1, await I());
|
|
3872
3906
|
},
|
|
3873
3907
|
{ immediate: !0 }
|
|
3874
3908
|
);
|
|
3875
|
-
async function
|
|
3909
|
+
async function I() {
|
|
3876
3910
|
if (!e.category) {
|
|
3877
3911
|
f.categories = [];
|
|
3878
3912
|
return;
|
|
3879
3913
|
}
|
|
3880
3914
|
const y = typeof e.category == "function" ? await e.category() : e.category;
|
|
3881
|
-
f.categories =
|
|
3915
|
+
f.categories = v(y);
|
|
3882
3916
|
}
|
|
3883
|
-
async function
|
|
3917
|
+
async function Q() {
|
|
3884
3918
|
var y;
|
|
3885
3919
|
return await De(), (y = u.value) == null ? void 0 : y.handleQuerySearch();
|
|
3886
3920
|
}
|
|
3887
3921
|
function h(y) {
|
|
3888
3922
|
f.selection = le(y);
|
|
3889
3923
|
}
|
|
3890
|
-
function
|
|
3924
|
+
function j(y) {
|
|
3891
3925
|
var $;
|
|
3892
3926
|
f.tableData = y, f.tableRef = ($ = u.value) == null ? void 0 : $.getTableRef();
|
|
3893
3927
|
}
|
|
3894
|
-
function
|
|
3928
|
+
function P(y) {
|
|
3895
3929
|
f.selection = le(y), a("submit", f);
|
|
3896
3930
|
}
|
|
3897
|
-
function
|
|
3931
|
+
function G() {
|
|
3898
3932
|
a("close");
|
|
3899
3933
|
}
|
|
3900
|
-
function
|
|
3934
|
+
function E() {
|
|
3901
3935
|
f.dialogOpen = !0, a("openDialog");
|
|
3902
3936
|
}
|
|
3903
3937
|
function d(y) {
|
|
@@ -3909,67 +3943,67 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3909
3943
|
...c,
|
|
3910
3944
|
[e.searchKey]: y[e.mainKey],
|
|
3911
3945
|
category: []
|
|
3912
|
-
}),
|
|
3913
|
-
|
|
3914
|
-
(m) => m[e.mainKey] !==
|
|
3915
|
-
), f.selection.push(
|
|
3946
|
+
}), N = e.responseFormatter ? await e.responseFormatter($) : $, [z] = n(N);
|
|
3947
|
+
z && (e.selection === "multi" ? (f.selection = f.selection.filter(
|
|
3948
|
+
(m) => m[e.mainKey] !== z[e.mainKey]
|
|
3949
|
+
), f.selection.push(z)) : f.selection = [z]);
|
|
3916
3950
|
}
|
|
3917
3951
|
function i(y = {}) {
|
|
3918
3952
|
c.page = y.page ?? c.page, c.pageSize = y.pageSize ?? c.pageSize;
|
|
3919
3953
|
const $ = {
|
|
3920
3954
|
...c,
|
|
3921
|
-
category:
|
|
3955
|
+
category: Z()
|
|
3922
3956
|
};
|
|
3923
3957
|
return e.searchKey && ($[e.searchKey] = String($[e.searchKey] || "").trim()), $;
|
|
3924
3958
|
}
|
|
3925
|
-
function
|
|
3959
|
+
function Z() {
|
|
3926
3960
|
if (e.queryParams.category)
|
|
3927
3961
|
return e.queryParams.category;
|
|
3928
3962
|
const y = c.category;
|
|
3929
3963
|
if (Array.isArray(y)) return y;
|
|
3930
3964
|
if (!y) return [];
|
|
3931
|
-
const $ =
|
|
3932
|
-
return $ ?
|
|
3933
|
-
}
|
|
3934
|
-
function
|
|
3935
|
-
for (const
|
|
3936
|
-
if (
|
|
3937
|
-
const
|
|
3938
|
-
if (
|
|
3965
|
+
const $ = Y(f.categories, y);
|
|
3966
|
+
return $ ? k($) : [y];
|
|
3967
|
+
}
|
|
3968
|
+
function Y(y, $) {
|
|
3969
|
+
for (const N of y || []) {
|
|
3970
|
+
if (N.value === $) return N;
|
|
3971
|
+
const z = Y(N.children || [], $);
|
|
3972
|
+
if (z) return z;
|
|
3939
3973
|
}
|
|
3940
3974
|
}
|
|
3941
|
-
function
|
|
3942
|
-
return [y.value, ...(y.children || []).flatMap(
|
|
3975
|
+
function k(y) {
|
|
3976
|
+
return [y.value, ...(y.children || []).flatMap(k)];
|
|
3943
3977
|
}
|
|
3944
|
-
function
|
|
3978
|
+
function v(y) {
|
|
3945
3979
|
const $ = (y == null ? void 0 : y.data) ?? y;
|
|
3946
3980
|
if (!Array.isArray($)) return [];
|
|
3947
3981
|
if (typeof e.categoryFormatter == "function")
|
|
3948
3982
|
return e.categoryFormatter($);
|
|
3949
3983
|
if (Array.isArray(e.categoryFormatter)) {
|
|
3950
|
-
const [
|
|
3951
|
-
return l(
|
|
3984
|
+
const [N, z] = e.categoryFormatter;
|
|
3985
|
+
return l(D($, z), N, z);
|
|
3952
3986
|
}
|
|
3953
3987
|
return $;
|
|
3954
3988
|
}
|
|
3955
|
-
function
|
|
3956
|
-
const
|
|
3957
|
-
return
|
|
3958
|
-
const
|
|
3959
|
-
if (!
|
|
3960
|
-
|
|
3989
|
+
function D(y, $) {
|
|
3990
|
+
const N = y.map((m) => ({ ...m })), z = [];
|
|
3991
|
+
return N.forEach((m) => {
|
|
3992
|
+
const _ = m.parentCateCode;
|
|
3993
|
+
if (!_) {
|
|
3994
|
+
z.push(m);
|
|
3961
3995
|
return;
|
|
3962
3996
|
}
|
|
3963
|
-
const ae =
|
|
3964
|
-
ae ? (ae.children || (ae.children = [])).push(m) :
|
|
3965
|
-
}),
|
|
3966
|
-
}
|
|
3967
|
-
function l(y, $,
|
|
3968
|
-
return y.map((
|
|
3969
|
-
...
|
|
3970
|
-
label:
|
|
3971
|
-
value:
|
|
3972
|
-
children: Array.isArray(
|
|
3997
|
+
const ae = N.find((ve) => ve[$] === _);
|
|
3998
|
+
ae ? (ae.children || (ae.children = [])).push(m) : z.push(m);
|
|
3999
|
+
}), z;
|
|
4000
|
+
}
|
|
4001
|
+
function l(y, $, N) {
|
|
4002
|
+
return y.map((z) => ({
|
|
4003
|
+
...z,
|
|
4004
|
+
label: z[$],
|
|
4005
|
+
value: z[N],
|
|
4006
|
+
children: Array.isArray(z.children) ? l(z.children, $, N) : z.children
|
|
3973
4007
|
}));
|
|
3974
4008
|
}
|
|
3975
4009
|
function n(y) {
|
|
@@ -3977,128 +4011,128 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
3977
4011
|
const $ = y == null ? void 0 : y.data;
|
|
3978
4012
|
return Array.isArray($) ? $ : (y == null ? void 0 : y.records) || (y == null ? void 0 : y.rows) || ($ == null ? void 0 : $.records) || [];
|
|
3979
4013
|
}
|
|
3980
|
-
function
|
|
4014
|
+
function M(y) {
|
|
3981
4015
|
if (Array.isArray(y)) return y.length;
|
|
3982
|
-
const $ = n(y),
|
|
3983
|
-
return (y == null ? void 0 : y.total) ?? (Array.isArray(
|
|
4016
|
+
const $ = n(y), N = y == null ? void 0 : y.data;
|
|
4017
|
+
return (y == null ? void 0 : y.total) ?? (Array.isArray(N) ? N.length : N == null ? void 0 : N.total) ?? $.length;
|
|
3984
4018
|
}
|
|
3985
4019
|
function le(y = []) {
|
|
3986
4020
|
return y.map(($) => ({ ...$ }));
|
|
3987
4021
|
}
|
|
3988
4022
|
return b({
|
|
3989
|
-
search:
|
|
3990
|
-
handleSearch:
|
|
3991
|
-
handleConditionChange:
|
|
4023
|
+
search: Q,
|
|
4024
|
+
handleSearch: Q,
|
|
4025
|
+
handleConditionChange: Q,
|
|
3992
4026
|
getTableRef: () => f.tableRef,
|
|
3993
4027
|
getTableData: () => f.tableData,
|
|
3994
4028
|
getSelection: () => le(f.selection)
|
|
3995
|
-
}), (y, $) => (V(),
|
|
3996
|
-
|
|
4029
|
+
}), (y, $) => (V(), H(Be, null, [
|
|
4030
|
+
J(zt, ie({
|
|
3997
4031
|
ref_key: "selectionDialogRef",
|
|
3998
4032
|
ref: u
|
|
3999
|
-
}, C(
|
|
4033
|
+
}, C(A), {
|
|
4000
4034
|
modelValue: f.selection,
|
|
4001
|
-
"onUpdate:modelValue": $[3] || ($[3] = (
|
|
4035
|
+
"onUpdate:modelValue": $[3] || ($[3] = (N) => f.selection = N),
|
|
4002
4036
|
open: t.open,
|
|
4003
4037
|
title: t.title,
|
|
4004
4038
|
width: t.width,
|
|
4005
|
-
query:
|
|
4039
|
+
query: K,
|
|
4006
4040
|
"response-formatter": t.responseFormatter,
|
|
4007
4041
|
selection: t.selection,
|
|
4008
4042
|
"row-key": t.mainKey,
|
|
4009
4043
|
"label-key": t.tagName,
|
|
4010
4044
|
"search-key": t.searchKey,
|
|
4011
4045
|
"query-params": {},
|
|
4012
|
-
"category-options":
|
|
4046
|
+
"category-options": R.value,
|
|
4013
4047
|
"type-options": B.value,
|
|
4014
4048
|
"type-select-props": t.typeSelectionProps,
|
|
4015
4049
|
"table-props": t.tableProps,
|
|
4016
4050
|
"show-copy-paste": !0,
|
|
4017
4051
|
"show-append": t.append,
|
|
4018
4052
|
onSelectionChange: h,
|
|
4019
|
-
onConfirm:
|
|
4020
|
-
onCancel:
|
|
4021
|
-
onAppend:
|
|
4022
|
-
onLoaded:
|
|
4053
|
+
onConfirm: P,
|
|
4054
|
+
onCancel: G,
|
|
4055
|
+
onAppend: E,
|
|
4056
|
+
onLoaded: j
|
|
4023
4057
|
}), {
|
|
4024
4058
|
side: S(() => [
|
|
4025
|
-
|
|
4059
|
+
O(y.$slots, "side", {
|
|
4026
4060
|
state: f,
|
|
4027
4061
|
cate: f.categories,
|
|
4028
4062
|
form: c,
|
|
4029
4063
|
query: c,
|
|
4030
|
-
getData:
|
|
4031
|
-
search:
|
|
4064
|
+
getData: Q,
|
|
4065
|
+
search: Q,
|
|
4032
4066
|
changeIndexShow: d
|
|
4033
4067
|
}, void 0, !0)
|
|
4034
4068
|
]),
|
|
4035
4069
|
search: S(() => [
|
|
4036
|
-
|
|
4070
|
+
J(C(kt), {
|
|
4037
4071
|
inline: "",
|
|
4038
4072
|
model: c
|
|
4039
4073
|
}, {
|
|
4040
4074
|
default: S(() => [
|
|
4041
|
-
f.categories.length ? (V(),
|
|
4075
|
+
f.categories.length ? (V(), ee(C(Ie), {
|
|
4042
4076
|
key: 0,
|
|
4043
4077
|
label: "分类"
|
|
4044
4078
|
}, {
|
|
4045
4079
|
default: S(() => [
|
|
4046
|
-
|
|
4080
|
+
J(C(wt), {
|
|
4047
4081
|
modelValue: c.category,
|
|
4048
|
-
"onUpdate:modelValue": $[0] || ($[0] = (
|
|
4082
|
+
"onUpdate:modelValue": $[0] || ($[0] = (N) => c.category = N),
|
|
4049
4083
|
class: "qy-legacy-selection-dialog__category",
|
|
4050
4084
|
data: f.categories,
|
|
4051
4085
|
clearable: "",
|
|
4052
4086
|
filterable: "",
|
|
4053
4087
|
"check-strictly": "",
|
|
4054
4088
|
"render-after-expand": !1,
|
|
4055
|
-
onChange:
|
|
4089
|
+
onChange: Q
|
|
4056
4090
|
}, null, 8, ["modelValue", "data"])
|
|
4057
4091
|
]),
|
|
4058
4092
|
_: 1
|
|
4059
|
-
})) :
|
|
4060
|
-
B.value.length ? (V(),
|
|
4093
|
+
})) : X("", !0),
|
|
4094
|
+
B.value.length ? (V(), ee(C(Ie), {
|
|
4061
4095
|
key: 1,
|
|
4062
4096
|
label: "类型"
|
|
4063
4097
|
}, {
|
|
4064
4098
|
default: S(() => [
|
|
4065
|
-
|
|
4099
|
+
J(C(tt), ie({
|
|
4066
4100
|
modelValue: c.type,
|
|
4067
|
-
"onUpdate:modelValue": $[1] || ($[1] = (
|
|
4101
|
+
"onUpdate:modelValue": $[1] || ($[1] = (N) => c.type = N),
|
|
4068
4102
|
clearable: ""
|
|
4069
|
-
}, t.typeSelectionProps, { onChange:
|
|
4103
|
+
}, t.typeSelectionProps, { onChange: Q }), {
|
|
4070
4104
|
default: S(() => [
|
|
4071
|
-
(V(!0),
|
|
4072
|
-
key:
|
|
4073
|
-
label:
|
|
4074
|
-
value:
|
|
4105
|
+
(V(!0), H(Be, null, Ue(B.value, (N) => (V(), ee(C(lt), {
|
|
4106
|
+
key: N.value,
|
|
4107
|
+
label: N.label,
|
|
4108
|
+
value: N.value
|
|
4075
4109
|
}, null, 8, ["label", "value"]))), 128))
|
|
4076
4110
|
]),
|
|
4077
4111
|
_: 1
|
|
4078
4112
|
}, 16, ["modelValue"])
|
|
4079
4113
|
]),
|
|
4080
4114
|
_: 1
|
|
4081
|
-
})) :
|
|
4082
|
-
t.searchKey ? (V(),
|
|
4115
|
+
})) : X("", !0),
|
|
4116
|
+
t.searchKey ? (V(), ee(C(Ie), {
|
|
4083
4117
|
key: 2,
|
|
4084
4118
|
label: "搜索"
|
|
4085
4119
|
}, {
|
|
4086
4120
|
default: S(() => [
|
|
4087
|
-
|
|
4121
|
+
J(C(Me), {
|
|
4088
4122
|
modelValue: c[t.searchKey],
|
|
4089
|
-
"onUpdate:modelValue": $[2] || ($[2] = (
|
|
4123
|
+
"onUpdate:modelValue": $[2] || ($[2] = (N) => c[t.searchKey] = N),
|
|
4090
4124
|
clearable: "",
|
|
4091
4125
|
class: "qy-legacy-selection-dialog__search-input",
|
|
4092
|
-
onKeydown:
|
|
4126
|
+
onKeydown: Ke(ue(Q, ["prevent"]), ["enter"])
|
|
4093
4127
|
}, null, 8, ["modelValue", "onKeydown"])
|
|
4094
4128
|
]),
|
|
4095
4129
|
_: 1
|
|
4096
|
-
})) :
|
|
4097
|
-
|
|
4130
|
+
})) : X("", !0),
|
|
4131
|
+
J(C(Ie), null, {
|
|
4098
4132
|
default: S(() => [
|
|
4099
|
-
|
|
4133
|
+
J(C(ke), {
|
|
4100
4134
|
type: "primary",
|
|
4101
|
-
onClick:
|
|
4135
|
+
onClick: Q
|
|
4102
4136
|
}, {
|
|
4103
4137
|
default: S(() => [...$[4] || ($[4] = [
|
|
4104
4138
|
me("查询", -1)
|
|
@@ -4113,31 +4147,31 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
4113
4147
|
}, 8, ["model"])
|
|
4114
4148
|
]),
|
|
4115
4149
|
toolbar: S(() => [
|
|
4116
|
-
|
|
4150
|
+
O(y.$slots, "bar", {
|
|
4117
4151
|
query: c,
|
|
4118
|
-
search:
|
|
4152
|
+
search: Q
|
|
4119
4153
|
}, void 0, !0)
|
|
4120
4154
|
]),
|
|
4121
4155
|
columns: S(() => [
|
|
4122
|
-
|
|
4123
|
-
|
|
4156
|
+
O(y.$slots, "cols", {}, void 0, !0),
|
|
4157
|
+
O(y.$slots, "columns", {}, void 0, !0)
|
|
4124
4158
|
]),
|
|
4125
4159
|
_: 3
|
|
4126
4160
|
}, 16, ["modelValue", "open", "title", "width", "response-formatter", "selection", "row-key", "label-key", "search-key", "category-options", "type-options", "type-select-props", "table-props", "show-append"]),
|
|
4127
|
-
|
|
4161
|
+
O(y.$slots, "dialog", {
|
|
4128
4162
|
state: f,
|
|
4129
4163
|
form: c,
|
|
4130
|
-
getData:
|
|
4164
|
+
getData: Q
|
|
4131
4165
|
}, void 0, !0)
|
|
4132
4166
|
], 64));
|
|
4133
4167
|
}
|
|
4134
|
-
}),
|
|
4168
|
+
}), en = /* @__PURE__ */ ze(_a, [["__scopeId", "data-v-b54ca11b"]]), tn = { class: "qy-form-section__heading" }, ln = {
|
|
4135
4169
|
key: 0,
|
|
4136
4170
|
class: "qy-form-section__title"
|
|
4137
|
-
},
|
|
4171
|
+
}, an = {
|
|
4138
4172
|
key: 0,
|
|
4139
4173
|
class: "qy-form-section__description"
|
|
4140
|
-
},
|
|
4174
|
+
}, nn = { class: "qy-form-section__actions" }, on = /* @__PURE__ */ se({
|
|
4141
4175
|
name: "QyFormSection",
|
|
4142
4176
|
__name: "index",
|
|
4143
4177
|
props: {
|
|
@@ -4154,20 +4188,20 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
4154
4188
|
},
|
|
4155
4189
|
emits: ["toggle"],
|
|
4156
4190
|
setup(t, { emit: b }) {
|
|
4157
|
-
const w = t, e = b, a =
|
|
4191
|
+
const w = t, e = b, a = U(w.defaultExpanded);
|
|
4158
4192
|
re(
|
|
4159
4193
|
() => w.defaultExpanded,
|
|
4160
4194
|
(c) => {
|
|
4161
4195
|
a.value = c;
|
|
4162
4196
|
}
|
|
4163
4197
|
);
|
|
4164
|
-
function
|
|
4198
|
+
function A() {
|
|
4165
4199
|
w.collapsible && (a.value = !a.value, e("toggle", a.value));
|
|
4166
4200
|
}
|
|
4167
4201
|
function u() {
|
|
4168
|
-
w.collapsible &&
|
|
4202
|
+
w.collapsible && A();
|
|
4169
4203
|
}
|
|
4170
|
-
return (c, f) => (V(),
|
|
4204
|
+
return (c, f) => (V(), H("section", {
|
|
4171
4205
|
class: he(["qy-form-section", [
|
|
4172
4206
|
`is-bg-${t.background}`,
|
|
4173
4207
|
{
|
|
@@ -4176,53 +4210,53 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
4176
4210
|
}
|
|
4177
4211
|
]])
|
|
4178
4212
|
}, [
|
|
4179
|
-
|
|
4213
|
+
W("header", {
|
|
4180
4214
|
class: he(["qy-form-section__header", t.headerClass]),
|
|
4181
4215
|
onClick: u
|
|
4182
4216
|
}, [
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
t.title ? (V(),
|
|
4217
|
+
W("div", tn, [
|
|
4218
|
+
O(c.$slots, "title", {}, () => [
|
|
4219
|
+
t.title ? (V(), H("div", ln, fe(t.title), 1)) : X("", !0)
|
|
4186
4220
|
], !0),
|
|
4187
|
-
|
|
4188
|
-
t.description ? (V(),
|
|
4221
|
+
O(c.$slots, "description", {}, () => [
|
|
4222
|
+
t.description ? (V(), H("div", an, fe(t.description), 1)) : X("", !0)
|
|
4189
4223
|
], !0)
|
|
4190
4224
|
]),
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
t.collapsible ? (V(),
|
|
4225
|
+
W("div", nn, [
|
|
4226
|
+
O(c.$slots, "actions", {}, void 0, !0),
|
|
4227
|
+
t.collapsible ? (V(), H("button", {
|
|
4194
4228
|
key: 0,
|
|
4195
4229
|
type: "button",
|
|
4196
4230
|
class: "qy-form-section__toggle",
|
|
4197
|
-
onClick: ue(
|
|
4198
|
-
}, fe(a.value ? "收起" : "展开"), 1)) :
|
|
4231
|
+
onClick: ue(A, ["stop"])
|
|
4232
|
+
}, fe(a.value ? "收起" : "展开"), 1)) : X("", !0)
|
|
4199
4233
|
])
|
|
4200
4234
|
], 2),
|
|
4201
|
-
et(
|
|
4235
|
+
et(W("div", {
|
|
4202
4236
|
class: he(["qy-form-section__body", t.bodyClass])
|
|
4203
4237
|
}, [
|
|
4204
|
-
|
|
4205
|
-
t.tip ? (V(),
|
|
4238
|
+
O(c.$slots, "tip", {}, () => [
|
|
4239
|
+
t.tip ? (V(), H("div", {
|
|
4206
4240
|
key: 0,
|
|
4207
4241
|
class: he(["qy-form-section__tip", `is-${t.tipType}`])
|
|
4208
|
-
}, fe(t.tip), 3)) :
|
|
4242
|
+
}, fe(t.tip), 3)) : X("", !0)
|
|
4209
4243
|
], !0),
|
|
4210
|
-
|
|
4244
|
+
O(c.$slots, "default", {}, void 0, !0)
|
|
4211
4245
|
], 2), [
|
|
4212
|
-
[
|
|
4246
|
+
[ht, a.value]
|
|
4213
4247
|
])
|
|
4214
4248
|
], 2));
|
|
4215
4249
|
}
|
|
4216
|
-
}),
|
|
4250
|
+
}), rn = /* @__PURE__ */ ze(on, [["__scopeId", "data-v-8149aa01"]]), un = {
|
|
4217
4251
|
key: 0,
|
|
4218
4252
|
class: "qy-action-bar__left"
|
|
4219
|
-
},
|
|
4253
|
+
}, sn = {
|
|
4220
4254
|
key: 1,
|
|
4221
4255
|
class: "qy-action-bar__center"
|
|
4222
|
-
},
|
|
4256
|
+
}, dn = {
|
|
4223
4257
|
key: 2,
|
|
4224
4258
|
class: "qy-action-bar__right"
|
|
4225
|
-
},
|
|
4259
|
+
}, cn = /* @__PURE__ */ se({
|
|
4226
4260
|
name: "QyActionBar",
|
|
4227
4261
|
__name: "index",
|
|
4228
4262
|
props: {
|
|
@@ -4235,12 +4269,12 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
4235
4269
|
background: { default: "#fff" }
|
|
4236
4270
|
},
|
|
4237
4271
|
setup(t) {
|
|
4238
|
-
const b = t, w =
|
|
4272
|
+
const b = t, w = F(() => ({
|
|
4239
4273
|
// offsetBottom 只负责业务偏移,安全区补偿由 CSS padding 处理。
|
|
4240
4274
|
bottom: `${b.offsetBottom}px`,
|
|
4241
4275
|
background: b.background
|
|
4242
4276
|
}));
|
|
4243
|
-
return (e, a) => (V(),
|
|
4277
|
+
return (e, a) => (V(), H("div", {
|
|
4244
4278
|
class: he(["qy-action-bar", [
|
|
4245
4279
|
`is-justify-${t.justify}`,
|
|
4246
4280
|
{
|
|
@@ -4252,30 +4286,30 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
4252
4286
|
]]),
|
|
4253
4287
|
style: Ae(w.value)
|
|
4254
4288
|
}, [
|
|
4255
|
-
e.$slots.left ? (V(),
|
|
4256
|
-
|
|
4257
|
-
])) :
|
|
4258
|
-
e.$slots.default ? (V(),
|
|
4259
|
-
|
|
4260
|
-
])) :
|
|
4261
|
-
e.$slots.right ? (V(),
|
|
4262
|
-
|
|
4263
|
-
])) :
|
|
4289
|
+
e.$slots.left ? (V(), H("div", un, [
|
|
4290
|
+
O(e.$slots, "left", {}, void 0, !0)
|
|
4291
|
+
])) : X("", !0),
|
|
4292
|
+
e.$slots.default ? (V(), H("div", sn, [
|
|
4293
|
+
O(e.$slots, "default", {}, void 0, !0)
|
|
4294
|
+
])) : X("", !0),
|
|
4295
|
+
e.$slots.right ? (V(), H("div", dn, [
|
|
4296
|
+
O(e.$slots, "right", {}, void 0, !0)
|
|
4297
|
+
])) : X("", !0)
|
|
4264
4298
|
], 6));
|
|
4265
4299
|
}
|
|
4266
|
-
}),
|
|
4300
|
+
}), fn = /* @__PURE__ */ ze(cn, [["__scopeId", "data-v-ecba8f49"]]), qt = oe(Vt, "QyUpload"), It = oe(_l, "QyImage"), Rt = oe(ea, "QyImagePreview"), At = oe(ta, "QyImageUpload"), Tt = oe(Xe, "QyDialog"), Pt = oe(xa, "QyRemarkImage"), Mt = oe(Ca, "QyInput"), Ft = oe($a, "QyInputNumber"), Ot = oe(Ba, "QyMoneyInput"), Qt = oe(za, "QyDatePicker"), Dt = oe(qa, "QyCheckbox"), Ut = oe(Ia, "QyAutocomplete"), Kt = oe(ql, "QyMenuActions"), Et = oe(
|
|
4267
4301
|
Il,
|
|
4268
4302
|
"QyTableColumnSettings"
|
|
4269
|
-
), Lt = oe(
|
|
4270
|
-
|
|
4303
|
+
), Lt = oe(Ra, "QyRadioGroup"), jt = oe(Aa, "QyRemoteSelect"), Nt = oe($t, "QySearchInput"), Ht = oe(
|
|
4304
|
+
Ea,
|
|
4271
4305
|
"QyRecordQuoteSearch"
|
|
4272
|
-
), Wt = oe(
|
|
4273
|
-
|
|
4306
|
+
), Wt = oe(at, "QySelect"), Zt = oe(Bt, "QyTreeSelect"), Gt = oe(zt, "QySelectionDialog"), Xt = oe(
|
|
4307
|
+
en,
|
|
4274
4308
|
"QyLegacySelectionDialog"
|
|
4275
|
-
), Jt = oe(
|
|
4309
|
+
), Jt = oe(rn, "QyFormSection"), Yt = oe(fn, "QyActionBar"), mn = (t) => {
|
|
4276
4310
|
t.component("QyDialog", Tt), t.component("QyUpload", qt), t.component("QyImage", It), t.component("QyImagePreview", Rt), t.component("QyImageUpload", At), t.component("QyRemarkImage", Pt), t.component("QyInput", Mt), t.component("QyInputNumber", Ft), t.component("QyMoneyInput", Ot), t.component("QyDatePicker", Qt), t.component("QyCheckbox", Dt), t.component("QyAutocomplete", Ut), t.component("QyMenuActions", Kt), t.component("QyTableColumnSettings", Et), t.component("QyRadioGroup", Lt), t.component("QyRemoteSelect", jt), t.component("QySearchInput", Nt), t.component("QyRecordQuoteSearch", Ht), t.component("QySelect", Wt), t.component("QyTreeSelect", Zt), t.component("QySelectionDialog", Gt), t.component("QyLegacySelectionDialog", Xt), t.component("QyFormSection", Jt), t.component("QyActionBar", Yt);
|
|
4277
|
-
},
|
|
4278
|
-
install:
|
|
4311
|
+
}, Vn = {
|
|
4312
|
+
install: mn,
|
|
4279
4313
|
QyUpload: qt,
|
|
4280
4314
|
QyImage: It,
|
|
4281
4315
|
QyImagePreview: Rt,
|
|
@@ -4303,8 +4337,8 @@ const pa = { class: "qy-remark-image__field" }, ya = { class: "qy-remark-image__
|
|
|
4303
4337
|
QyRemarkImage: Pt
|
|
4304
4338
|
};
|
|
4305
4339
|
export {
|
|
4306
|
-
|
|
4307
|
-
|
|
4340
|
+
ft as A,
|
|
4341
|
+
mt as B,
|
|
4308
4342
|
Yt as Q,
|
|
4309
4343
|
Ut as a,
|
|
4310
4344
|
Dt as b,
|
|
@@ -4329,7 +4363,7 @@ export {
|
|
|
4329
4363
|
Et as u,
|
|
4330
4364
|
Zt as v,
|
|
4331
4365
|
qt as w,
|
|
4332
|
-
|
|
4366
|
+
Vn as x,
|
|
4333
4367
|
ma as y,
|
|
4334
4368
|
xt as z
|
|
4335
4369
|
};
|