@qynpm/ui 1.0.23 → 1.0.24
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 +222 -48
- package/dist/index.cjs +15 -5
- package/dist/index.mjs +50 -33
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-button/index.cjs +1 -1
- package/dist/qy-button/index.mjs +1 -1
- package/dist/qy-checkbox/index.cjs +1 -1
- package/dist/qy-checkbox/index.mjs +4 -3
- package/dist/qy-checkbox-group/index.cjs +1 -0
- package/dist/qy-checkbox-group/index.mjs +7 -0
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +4 -3
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +2 -2
- package/dist/qy-dropdown/index.cjs +1 -1
- package/dist/qy-dropdown/index.mjs +1 -1
- package/dist/qy-file-picker/index.cjs +1 -0
- package/dist/qy-file-picker/index.mjs +7 -0
- 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-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-input/index.cjs +2 -2
- package/dist/qy-input/index.mjs +6 -3
- package/dist/qy-input-number/index.cjs +1 -1
- package/dist/qy-input-number/index.mjs +4 -3
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +2 -2
- package/dist/qy-menu-actions/index.cjs +1 -1
- package/dist/qy-menu-actions/index.mjs +1 -1
- package/dist/qy-money-input/index.cjs +1 -1
- package/dist/qy-money-input/index.mjs +2 -2
- package/dist/qy-popover/index.cjs +2 -0
- package/dist/qy-popover/index.mjs +8 -0
- package/dist/qy-radio/index.cjs +1 -0
- package/dist/qy-radio/index.mjs +7 -0
- package/dist/qy-radio-group/index.cjs +1 -1
- package/dist/qy-radio-group/index.mjs +5 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +4 -3
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-switch/index.cjs +1 -0
- package/dist/qy-switch/index.mjs +7 -0
- package/dist/qy-table-column-settings/index.cjs +1 -1
- package/dist/qy-table-column-settings/index.mjs +1 -1
- package/dist/qy-tag/index.cjs +1 -0
- package/dist/qy-tag/index.mjs +7 -0
- package/dist/qy-tooltip/index.cjs +2 -0
- package/dist/qy-tooltip/index.mjs +8 -0
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/index-8u4DJZwd.mjs +90 -0
- package/dist/shared/index-9WJeVamR.cjs +1 -0
- package/dist/shared/index-BDFscU3G.mjs +72 -0
- package/dist/shared/index-BYme5QGm.cjs +1 -0
- package/dist/shared/index-B_mI-37S.cjs +1 -0
- package/dist/shared/index-BrV6CR4H.mjs +54 -0
- package/dist/shared/index-C8CA7nkO.cjs +1 -0
- package/dist/shared/index-CTtAQ1LD.cjs +1 -0
- package/dist/shared/index-CczrP1H7.mjs +149 -0
- package/dist/shared/index-ClmefDi6.cjs +1 -0
- package/dist/shared/{index-D7lMppIb.mjs → index-DJnmpqCc.mjs} +63 -63
- package/dist/shared/index-DYohs_aV.mjs +225 -0
- package/dist/shared/index-DixSXWJj.mjs +68 -0
- package/dist/shared/index-aiJ7R6G-.cjs +1 -0
- package/dist/shared/{index-ZLoAI88M.mjs → index-c7lnX4vT.mjs} +1327 -1389
- package/dist/shared/index-dEWJKTS-.cjs +1 -0
- package/dist/shared/index-fBuu4V3A.mjs +129 -0
- package/dist/shared/index-wIXCDvwC.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BF82tses.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BNjoxcAR.mjs +61 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DmmW8UUK.mjs +106 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-tyM4_aoa.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BZQLyvw8.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BtbAft4t.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs +166 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DSur831A.mjs +68 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs +132 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Dm1r1WBK.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Q2gFF0PP.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs +140 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-ztD-It-2.mjs +121 -0
- package/index.d.ts +155 -17
- package/package.json +43 -1
- package/qy-checkbox/index.d.ts +42 -2
- package/qy-checkbox-group/index.d.ts +48 -0
- package/qy-date-picker/index.d.ts +140 -5
- package/qy-file-picker/index.d.ts +49 -0
- package/qy-input/index.d.ts +50 -5
- package/qy-input-number/index.d.ts +45 -5
- package/qy-popover/index.d.ts +63 -0
- package/qy-radio/index.d.ts +44 -0
- package/qy-radio-group/index.d.ts +60 -12
- package/qy-select/index.d.ts +67 -5
- package/qy-switch/index.d.ts +46 -0
- package/qy-tag/index.d.ts +44 -0
- package/qy-tooltip/index.d.ts +54 -0
- package/dist/shared/index-B3U7dqMt.cjs +0 -1
- package/dist/shared/index-BbpD7hM0.cjs +0 -1
- package/dist/shared/index-D3l7tLgw.cjs +0 -1
- package/dist/shared/index-NCpeoBUZ.mjs +0 -153
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BJakDlgd.mjs +0 -70
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CelW13DE.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DA1Nh7U1.mjs +0 -130
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DEpXmMj5.mjs +0 -162
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DNEVwqm7.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DfKTEci_.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-gTkP1LWg.mjs +0 -61
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-svvSFv2K.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B_A4Nq6v.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DKFiK2fQ.mjs +0 -152
- /package/dist/shared/{index-CagHZ25z.mjs → index-BYLXkIxS.mjs} +0 -0
- /package/dist/shared/{index-CRZsiNVW.cjs → index-C1p86ezL.cjs} +0 -0
- /package/dist/shared/{index-BO5aWk3f.cjs → index-ClUqUsAv.cjs} +0 -0
- /package/dist/shared/{index-CSxCewXP.mjs → index-Cy_Glkc-.mjs} +0 -0
- /package/dist/shared/{index-BXlQSIWX.mjs → index-DMGXEAyl.mjs} +0 -0
- /package/dist/shared/{index-DyK6vf5h.cjs → index-M4vEHYZ_.cjs} +0 -0
|
@@ -1,35 +1,43 @@
|
|
|
1
|
-
import { ElUpload as
|
|
2
|
-
import { ref as
|
|
3
|
-
import { Plus as
|
|
4
|
-
import { ElMessage as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { I as
|
|
7
|
-
import { _ as
|
|
8
|
-
import
|
|
9
|
-
import { useBreakpoints as
|
|
10
|
-
import { B as
|
|
11
|
-
import { D as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import {
|
|
16
|
-
import { _ as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
1
|
+
import { ElUpload as na, ElIcon as dt, ElPopover as ia, ElInput as ra, ElImageViewer as sa, ElDialog as ct, ElLoadingDirective as ua } from "element-plus/es";
|
|
2
|
+
import { ref as q, onMounted as Xe, computed as F, watch as fe, nextTick as De, onBeforeUnmount as ft, openBlock as v, createElementBlock as Q, normalizeStyle as Pe, normalizeClass as ke, createVNode as O, withCtx as h, withModifiers as ue, unref as C, Fragment as Fe, createElementVNode as R, toDisplayString as ye, createCommentVNode as T, createBlock as de, createTextVNode as we, useAttrs as Qe, mergeProps as Ve, defineComponent as Be, useSlots as pt, useModel as da, watchEffect as ca, h as nt, onUnmounted as mt, resolveComponent as fa, createSlots as Ue, renderSlot as I, withDirectives as Ye, vShow as yt, mergeModels as it, renderList as et, withKeys as je, normalizeProps as gt, guardReactiveProps as vt, getCurrentInstance as pa, reactive as _e } from "vue";
|
|
3
|
+
import { Plus as ma, InfoFilled as ya } from "@element-plus/icons-vue";
|
|
4
|
+
import { ElMessage as be, ElLoading as ga, ElButton as qe, ElSelect as ht, ElOption as bt, ElInput as Oe, ElPopover as va, ElUpload as ha, ElAutocomplete as ba, ElForm as wt, ElFormItem as ze, ElTable as wa, ElTableColumn as Sa, ElPagination as ka, ElTreeSelect as xa } from "element-plus";
|
|
5
|
+
import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
+
import { I as Va } from "./index-DMGXEAyl.mjs";
|
|
7
|
+
import { _ as Ca } from "./index.vue_vue_type_script_setup_true_lang-DoL8xnpo.mjs";
|
|
8
|
+
import $a from "clsx";
|
|
9
|
+
import { useBreakpoints as qa, useDraggable as Ba } from "@vueuse/core";
|
|
10
|
+
import { B as Qa } from "./index-Cy_Glkc-.mjs";
|
|
11
|
+
import { D as Aa } from "./index-BYLXkIxS.mjs";
|
|
12
|
+
import { _ as za } from "./index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs";
|
|
13
|
+
import { _ as Ra } from "./index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs";
|
|
14
|
+
import { _ as Ia } from "./index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs";
|
|
15
|
+
import { C as Fa } from "./index-BDFscU3G.mjs";
|
|
16
|
+
import { _ as Ta } from "./index.vue_vue_type_script_setup_true_lang-BNjoxcAR.mjs";
|
|
17
|
+
import { R as Pa } from "./index-8u4DJZwd.mjs";
|
|
18
|
+
import { _ as Ma } from "./index.vue_vue_type_script_setup_true_lang-EiHoQBXt.mjs";
|
|
19
|
+
import { M as Oa } from "./index-CczrP1H7.mjs";
|
|
20
|
+
import { T as Da } from "./index-DJnmpqCc.mjs";
|
|
21
|
+
import { _ as Ua } from "./index.vue_vue_type_script_setup_true_lang-DmmW8UUK.mjs";
|
|
22
|
+
import { S as tt } from "./index-DYohs_aV.mjs";
|
|
20
23
|
import { _ as St } from "./index.vue_vue_type_script_setup_true_lang-C-Pf9TJ0.mjs";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
24
|
+
import { T as We } from "./index-BrV6CR4H.mjs";
|
|
25
|
+
import { F as Ka } from "./index-fBuu4V3A.mjs";
|
|
26
|
+
import { S as La } from "./index-DixSXWJj.mjs";
|
|
27
|
+
import { _ as Ea } from "./index.vue_vue_type_style_index_0_lang-DSur831A.mjs";
|
|
28
|
+
import { _ as ja } from "./index.vue_vue_type_style_index_0_lang-ztD-It-2.mjs";
|
|
29
|
+
import { w as _ } from "./install-CxBnxbuN.mjs";
|
|
30
|
+
import { o as Na } from "./utils-DUntDntI.mjs";
|
|
23
31
|
/*! js-cookie v3.0.8 | MIT */
|
|
24
32
|
function Ee(t) {
|
|
25
|
-
for (var
|
|
26
|
-
var W = arguments[
|
|
33
|
+
for (var P = 1; P < arguments.length; P++) {
|
|
34
|
+
var W = arguments[P];
|
|
27
35
|
for (var e in W)
|
|
28
36
|
e !== "__proto__" && (t[e] = W[e]);
|
|
29
37
|
}
|
|
30
38
|
return t;
|
|
31
39
|
}
|
|
32
|
-
var
|
|
40
|
+
var Ha = {
|
|
33
41
|
read: function(t) {
|
|
34
42
|
return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
35
43
|
},
|
|
@@ -40,10 +48,10 @@ var Ma = {
|
|
|
40
48
|
);
|
|
41
49
|
}
|
|
42
50
|
};
|
|
43
|
-
function
|
|
51
|
+
function Ge(t, P) {
|
|
44
52
|
function W(n, H, c) {
|
|
45
53
|
if (!(typeof document > "u")) {
|
|
46
|
-
c = Ee({},
|
|
54
|
+
c = Ee({}, P, c), typeof c.expires == "number" && (c.expires = new Date(Date.now() + c.expires * 864e5)), c.expires && (c.expires = c.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
47
55
|
var m = "";
|
|
48
56
|
for (var f in c)
|
|
49
57
|
c[f] && (m += "; " + f, c[f] !== !0 && (m += "=" + c[f].split(";")[0]));
|
|
@@ -55,8 +63,8 @@ function _e(t, O) {
|
|
|
55
63
|
for (var H = document.cookie ? document.cookie.split("; ") : [], c = {}, m = 0; m < H.length; m++) {
|
|
56
64
|
var f = H[m].split("="), A = f.slice(1).join("=");
|
|
57
65
|
try {
|
|
58
|
-
var
|
|
59
|
-
if (
|
|
66
|
+
var x = decodeURIComponent(f[0]);
|
|
67
|
+
if (x in c || (c[x] = t.read(A, x)), n === x)
|
|
60
68
|
break;
|
|
61
69
|
} catch {
|
|
62
70
|
}
|
|
@@ -78,27 +86,27 @@ function _e(t, O) {
|
|
|
78
86
|
);
|
|
79
87
|
},
|
|
80
88
|
withAttributes: function(n) {
|
|
81
|
-
return
|
|
89
|
+
return Ge(this.converter, Ee({}, this.attributes, n));
|
|
82
90
|
},
|
|
83
91
|
withConverter: function(n) {
|
|
84
|
-
return
|
|
92
|
+
return Ge(Ee({}, this.converter, n), this.attributes);
|
|
85
93
|
}
|
|
86
94
|
},
|
|
87
95
|
{
|
|
88
|
-
attributes: { value: Object.freeze(
|
|
96
|
+
attributes: { value: Object.freeze(P) },
|
|
89
97
|
converter: { value: Object.freeze(t) }
|
|
90
98
|
}
|
|
91
99
|
);
|
|
92
100
|
}
|
|
93
|
-
var kt =
|
|
94
|
-
const
|
|
95
|
-
function
|
|
101
|
+
var kt = Ge(Ha, { path: "/" });
|
|
102
|
+
const Za = "Admin-Token";
|
|
103
|
+
function _a(t = Za) {
|
|
96
104
|
return kt.get(t);
|
|
97
105
|
}
|
|
98
|
-
const
|
|
106
|
+
const Wa = { class: "qy-upload__hint" }, Ga = ["placeholder", "disabled"], Ja = ["src"], Xa = {
|
|
99
107
|
key: 1,
|
|
100
108
|
class: "qy-upload__tip"
|
|
101
|
-
},
|
|
109
|
+
}, Ya = { class: "error" }, el = { class: "error" }, tl = /* @__PURE__ */ Object.assign({
|
|
102
110
|
name: "QyUpload"
|
|
103
111
|
}, {
|
|
104
112
|
__name: "index",
|
|
@@ -163,34 +171,34 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
163
171
|
"error",
|
|
164
172
|
"remove"
|
|
165
173
|
],
|
|
166
|
-
setup(t, { expose:
|
|
167
|
-
const e = t, n = W, H =
|
|
168
|
-
let
|
|
169
|
-
const D =
|
|
170
|
-
|
|
174
|
+
setup(t, { expose: P, emit: W }) {
|
|
175
|
+
const e = t, n = W, H = q(null), c = q([]), m = q(null), f = q(null), A = [];
|
|
176
|
+
let x = !1;
|
|
177
|
+
const D = q(!1), E = q([]), M = q(0), j = q(!1), G = q(""), z = q(""), U = /* @__PURE__ */ new Set(), ae = q(!1), J = q(""), X = q(!1);
|
|
178
|
+
Xe(() => {
|
|
171
179
|
e.modelValue === void 0 && y(e.defaultValue);
|
|
172
180
|
});
|
|
173
|
-
const
|
|
181
|
+
const oe = F(() => ({ large: "160px", default: "140px", small: "80px" })[e.size] ?? e.size), ne = F(() => e.disabled), ie = F(
|
|
174
182
|
() => {
|
|
175
183
|
var l;
|
|
176
|
-
return e.isShowTip && (e.fileSize || ((l =
|
|
184
|
+
return e.isShowTip && (e.fileSize || ((l = Z.value) == null ? void 0 : l.length));
|
|
177
185
|
}
|
|
178
|
-
),
|
|
186
|
+
), Z = F(() => {
|
|
179
187
|
var l;
|
|
180
|
-
return (l = e.fileType) != null && l.length ? e.fileType.map((
|
|
181
|
-
}),
|
|
188
|
+
return (l = e.fileType) != null && l.length ? e.fileType.map((r) => r.toLowerCase()) : e.supportVideo ? ["mp4", "mov", "avi"] : ["jpg", "jpeg", "png", "gif", "webp"];
|
|
189
|
+
}), b = F(() => {
|
|
182
190
|
const l = e.supportVideo ? 1 : e.limit;
|
|
183
191
|
return c.value.length >= l;
|
|
184
|
-
}),
|
|
185
|
-
() =>
|
|
192
|
+
}), $ = F(
|
|
193
|
+
() => Z.value.map((l) => `.${l}`).join(",")
|
|
186
194
|
), a = F(() => ({
|
|
187
|
-
"qy-upload--reached-limit":
|
|
195
|
+
"qy-upload--reached-limit": b.value,
|
|
188
196
|
"qy-upload--disabled": e.disabled,
|
|
189
197
|
"qy-upload--video": e.supportVideo,
|
|
190
198
|
"qy-upload--without-text": !e.showText && !e.showPasteInput
|
|
191
199
|
}));
|
|
192
|
-
fe(
|
|
193
|
-
|
|
200
|
+
fe(J, () => {
|
|
201
|
+
x || re();
|
|
194
202
|
}), fe(
|
|
195
203
|
() => e.modelValue,
|
|
196
204
|
(l) => {
|
|
@@ -201,57 +209,57 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
201
209
|
function o(l) {
|
|
202
210
|
return Array.isArray(l) ? l.filter(Boolean) : l ? String(l).split(",").filter(Boolean) : [];
|
|
203
211
|
}
|
|
204
|
-
function
|
|
212
|
+
function K(l) {
|
|
205
213
|
return Array.isArray(l) ? { files: l, text: "" } : typeof l == "string" ? { files: o(l), text: "" } : l && typeof l == "object" ? {
|
|
206
214
|
files: o(l.files),
|
|
207
215
|
text: l.text ?? ""
|
|
208
216
|
} : { files: [], text: "" };
|
|
209
217
|
}
|
|
210
|
-
function
|
|
211
|
-
return l.map((
|
|
212
|
-
name: String(
|
|
213
|
-
url:
|
|
218
|
+
function te(l = []) {
|
|
219
|
+
return l.map((r, S) => ({
|
|
220
|
+
name: String(r).split("/").pop() || `file-${S}`,
|
|
221
|
+
url: r,
|
|
214
222
|
status: "success",
|
|
215
|
-
uid: Date.now() +
|
|
223
|
+
uid: Date.now() + S
|
|
216
224
|
}));
|
|
217
225
|
}
|
|
218
226
|
function s(l) {
|
|
219
|
-
const
|
|
220
|
-
(
|
|
227
|
+
const r = new Set(l.map((k) => k.url)), S = c.value.filter(
|
|
228
|
+
(k) => k.status === "uploading" && !r.has(k.url)
|
|
221
229
|
);
|
|
222
|
-
return [...l, ...
|
|
230
|
+
return [...l, ...S];
|
|
223
231
|
}
|
|
224
232
|
function y(l) {
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
233
|
+
const r = K(l);
|
|
234
|
+
x = !0, J.value = r.text, c.value = s(te(r.files)), De(() => {
|
|
235
|
+
x = !1;
|
|
228
236
|
});
|
|
229
237
|
}
|
|
230
|
-
function
|
|
238
|
+
function V(l) {
|
|
231
239
|
return e.valueFormat === "array" ? l.files : e.valueFormat === "string" ? l.files.join(",") : l;
|
|
232
240
|
}
|
|
233
241
|
function g() {
|
|
234
242
|
var l;
|
|
235
243
|
(l = m.value) == null || l.focus();
|
|
236
244
|
}
|
|
237
|
-
function
|
|
245
|
+
function B(l) {
|
|
238
246
|
l.target.value = "";
|
|
239
247
|
}
|
|
240
|
-
function
|
|
241
|
-
const
|
|
242
|
-
n("update:modelValue",
|
|
248
|
+
function re(l) {
|
|
249
|
+
const k = { files: (l ?? c.value).filter((L) => L.status === "success" && L.url).map((L) => L.url), text: J.value };
|
|
250
|
+
n("update:modelValue", V(k)), n("change", k), e.callBack && e.callBack(k);
|
|
243
251
|
}
|
|
244
|
-
function
|
|
245
|
-
|
|
252
|
+
function pe(l, r) {
|
|
253
|
+
re(r), n("remove", l, r);
|
|
246
254
|
}
|
|
247
|
-
function
|
|
248
|
-
var
|
|
249
|
-
const
|
|
250
|
-
return
|
|
255
|
+
function ge(l) {
|
|
256
|
+
var S;
|
|
257
|
+
const r = (l == null ? void 0 : l.name) || "";
|
|
258
|
+
return r.includes(".") && ((S = r.split(".").pop()) == null ? void 0 : S.toLowerCase()) || "";
|
|
251
259
|
}
|
|
252
|
-
function
|
|
253
|
-
var
|
|
254
|
-
const
|
|
260
|
+
function xe(l) {
|
|
261
|
+
var L, le, se;
|
|
262
|
+
const r = ((le = (L = l == null ? void 0 : l.type) == null ? void 0 : L.toLowerCase) == null ? void 0 : le.call(L)) || "", S = {
|
|
255
263
|
"image/jpeg": ["jpg", "jpeg"],
|
|
256
264
|
"image/png": ["png"],
|
|
257
265
|
"image/gif": ["gif"],
|
|
@@ -262,392 +270,392 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
262
270
|
"video/x-msvideo": ["avi"],
|
|
263
271
|
"video/webm": ["webm"]
|
|
264
272
|
};
|
|
265
|
-
if (
|
|
266
|
-
const
|
|
267
|
-
return
|
|
273
|
+
if (S[r]) return S[r];
|
|
274
|
+
const k = (se = r.split("/")[1]) == null ? void 0 : se.split("+")[0];
|
|
275
|
+
return k ? [k] : [];
|
|
268
276
|
}
|
|
269
277
|
function p(l) {
|
|
270
|
-
const
|
|
271
|
-
return [
|
|
272
|
-
(
|
|
278
|
+
const r = ge(l), S = xe(l);
|
|
279
|
+
return [r, ...S].some(
|
|
280
|
+
(k) => Z.value.includes(k)
|
|
273
281
|
);
|
|
274
282
|
}
|
|
275
|
-
function
|
|
276
|
-
return l.size / 1024 / 1024 < e.fileSize ? p(l) ? !0 : (
|
|
277
|
-
`格式不支持,仅允许: ${
|
|
278
|
-
), !1) : (
|
|
283
|
+
function Y(l) {
|
|
284
|
+
return l.size / 1024 / 1024 < e.fileSize ? p(l) ? !0 : (be.warning(
|
|
285
|
+
`格式不支持,仅允许: ${Z.value.join("/")}`
|
|
286
|
+
), !1) : (be.warning(`文件大小不能超过${e.fileSize}M`), !1);
|
|
279
287
|
}
|
|
280
|
-
async function
|
|
281
|
-
const
|
|
288
|
+
async function i(l, r, S, k) {
|
|
289
|
+
const L = w(l);
|
|
282
290
|
try {
|
|
283
|
-
const
|
|
291
|
+
const le = await e.uploadRequest({
|
|
284
292
|
file: l,
|
|
285
|
-
formData:
|
|
293
|
+
formData: L,
|
|
286
294
|
api: e.api,
|
|
287
295
|
name: e.name,
|
|
288
296
|
tokenKey: e.tokenKey,
|
|
289
297
|
extraData: e.extraData
|
|
290
|
-
}),
|
|
291
|
-
if (!
|
|
292
|
-
const
|
|
293
|
-
|
|
298
|
+
}), se = ee(le);
|
|
299
|
+
if (!se) {
|
|
300
|
+
const ve = new Error("上传失败,未返回文件地址");
|
|
301
|
+
be.error(ve.message), n("error", ve), S == null || S(ve);
|
|
294
302
|
return;
|
|
295
303
|
}
|
|
296
|
-
|
|
297
|
-
} catch (
|
|
298
|
-
|
|
304
|
+
be.success("上传成功"), r == null || r({ ...typeof le == "object" && le ? le : {}, url: se });
|
|
305
|
+
} catch (le) {
|
|
306
|
+
be.error("上传失败"), n("error", le), S == null || S(le);
|
|
299
307
|
} finally {
|
|
300
|
-
|
|
308
|
+
k.close();
|
|
301
309
|
}
|
|
302
310
|
}
|
|
303
|
-
function
|
|
304
|
-
const
|
|
305
|
-
return
|
|
311
|
+
function w(l) {
|
|
312
|
+
const r = new FormData();
|
|
313
|
+
return r.append(e.name, l), e.extraData && Object.entries(e.extraData).forEach(([S, k]) => r.append(S, k)), r;
|
|
306
314
|
}
|
|
307
|
-
function
|
|
308
|
-
var
|
|
315
|
+
function ee(l) {
|
|
316
|
+
var k, L;
|
|
309
317
|
if (typeof l == "string") return l;
|
|
310
|
-
const
|
|
311
|
-
return Array.isArray(
|
|
318
|
+
const r = l || {}, S = r.urls ?? r.url ?? ((k = r.data) == null ? void 0 : k.urls) ?? ((L = r.data) == null ? void 0 : L.url) ?? "";
|
|
319
|
+
return Array.isArray(S) ? S[0] || "" : S || "";
|
|
312
320
|
}
|
|
313
|
-
function
|
|
314
|
-
var
|
|
315
|
-
const
|
|
316
|
-
target:
|
|
321
|
+
function Se(l, r, S, k) {
|
|
322
|
+
var lt, ot;
|
|
323
|
+
const L = ((lt = H.value) == null ? void 0 : lt.$el.querySelector(".el-upload--picture-card")) || ((ot = H.value) == null ? void 0 : ot.$el), le = ga.service({
|
|
324
|
+
target: L,
|
|
317
325
|
text: "上传中",
|
|
318
326
|
background: "rgba(255,255,255,0.7)"
|
|
319
327
|
});
|
|
320
328
|
if (e.uploadRequest) {
|
|
321
|
-
|
|
329
|
+
i(l, S, k, le);
|
|
322
330
|
return;
|
|
323
331
|
}
|
|
324
|
-
const
|
|
325
|
-
A.push(
|
|
332
|
+
const se = e.api.startsWith("http") ? e.api : window.location.origin + e.api.replace(/^([^/])/, "/$1"), ve = w(l), he = new XMLHttpRequest();
|
|
333
|
+
A.push(he);
|
|
326
334
|
const $e = () => {
|
|
327
|
-
const
|
|
328
|
-
|
|
335
|
+
const me = A.indexOf(he);
|
|
336
|
+
me !== -1 && A.splice(me, 1), le.close();
|
|
329
337
|
};
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
},
|
|
335
|
-
if ($e(),
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
+
he.open("POST", se);
|
|
339
|
+
const at = _a(e.tokenKey);
|
|
340
|
+
at && he.setRequestHeader("Authorization", `Bearer ${at}`), he.upload.onprogress = (me) => {
|
|
341
|
+
me.total > 0 && (r == null || r({ percent: me.loaded / me.total * 100 }));
|
|
342
|
+
}, he.onload = () => {
|
|
343
|
+
if ($e(), he.status < 200 || he.status >= 300) {
|
|
344
|
+
const me = `上传失败 (HTTP ${he.status})`;
|
|
345
|
+
be.error(me), n("error", { msg: me, status: he.status }), k == null || k(new Error(me));
|
|
338
346
|
return;
|
|
339
347
|
}
|
|
340
348
|
try {
|
|
341
|
-
const
|
|
342
|
-
|
|
349
|
+
const me = JSON.parse(he.responseText);
|
|
350
|
+
me.code === 200 && me.urls ? (be.success("上传成功"), S == null || S({ ...me, url: me.urls })) : (be.error(me.msg || "上传失败"), n("error", me), k == null || k(me));
|
|
343
351
|
} catch {
|
|
344
|
-
|
|
352
|
+
be.error("上传失败,响应格式错误"), n("error", new Error("Response parse error")), k == null || k(new Error("Response parse error"));
|
|
345
353
|
}
|
|
346
|
-
},
|
|
347
|
-
$e(),
|
|
348
|
-
},
|
|
354
|
+
}, he.onerror = () => {
|
|
355
|
+
$e(), be.error("上传失败,网络异常"), n("error", new Error("Network error")), k == null || k(new Error("Network error"));
|
|
356
|
+
}, he.send(ve);
|
|
349
357
|
}
|
|
350
358
|
function Ce(l) {
|
|
351
|
-
return e.disabled ? !1 :
|
|
359
|
+
return e.disabled ? !1 : Y(l);
|
|
352
360
|
}
|
|
353
|
-
function ce(l,
|
|
354
|
-
const
|
|
355
|
-
(
|
|
356
|
-
var
|
|
357
|
-
return
|
|
361
|
+
function ce(l, r) {
|
|
362
|
+
const S = c.value.find(
|
|
363
|
+
(k) => {
|
|
364
|
+
var L;
|
|
365
|
+
return k.uid === (l == null ? void 0 : l.uid) || ((L = k.raw) == null ? void 0 : L.uid) === (l == null ? void 0 : l.uid);
|
|
358
366
|
}
|
|
359
367
|
);
|
|
360
|
-
|
|
368
|
+
S && (S.url = r, S.status = "success");
|
|
361
369
|
}
|
|
362
|
-
function
|
|
363
|
-
|
|
370
|
+
function Me(l) {
|
|
371
|
+
Se(
|
|
364
372
|
l.file,
|
|
365
373
|
l.onProgress,
|
|
366
|
-
(
|
|
367
|
-
ce(l.file,
|
|
374
|
+
(r) => {
|
|
375
|
+
ce(l.file, r.url), l.onSuccess(r), re(), n("success", r);
|
|
368
376
|
},
|
|
369
|
-
(
|
|
377
|
+
(r) => l.onError(r)
|
|
370
378
|
);
|
|
371
379
|
}
|
|
372
380
|
function Ke(l) {
|
|
373
|
-
var
|
|
381
|
+
var k;
|
|
374
382
|
if (!l.url) return;
|
|
375
|
-
const
|
|
376
|
-
if (["mp4", "mov", "avi", "webm"].includes(
|
|
377
|
-
|
|
383
|
+
const r = ((k = l.url.split(".").pop()) == null ? void 0 : k.toLowerCase()) || "";
|
|
384
|
+
if (["mp4", "mov", "avi", "webm"].includes(r)) {
|
|
385
|
+
G.value = l.url, z.value = l.name || "视频预览", j.value = !0;
|
|
378
386
|
return;
|
|
379
387
|
}
|
|
380
|
-
const
|
|
381
|
-
(
|
|
382
|
-
var
|
|
383
|
-
return
|
|
384
|
-
(
|
|
388
|
+
const S = c.value.filter(
|
|
389
|
+
(L) => {
|
|
390
|
+
var le;
|
|
391
|
+
return L.status === "success" && L.url && !["mp4", "mov", "avi", "webm"].includes(
|
|
392
|
+
(le = L.url.split(".").pop()) == null ? void 0 : le.toLowerCase()
|
|
385
393
|
);
|
|
386
394
|
}
|
|
387
395
|
);
|
|
388
|
-
|
|
396
|
+
E.value = S.map((L) => L.url), M.value = S.findIndex((L) => L.uid === l.uid) || 0, D.value = !0;
|
|
389
397
|
}
|
|
390
398
|
function Te() {
|
|
391
|
-
D.value = !1,
|
|
399
|
+
D.value = !1, E.value = [];
|
|
392
400
|
}
|
|
393
|
-
function
|
|
394
|
-
if (l.name &&
|
|
395
|
-
const
|
|
396
|
-
(
|
|
401
|
+
function Ne(l, r) {
|
|
402
|
+
if (l.name && ge(l)) return l;
|
|
403
|
+
const S = xe(l).find(
|
|
404
|
+
(k) => Z.value.includes(k)
|
|
397
405
|
);
|
|
398
|
-
return
|
|
406
|
+
return S ? new File([l], `paste-${Date.now() + r}.${S}`, {
|
|
399
407
|
type: l.type,
|
|
400
408
|
lastModified: l.lastModified
|
|
401
409
|
}) : l;
|
|
402
410
|
}
|
|
403
411
|
function Le(l) {
|
|
404
|
-
for (let
|
|
405
|
-
const
|
|
406
|
-
if (!Ce(
|
|
407
|
-
const
|
|
408
|
-
U.add(
|
|
409
|
-
uid:
|
|
410
|
-
name:
|
|
412
|
+
for (let r = 0; r < l.length; r++) {
|
|
413
|
+
const S = Ne(l[r], r);
|
|
414
|
+
if (!Ce(S)) continue;
|
|
415
|
+
const k = Date.now() + r, L = URL.createObjectURL(S);
|
|
416
|
+
U.add(L), c.value.push({
|
|
417
|
+
uid: k,
|
|
418
|
+
name: S.name || `file-${k}`,
|
|
411
419
|
status: "uploading",
|
|
412
420
|
percentage: 0,
|
|
413
|
-
url:
|
|
414
|
-
}),
|
|
415
|
-
|
|
416
|
-
(
|
|
417
|
-
const
|
|
418
|
-
|
|
421
|
+
url: L
|
|
422
|
+
}), Se(
|
|
423
|
+
S,
|
|
424
|
+
(le) => {
|
|
425
|
+
const se = c.value.find((ve) => ve.uid === k);
|
|
426
|
+
se && (se.percentage = le.percent);
|
|
419
427
|
},
|
|
420
|
-
(
|
|
421
|
-
const
|
|
422
|
-
|
|
428
|
+
(le) => {
|
|
429
|
+
const se = c.value.find((ve) => ve.uid === k);
|
|
430
|
+
se && (se.status = "success", se.url = le.url, re(), n("success", le));
|
|
423
431
|
},
|
|
424
|
-
() =>
|
|
432
|
+
() => N(k)
|
|
425
433
|
);
|
|
426
434
|
}
|
|
427
435
|
}
|
|
428
|
-
function
|
|
429
|
-
const
|
|
430
|
-
(
|
|
431
|
-
var
|
|
432
|
-
return (
|
|
436
|
+
function He(l) {
|
|
437
|
+
const r = Array.from((l == null ? void 0 : l.files) || []).filter(
|
|
438
|
+
(le) => {
|
|
439
|
+
var se;
|
|
440
|
+
return (se = le.type) == null ? void 0 : se.startsWith("image/");
|
|
433
441
|
}
|
|
434
442
|
);
|
|
435
|
-
if (
|
|
436
|
-
const
|
|
437
|
-
if (!
|
|
438
|
-
const
|
|
439
|
-
for (let
|
|
440
|
-
const
|
|
441
|
-
if (
|
|
442
|
-
const
|
|
443
|
-
|
|
443
|
+
if (r.length) return r;
|
|
444
|
+
const S = l == null ? void 0 : l.items;
|
|
445
|
+
if (!S) return [];
|
|
446
|
+
const k = [], L = /* @__PURE__ */ new Set();
|
|
447
|
+
for (let le = 0; le < S.length; le++) {
|
|
448
|
+
const se = S[le];
|
|
449
|
+
if (se.kind === "file" && se.type.startsWith("image/")) {
|
|
450
|
+
const ve = se.getAsFile();
|
|
451
|
+
ve && !L.has(ve) && (L.add(ve), k.push(ve));
|
|
444
452
|
}
|
|
445
453
|
}
|
|
446
|
-
return
|
|
454
|
+
return k;
|
|
447
455
|
}
|
|
448
|
-
function
|
|
456
|
+
function Ie(l) {
|
|
449
457
|
if (e.disabled) return;
|
|
450
|
-
const
|
|
451
|
-
|
|
458
|
+
const r = He(l.clipboardData);
|
|
459
|
+
r.length && (l.preventDefault(), Le(r));
|
|
452
460
|
}
|
|
453
461
|
function Ae() {
|
|
454
|
-
e.disabled || e.disableDrag || (
|
|
462
|
+
e.disabled || e.disableDrag || (ae.value = !0);
|
|
455
463
|
}
|
|
456
464
|
function u() {
|
|
457
|
-
|
|
465
|
+
ae.value = !1;
|
|
458
466
|
}
|
|
459
467
|
function d(l) {
|
|
460
|
-
var
|
|
461
|
-
if (
|
|
462
|
-
const
|
|
463
|
-
(
|
|
464
|
-
var
|
|
465
|
-
return
|
|
468
|
+
var S;
|
|
469
|
+
if (ae.value = !1, e.disabled || e.disableDrag || b.value) return;
|
|
470
|
+
const r = Array.from(((S = l.dataTransfer) == null ? void 0 : S.files) || []).filter(
|
|
471
|
+
(k) => {
|
|
472
|
+
var L;
|
|
473
|
+
return Z.value.includes((L = k.name.split(".").pop()) == null ? void 0 : L.toLowerCase());
|
|
466
474
|
}
|
|
467
475
|
);
|
|
468
|
-
|
|
476
|
+
r.length && Le(r);
|
|
469
477
|
}
|
|
470
|
-
function
|
|
471
|
-
var
|
|
472
|
-
const
|
|
473
|
-
|
|
478
|
+
function N(l) {
|
|
479
|
+
var S;
|
|
480
|
+
const r = c.value.findIndex((k) => k.uid === l);
|
|
481
|
+
r !== -1 && ((S = c.value[r].url) != null && S.startsWith("blob:") && (URL.revokeObjectURL(c.value[r].url), U.delete(c.value[r].url)), c.value.splice(r, 1));
|
|
474
482
|
}
|
|
475
483
|
return ft(() => {
|
|
476
484
|
A.forEach((l) => l.abort()), A.length = 0, U.forEach((l) => URL.revokeObjectURL(l)), U.clear();
|
|
477
|
-
}),
|
|
485
|
+
}), P({
|
|
478
486
|
/** 主动打开文件选择框,供表单或快捷操作调用 */
|
|
479
487
|
openFileDialog: () => {
|
|
480
|
-
var l,
|
|
481
|
-
e.disabled ||
|
|
488
|
+
var l, r;
|
|
489
|
+
e.disabled || b.value || (r = (l = H.value) == null ? void 0 : l.$el.querySelector('input[type="file"]')) == null || r.click();
|
|
482
490
|
},
|
|
483
491
|
/** 获取已上传成功的文件 URL 列表 */
|
|
484
492
|
getPathList: () => c.value.filter((l) => l.status === "success").map((l) => l.url),
|
|
485
493
|
/** 清空文件和文字,并同步 change 事件 */
|
|
486
494
|
clearFiles: () => {
|
|
487
|
-
c.value = [],
|
|
495
|
+
c.value = [], J.value = "", re();
|
|
488
496
|
},
|
|
489
497
|
/** 获取完整值,结构与 change 事件保持一致 */
|
|
490
498
|
getValue: () => ({
|
|
491
499
|
files: c.value.filter((l) => l.status === "success" && l.url).map((l) => l.url),
|
|
492
|
-
text:
|
|
500
|
+
text: J.value
|
|
493
501
|
}),
|
|
494
502
|
/** 获取按 valueFormat 输出的值,便于外部不走 v-model 时读取 */
|
|
495
|
-
getModelValue: () =>
|
|
503
|
+
getModelValue: () => V({
|
|
496
504
|
files: c.value.filter((l) => l.status === "success" && l.url).map((l) => l.url),
|
|
497
|
-
text:
|
|
505
|
+
text: J.value
|
|
498
506
|
})
|
|
499
|
-
}), (l,
|
|
500
|
-
var
|
|
501
|
-
const
|
|
502
|
-
return
|
|
503
|
-
class:
|
|
504
|
-
style:
|
|
507
|
+
}), (l, r) => {
|
|
508
|
+
var he;
|
|
509
|
+
const S = dt, k = ra, L = ia, le = na, se = sa, ve = ct;
|
|
510
|
+
return v(), Q("div", {
|
|
511
|
+
class: ke(["qy-upload", a.value]),
|
|
512
|
+
style: Pe({ "--qy-upload-size": oe.value })
|
|
505
513
|
}, [
|
|
506
|
-
|
|
514
|
+
O(le, {
|
|
507
515
|
ref_key: "uploadRef",
|
|
508
516
|
ref: H,
|
|
509
517
|
"file-list": c.value,
|
|
510
|
-
"onUpdate:fileList":
|
|
518
|
+
"onUpdate:fileList": r[6] || (r[6] = ($e) => c.value = $e),
|
|
511
519
|
action: "#",
|
|
512
520
|
multiple: t.supportVideo ? !1 : t.multiple,
|
|
513
521
|
limit: t.supportVideo ? 1 : t.limit,
|
|
514
522
|
"list-type": t.supportVideo ? "text" : "picture-card",
|
|
515
|
-
accept:
|
|
523
|
+
accept: $.value,
|
|
516
524
|
disabled: ne.value,
|
|
517
|
-
"http-request":
|
|
525
|
+
"http-request": Me,
|
|
518
526
|
"before-upload": Ce,
|
|
519
527
|
"on-preview": Ke,
|
|
520
|
-
"on-remove":
|
|
528
|
+
"on-remove": pe
|
|
521
529
|
}, {
|
|
522
|
-
default:
|
|
523
|
-
|
|
530
|
+
default: h(() => [
|
|
531
|
+
b.value ? T("", !0) : (v(), Q("div", {
|
|
524
532
|
key: 0,
|
|
525
|
-
class:
|
|
526
|
-
onPaste:
|
|
527
|
-
onDragover:
|
|
528
|
-
onDragleave:
|
|
529
|
-
onDrop:
|
|
533
|
+
class: ke(["qy-upload__trigger", { "is-dragover": ae.value }]),
|
|
534
|
+
onPaste: Ie,
|
|
535
|
+
onDragover: ue(Ae, ["prevent"]),
|
|
536
|
+
onDragleave: ue(u, ["prevent"]),
|
|
537
|
+
onDrop: ue(d, ["prevent"])
|
|
530
538
|
}, [
|
|
531
|
-
|
|
532
|
-
default:
|
|
533
|
-
|
|
539
|
+
O(S, { class: "qy-upload__icon" }, {
|
|
540
|
+
default: h(() => [
|
|
541
|
+
O(C(ma))
|
|
534
542
|
]),
|
|
535
543
|
_: 1
|
|
536
544
|
}),
|
|
537
|
-
t.supportVideo ? (
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
], 64)) :
|
|
541
|
-
t.showText ? (
|
|
545
|
+
t.supportVideo ? (v(), Q(Fe, { key: 0 }, [
|
|
546
|
+
r[9] || (r[9] = R("span", { class: "qy-upload__label" }, "点击上传视频", -1)),
|
|
547
|
+
R("span", Wa, "支持 " + ye(Z.value.join(" / ")) + ",不超过 " + ye(t.fileSize) + "MB", 1)
|
|
548
|
+
], 64)) : T("", !0),
|
|
549
|
+
t.showText ? (v(), Q("div", {
|
|
542
550
|
key: 1,
|
|
543
551
|
class: "qy-upload__text",
|
|
544
|
-
onClick:
|
|
552
|
+
onClick: r[3] || (r[3] = ue(() => {
|
|
545
553
|
}, ["stop"])),
|
|
546
|
-
onPaste:
|
|
554
|
+
onPaste: ue(Ie, ["stop"])
|
|
547
555
|
}, [
|
|
548
|
-
|
|
556
|
+
O(L, {
|
|
549
557
|
visible: X.value,
|
|
550
|
-
"onUpdate:visible":
|
|
558
|
+
"onUpdate:visible": r[2] || (r[2] = ($e) => X.value = $e),
|
|
551
559
|
placement: "bottom-start",
|
|
552
560
|
width: 220,
|
|
553
561
|
trigger: "click",
|
|
554
562
|
"popper-class": "qy-upload__text-popover",
|
|
555
563
|
onAfterEnter: g
|
|
556
564
|
}, {
|
|
557
|
-
reference:
|
|
558
|
-
|
|
559
|
-
class:
|
|
560
|
-
}, ye(
|
|
565
|
+
reference: h(() => [
|
|
566
|
+
R("div", {
|
|
567
|
+
class: ke(["qy-upload__text-preview", { "is-placeholder": !J.value }])
|
|
568
|
+
}, ye(J.value || t.pastePlaceholder), 3)
|
|
561
569
|
]),
|
|
562
|
-
default:
|
|
563
|
-
|
|
570
|
+
default: h(() => [
|
|
571
|
+
O(k, {
|
|
564
572
|
ref_key: "inputRef",
|
|
565
573
|
ref: m,
|
|
566
|
-
modelValue:
|
|
567
|
-
"onUpdate:modelValue":
|
|
574
|
+
modelValue: J.value,
|
|
575
|
+
"onUpdate:modelValue": r[0] || (r[0] = ($e) => J.value = $e),
|
|
568
576
|
type: "textarea",
|
|
569
577
|
autosize: { minRows: 2, maxRows: 5 },
|
|
570
578
|
placeholder: t.pastePlaceholder,
|
|
571
579
|
disabled: t.disabled,
|
|
572
|
-
onBlur:
|
|
573
|
-
onPaste:
|
|
580
|
+
onBlur: r[1] || (r[1] = ($e) => X.value = !1),
|
|
581
|
+
onPaste: ue(Ie, ["stop"])
|
|
574
582
|
}, null, 8, ["modelValue", "placeholder", "disabled"])
|
|
575
583
|
]),
|
|
576
584
|
_: 1
|
|
577
585
|
}, 8, ["visible"])
|
|
578
|
-
], 32)) : t.showPasteInput ? (
|
|
586
|
+
], 32)) : t.showPasteInput ? (v(), Q("div", {
|
|
579
587
|
key: 2,
|
|
580
588
|
class: "qy-upload__text",
|
|
581
|
-
onClick:
|
|
589
|
+
onClick: r[5] || (r[5] = ue(() => {
|
|
582
590
|
}, ["stop"])),
|
|
583
|
-
onPaste:
|
|
591
|
+
onPaste: ue(Ie, ["stop"])
|
|
584
592
|
}, [
|
|
585
|
-
|
|
593
|
+
R("input", {
|
|
586
594
|
ref_key: "pasteInputRef",
|
|
587
595
|
ref: f,
|
|
588
596
|
class: "qy-upload__paste-input",
|
|
589
597
|
placeholder: t.pastePlaceholder,
|
|
590
598
|
disabled: t.disabled,
|
|
591
|
-
onPaste:
|
|
592
|
-
onInput:
|
|
593
|
-
onClick:
|
|
599
|
+
onPaste: ue(Ie, ["stop"]),
|
|
600
|
+
onInput: B,
|
|
601
|
+
onClick: r[4] || (r[4] = ue(() => {
|
|
594
602
|
}, ["stop"]))
|
|
595
|
-
}, null, 40,
|
|
596
|
-
], 32)) :
|
|
603
|
+
}, null, 40, Ga)
|
|
604
|
+
], 32)) : T("", !0)
|
|
597
605
|
], 34))
|
|
598
606
|
]),
|
|
599
607
|
_: 1
|
|
600
608
|
}, 8, ["file-list", "multiple", "limit", "list-type", "accept", "disabled"]),
|
|
601
|
-
D.value ? (
|
|
609
|
+
D.value ? (v(), de(se, {
|
|
602
610
|
key: 0,
|
|
603
|
-
"url-list":
|
|
604
|
-
"initial-index":
|
|
611
|
+
"url-list": E.value,
|
|
612
|
+
"initial-index": M.value,
|
|
605
613
|
onClose: Te
|
|
606
|
-
}, null, 8, ["url-list", "initial-index"])) :
|
|
607
|
-
|
|
608
|
-
modelValue:
|
|
609
|
-
"onUpdate:modelValue":
|
|
610
|
-
title:
|
|
614
|
+
}, null, 8, ["url-list", "initial-index"])) : T("", !0),
|
|
615
|
+
O(ve, {
|
|
616
|
+
modelValue: j.value,
|
|
617
|
+
"onUpdate:modelValue": r[7] || (r[7] = ($e) => j.value = $e),
|
|
618
|
+
title: z.value,
|
|
611
619
|
width: "640px",
|
|
612
620
|
"append-to-body": "",
|
|
613
621
|
"destroy-on-close": "",
|
|
614
|
-
onClose:
|
|
622
|
+
onClose: r[8] || (r[8] = ($e) => j.value = !1)
|
|
615
623
|
}, {
|
|
616
|
-
default:
|
|
617
|
-
|
|
624
|
+
default: h(() => [
|
|
625
|
+
j.value ? (v(), Q("video", {
|
|
618
626
|
key: 0,
|
|
619
|
-
src:
|
|
627
|
+
src: G.value,
|
|
620
628
|
controls: "",
|
|
621
629
|
autoplay: "",
|
|
622
630
|
style: { width: "100%", "max-height": "400px", "border-radius": "4px" }
|
|
623
|
-
}, null, 8,
|
|
631
|
+
}, null, 8, Ja)) : T("", !0)
|
|
624
632
|
]),
|
|
625
633
|
_: 1
|
|
626
634
|
}, 8, ["modelValue", "title"]),
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
default:
|
|
630
|
-
|
|
635
|
+
ie.value ? (v(), Q("div", Xa, [
|
|
636
|
+
O(S, null, {
|
|
637
|
+
default: h(() => [
|
|
638
|
+
O(C(ya))
|
|
631
639
|
]),
|
|
632
640
|
_: 1
|
|
633
641
|
}),
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
t.fileSize ? (
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
], 64)) :
|
|
640
|
-
(
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
], 64)) :
|
|
644
|
-
|
|
642
|
+
R("span", null, [
|
|
643
|
+
r[12] || (r[12] = we(" 请上传 ", -1)),
|
|
644
|
+
t.fileSize ? (v(), Q(Fe, { key: 0 }, [
|
|
645
|
+
r[10] || (r[10] = we("大小不超过 ", -1)),
|
|
646
|
+
R("b", Ya, ye(t.fileSize) + "MB", 1)
|
|
647
|
+
], 64)) : T("", !0),
|
|
648
|
+
(he = Z.value) != null && he.length ? (v(), Q(Fe, { key: 1 }, [
|
|
649
|
+
r[11] || (r[11] = we(",格式为 ", -1)),
|
|
650
|
+
R("b", el, ye(Z.value.join("/")), 1)
|
|
651
|
+
], 64)) : T("", !0),
|
|
652
|
+
r[13] || (r[13] = we(" 的文件。 ", -1))
|
|
645
653
|
])
|
|
646
|
-
])) :
|
|
654
|
+
])) : T("", !0)
|
|
647
655
|
], 6);
|
|
648
656
|
};
|
|
649
657
|
}
|
|
650
|
-
}), xt = /* @__PURE__ */
|
|
658
|
+
}), xt = /* @__PURE__ */ Re(tl, [["__scopeId", "data-v-1e380be1"]]), al = /* @__PURE__ */ Object.assign({
|
|
651
659
|
name: "QyImageUpload",
|
|
652
660
|
inheritAttrs: !1
|
|
653
661
|
}, {
|
|
@@ -702,47 +710,47 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
702
710
|
"remove",
|
|
703
711
|
"updateImg"
|
|
704
712
|
],
|
|
705
|
-
setup(t, { expose:
|
|
706
|
-
const e = t, n = W, H =
|
|
713
|
+
setup(t, { expose: P, emit: W }) {
|
|
714
|
+
const e = t, n = W, H = Qe(), c = q(null), m = ["jpg", "jpeg", "png", "gif", "bmp", "webp"], f = F(
|
|
707
715
|
() => e.voucher || e.mode === "voucher"
|
|
708
|
-
), A = F(() => Array.isArray(e.modelValue) ? e.modelValue.filter(Boolean) : e.modelValue ? String(e.modelValue).split(",").filter(Boolean) : []),
|
|
716
|
+
), A = F(() => Array.isArray(e.modelValue) ? e.modelValue.filter(Boolean) : e.modelValue ? String(e.modelValue).split(",").filter(Boolean) : []), x = F(() => e.supportVideo ? 1 : f.value ? e.limit ?? 30 : e.limit ?? (e.multiple ? 9 : 1)), D = F(() => {
|
|
709
717
|
var a;
|
|
710
718
|
return (a = e.fileType) != null && a.length ? e.fileType : f.value && !e.supportVideo ? m : [];
|
|
711
719
|
});
|
|
712
|
-
function
|
|
720
|
+
function E(a) {
|
|
713
721
|
return Array.isArray(a) ? a.filter(Boolean) : [];
|
|
714
722
|
}
|
|
715
|
-
function
|
|
716
|
-
const o =
|
|
723
|
+
function M(a) {
|
|
724
|
+
const o = E(a);
|
|
717
725
|
return e.multiple ? o : o[0] || "";
|
|
718
726
|
}
|
|
719
|
-
function
|
|
720
|
-
n("update:modelValue",
|
|
727
|
+
function j(a) {
|
|
728
|
+
n("update:modelValue", M(a));
|
|
721
729
|
}
|
|
722
|
-
function
|
|
723
|
-
n("change",
|
|
730
|
+
function G(a) {
|
|
731
|
+
n("change", M(a == null ? void 0 : a.files));
|
|
724
732
|
}
|
|
725
|
-
function
|
|
726
|
-
var
|
|
733
|
+
function z(a) {
|
|
734
|
+
var te, s;
|
|
727
735
|
if (typeof a == "string") return a;
|
|
728
|
-
const o = a || {},
|
|
729
|
-
return Array.isArray(
|
|
736
|
+
const o = a || {}, K = o.url ?? o.urls ?? ((te = o.data) == null ? void 0 : te.url) ?? ((s = o.data) == null ? void 0 : s.urls) ?? "";
|
|
737
|
+
return Array.isArray(K) ? K[0] || "" : K || "";
|
|
730
738
|
}
|
|
731
739
|
function U(a) {
|
|
732
|
-
const o =
|
|
733
|
-
o && n("updateImg", o), n("success",
|
|
740
|
+
const o = z(a);
|
|
741
|
+
o && n("updateImg", o), n("success", $(), a);
|
|
734
742
|
}
|
|
735
|
-
function
|
|
743
|
+
function ae(a) {
|
|
736
744
|
n("error", a);
|
|
737
745
|
}
|
|
738
|
-
function
|
|
746
|
+
function J(a, o) {
|
|
739
747
|
n("remove", a, o);
|
|
740
748
|
}
|
|
741
749
|
function X() {
|
|
742
750
|
var a, o;
|
|
743
751
|
(o = (a = c.value) == null ? void 0 : a.openFileDialog) == null || o.call(a);
|
|
744
752
|
}
|
|
745
|
-
function
|
|
753
|
+
function oe() {
|
|
746
754
|
var a, o;
|
|
747
755
|
(o = (a = c.value) == null ? void 0 : a.clearFiles) == null || o.call(a);
|
|
748
756
|
}
|
|
@@ -750,26 +758,26 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
750
758
|
var a, o;
|
|
751
759
|
return ((o = (a = c.value) == null ? void 0 : a.getPathList) == null ? void 0 : o.call(a)) || [];
|
|
752
760
|
}
|
|
753
|
-
const
|
|
754
|
-
function
|
|
761
|
+
const ie = F(() => ne()), Z = F(() => ne());
|
|
762
|
+
function b() {
|
|
755
763
|
return ne();
|
|
756
764
|
}
|
|
757
|
-
function
|
|
765
|
+
function $() {
|
|
758
766
|
const a = ne();
|
|
759
767
|
return e.multiple ? a : a[0] || "";
|
|
760
768
|
}
|
|
761
|
-
return
|
|
769
|
+
return P({
|
|
762
770
|
openFileDialog: X,
|
|
763
|
-
clearFiles:
|
|
771
|
+
clearFiles: oe,
|
|
764
772
|
getPathList: ne,
|
|
765
|
-
getFullPathList:
|
|
766
|
-
fullPathList:
|
|
767
|
-
pathList:
|
|
768
|
-
getValue:
|
|
769
|
-
}), (a, o) => (
|
|
773
|
+
getFullPathList: b,
|
|
774
|
+
fullPathList: ie,
|
|
775
|
+
pathList: Z,
|
|
776
|
+
getValue: $
|
|
777
|
+
}), (a, o) => (v(), de(xt, Ve({
|
|
770
778
|
ref_key: "uploadRef",
|
|
771
779
|
ref: c
|
|
772
|
-
},
|
|
780
|
+
}, C(H), {
|
|
773
781
|
"model-value": A.value,
|
|
774
782
|
"value-format": "array",
|
|
775
783
|
api: t.api,
|
|
@@ -778,7 +786,7 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
778
786
|
disabled: t.disabled,
|
|
779
787
|
"file-type": D.value,
|
|
780
788
|
"file-size": t.fileSize,
|
|
781
|
-
limit:
|
|
789
|
+
limit: x.value,
|
|
782
790
|
"is-show-tip": t.isShowTip,
|
|
783
791
|
"token-key": t.tokenKey,
|
|
784
792
|
"support-video": t.supportVideo,
|
|
@@ -790,29 +798,29 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
790
798
|
"show-text": !1,
|
|
791
799
|
"show-paste-input": t.showPasteInput,
|
|
792
800
|
"paste-placeholder": t.pastePlaceholder,
|
|
793
|
-
"onUpdate:modelValue":
|
|
794
|
-
onChange:
|
|
801
|
+
"onUpdate:modelValue": j,
|
|
802
|
+
onChange: G,
|
|
795
803
|
onSuccess: U,
|
|
796
|
-
onError:
|
|
797
|
-
onRemove:
|
|
804
|
+
onError: ae,
|
|
805
|
+
onRemove: J
|
|
798
806
|
}), 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"]));
|
|
799
807
|
}
|
|
800
|
-
}),
|
|
808
|
+
}), ll = { class: "text-lg flex items-center pt-2 pl-[var(--content-padding)]" }, ol = { key: 0 }, nl = { key: 1 }, il = {
|
|
801
809
|
key: 0,
|
|
802
810
|
class: "icon-[material-symbols--square-outline-rounded]",
|
|
803
811
|
role: "img",
|
|
804
812
|
"aria-hidden": "true"
|
|
805
|
-
},
|
|
813
|
+
}, rl = {
|
|
806
814
|
key: 1,
|
|
807
815
|
class: "icon-[tdesign--fullscreen-exit-1]",
|
|
808
816
|
role: "img",
|
|
809
817
|
"aria-hidden": "true"
|
|
810
|
-
},
|
|
818
|
+
}, sl = {
|
|
811
819
|
key: 0,
|
|
812
820
|
class: "fixed -right-12 top-2 h-9 w-9 hover:bg-gray-600/80 transition-all"
|
|
813
|
-
},
|
|
821
|
+
}, ul = { class: "flex justify-between h-[var(--footer-height)] px-[var(--content-padding)] items-center" }, dl = { class: "flex items-center justify-between w-full pl-1 pr-4 h-full ml-2" }, cl = { class: "flex items-center gap-2" }, fl = { class: "text-sm text-gray-700 truncate max-w-[200px]" }, pl = { class: "flex items-center gap-2" }, rt = 5, Ze = 2e3, Je = /* @__PURE__ */ Be({
|
|
814
822
|
__name: "index",
|
|
815
|
-
props: /* @__PURE__ */
|
|
823
|
+
props: /* @__PURE__ */ it({
|
|
816
824
|
layout: { type: [Array, String, Boolean], default: () => ["confirm", "cancel"] },
|
|
817
825
|
fullscreen: { type: Boolean, default: !1 },
|
|
818
826
|
showFullscreen: { type: Boolean, default: !1 },
|
|
@@ -823,9 +831,9 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
823
831
|
modelValue: { default: !0 },
|
|
824
832
|
modelModifiers: {}
|
|
825
833
|
}),
|
|
826
|
-
emits: /* @__PURE__ */
|
|
827
|
-
setup(t, { expose:
|
|
828
|
-
const e = t, n =
|
|
834
|
+
emits: /* @__PURE__ */ it(["confirm", "cancel", "close", "opened", "ok"], ["update:modelValue"]),
|
|
835
|
+
setup(t, { expose: P, emit: W }) {
|
|
836
|
+
const e = t, n = pt(), H = q(!0), c = q(!1), m = q(Ze), f = q(null), x = qa({
|
|
829
837
|
mobile: 0,
|
|
830
838
|
tablet: 640,
|
|
831
839
|
laptop: 1024,
|
|
@@ -834,71 +842,71 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
834
842
|
if (Array.isArray(e.layout)) return e.layout;
|
|
835
843
|
if (typeof e.layout == "string")
|
|
836
844
|
return e.layout.split(",").map((g) => g.trim());
|
|
837
|
-
}),
|
|
838
|
-
CancelButton:
|
|
839
|
-
ConfirmButton:
|
|
840
|
-
})),
|
|
841
|
-
e.showFullscreen &&
|
|
842
|
-
),
|
|
843
|
-
|
|
844
|
-
U.value && (
|
|
845
|
-
}),
|
|
846
|
-
handleMinimize:
|
|
845
|
+
}), E = F(() => ({
|
|
846
|
+
CancelButton: O(s),
|
|
847
|
+
ConfirmButton: O(te)
|
|
848
|
+
})), M = F(() => n.footer || e.layout !== !1), j = q(!1), G = q(
|
|
849
|
+
e.showFullscreen && x ? !0 : e.fullscreen
|
|
850
|
+
), z = W, U = da(t, "modelValue");
|
|
851
|
+
ca(() => {
|
|
852
|
+
U.value && (j.value = !1);
|
|
853
|
+
}), P({
|
|
854
|
+
handleMinimize: V
|
|
847
855
|
});
|
|
848
|
-
const
|
|
856
|
+
const ae = Qe(), J = `qy-dialog-${Math.random().toString(36).slice(2, 11)}`, X = q(!1), oe = q(null);
|
|
849
857
|
window.minimizedCount || (window.minimizedCount = 0);
|
|
850
|
-
const { x: ne, y:
|
|
858
|
+
const { x: ne, y: ie } = Ba(oe, {
|
|
851
859
|
initialValue: {
|
|
852
860
|
x: 5,
|
|
853
861
|
y: window.innerHeight - 100 - (window.minimizedCount || 0) * 60
|
|
854
862
|
},
|
|
855
863
|
onMove(g) {
|
|
856
|
-
var
|
|
857
|
-
(
|
|
864
|
+
var B;
|
|
865
|
+
(B = oe.value) == null || B.classList.add("dragging"), document.body.classList.add("qy-dialog--dragging"), ne.value = Math.max(
|
|
858
866
|
0,
|
|
859
867
|
Math.min(window.innerWidth - 300, g.x)
|
|
860
|
-
),
|
|
868
|
+
), ie.value = Math.max(
|
|
861
869
|
0,
|
|
862
870
|
Math.min(window.innerHeight - 50, g.y)
|
|
863
871
|
);
|
|
864
872
|
},
|
|
865
873
|
onEnd() {
|
|
866
874
|
var g;
|
|
867
|
-
(g =
|
|
875
|
+
(g = oe.value) == null || g.classList.remove("dragging"), document.body.classList.remove("qy-dialog--dragging");
|
|
868
876
|
}
|
|
869
|
-
}),
|
|
870
|
-
transform: `translate(${ne.value}px, ${
|
|
877
|
+
}), Z = F(() => ({
|
|
878
|
+
transform: `translate(${ne.value}px, ${ie.value}px)`,
|
|
871
879
|
willChange: "transform"
|
|
872
880
|
}));
|
|
873
|
-
function
|
|
874
|
-
const
|
|
875
|
-
H.value =
|
|
881
|
+
function b(g) {
|
|
882
|
+
const B = g.target, { scrollTop: re, scrollHeight: pe, clientHeight: ge } = B;
|
|
883
|
+
H.value = re <= rt, c.value = pe - (re + ge) <= rt;
|
|
876
884
|
}
|
|
877
|
-
function
|
|
878
|
-
const g = document.querySelector(`.${
|
|
879
|
-
g && (f.value = g, g.addEventListener("scroll",
|
|
885
|
+
function $() {
|
|
886
|
+
const g = document.querySelector(`.${J}.el-dialog`);
|
|
887
|
+
g && (f.value = g, g.addEventListener("scroll", b)), y(), z("opened");
|
|
880
888
|
}
|
|
881
889
|
function a() {
|
|
882
|
-
|
|
890
|
+
G.value = !G.value, y();
|
|
883
891
|
}
|
|
884
892
|
function o() {
|
|
885
|
-
|
|
893
|
+
j.value || (j.value = !0, X.value = !1, U.value = !1, z("cancel"), z("close"));
|
|
886
894
|
}
|
|
887
|
-
function
|
|
895
|
+
function K(g) {
|
|
888
896
|
e.showFullscreen && g.detail >= 2 && a();
|
|
889
897
|
}
|
|
890
|
-
function
|
|
898
|
+
function te() {
|
|
891
899
|
return nt(
|
|
892
900
|
qe,
|
|
893
901
|
{
|
|
894
|
-
...
|
|
902
|
+
...C(e.confirmProps),
|
|
895
903
|
type: "primary",
|
|
896
904
|
class: "dialog__footerBtn",
|
|
897
905
|
onClick: () => {
|
|
898
|
-
|
|
906
|
+
z("confirm"), z("ok");
|
|
899
907
|
}
|
|
900
908
|
},
|
|
901
|
-
() =>
|
|
909
|
+
() => C(e.confirmProps).title || "确 认"
|
|
902
910
|
);
|
|
903
911
|
}
|
|
904
912
|
function s() {
|
|
@@ -908,47 +916,47 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
908
916
|
() => "取 消"
|
|
909
917
|
);
|
|
910
918
|
}
|
|
911
|
-
|
|
912
|
-
typeof window.qyDialogMaxZIndex > "u" && (window.qyDialogMaxZIndex =
|
|
919
|
+
Xe(() => {
|
|
920
|
+
typeof window.qyDialogMaxZIndex > "u" && (window.qyDialogMaxZIndex = Ze), y();
|
|
913
921
|
});
|
|
914
922
|
function y() {
|
|
915
923
|
var p;
|
|
916
924
|
const g = Array.from(
|
|
917
925
|
document.querySelectorAll(".el-overlay")
|
|
918
|
-
).filter((
|
|
919
|
-
`.${
|
|
926
|
+
).filter((Y) => window.getComputedStyle(Y).display !== "none" && !Y.classList.contains("is-message")), B = (p = document.querySelector(`.${J}`)) == null ? void 0 : p.closest(".el-overlay"), re = document.querySelector(
|
|
927
|
+
`.${J}.el-dialog`
|
|
920
928
|
);
|
|
921
|
-
if (!
|
|
922
|
-
const
|
|
923
|
-
window.qyDialogMaxZIndex = window.qyDialogMaxZIndex ||
|
|
924
|
-
const
|
|
929
|
+
if (!B || !re) return;
|
|
930
|
+
const pe = Ze;
|
|
931
|
+
window.qyDialogMaxZIndex = window.qyDialogMaxZIndex || pe;
|
|
932
|
+
const xe = Math.max(
|
|
925
933
|
window.qyDialogMaxZIndex,
|
|
926
934
|
...g.map(
|
|
927
|
-
(
|
|
935
|
+
(Y) => parseInt(window.getComputedStyle(Y).zIndex || pe.toString())
|
|
928
936
|
)
|
|
929
937
|
) + 2;
|
|
930
|
-
window.qyDialogMaxZIndex =
|
|
931
|
-
|
|
938
|
+
window.qyDialogMaxZIndex = xe, De(() => {
|
|
939
|
+
B.style.zIndex = xe.toString(), re.style.zIndex = (xe + 1).toString(), m.value = xe + 1;
|
|
932
940
|
});
|
|
933
941
|
}
|
|
934
|
-
|
|
942
|
+
mt(() => {
|
|
935
943
|
var g;
|
|
936
|
-
(g = f.value) == null || g.removeEventListener("scroll",
|
|
944
|
+
(g = f.value) == null || g.removeEventListener("scroll", b), X.value && window.minimizedCount--;
|
|
937
945
|
});
|
|
938
|
-
function
|
|
939
|
-
var
|
|
946
|
+
function V() {
|
|
947
|
+
var B;
|
|
940
948
|
X.value = !X.value;
|
|
941
|
-
const g = (
|
|
942
|
-
g && (X.value ? (g.style.display = "none", window.minimizedCount++,
|
|
949
|
+
const g = (B = document.querySelector(`.${J}`)) == null ? void 0 : B.closest(".el-overlay");
|
|
950
|
+
g && (X.value ? (g.style.display = "none", window.minimizedCount++, ie.value = window.innerHeight - 50 - (window.minimizedCount || 0) * 60) : (g.style.display = "block", window.minimizedCount--, y()));
|
|
943
951
|
}
|
|
944
|
-
return (g,
|
|
945
|
-
const
|
|
946
|
-
return
|
|
947
|
-
|
|
952
|
+
return (g, B) => {
|
|
953
|
+
const re = fa("Close"), pe = dt, ge = ct;
|
|
954
|
+
return v(), Q("div", null, [
|
|
955
|
+
O(ge, Ve({
|
|
948
956
|
ref: "dialogRef",
|
|
949
957
|
class: ["qy-dialog", [
|
|
950
958
|
e.size === "small" && "[&_.el-dialog__header]:!hidden",
|
|
951
|
-
|
|
959
|
+
J
|
|
952
960
|
]],
|
|
953
961
|
"model-value": U.value,
|
|
954
962
|
"align-center": "",
|
|
@@ -957,154 +965,154 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
957
965
|
"--el-dialog-padding-primary": 0
|
|
958
966
|
},
|
|
959
967
|
"show-close": !1,
|
|
960
|
-
fullscreen:
|
|
968
|
+
fullscreen: G.value,
|
|
961
969
|
"z-index": m.value,
|
|
962
970
|
onClosed: o,
|
|
963
|
-
onOpened:
|
|
971
|
+
onOpened: $,
|
|
964
972
|
draggable: ""
|
|
965
|
-
},
|
|
966
|
-
header:
|
|
967
|
-
e.size === "default" ? (
|
|
973
|
+
}, C(ae)), Ue({
|
|
974
|
+
header: h(() => [
|
|
975
|
+
e.size === "default" ? (v(), Q("div", {
|
|
968
976
|
key: 0,
|
|
969
|
-
style:
|
|
977
|
+
style: Pe({
|
|
970
978
|
borderBottom: "1px solid",
|
|
971
979
|
borderColor: H.value ? "transparent" : "var(--block-outline-color)",
|
|
972
980
|
transition: "border-color .2s linear"
|
|
973
981
|
}),
|
|
974
982
|
class: "flex justify-between h-[var(--header-height)]",
|
|
975
|
-
onDblclick:
|
|
983
|
+
onDblclick: K
|
|
976
984
|
}, [
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
])) :
|
|
985
|
+
R("div", ll, [
|
|
986
|
+
C(n).header ? C(n).header ? (v(), Q("div", nl, [
|
|
987
|
+
I(g.$slots, "header")
|
|
988
|
+
])) : T("", !0) : (v(), Q("span", ol, ye(C(ae).title), 1))
|
|
981
989
|
]),
|
|
982
|
-
|
|
990
|
+
R("div", {
|
|
983
991
|
class: "flex",
|
|
984
|
-
onMousedown:
|
|
992
|
+
onMousedown: B[3] || (B[3] = ue(() => {
|
|
985
993
|
}, ["stop"]))
|
|
986
994
|
}, [
|
|
987
|
-
e.size === "default" ? (
|
|
995
|
+
e.size === "default" ? (v(), Q("div", {
|
|
988
996
|
key: 0,
|
|
989
997
|
class: "qy-dialog__btn qy-dialog__btn--default",
|
|
990
|
-
onClick:
|
|
991
|
-
onMousedown:
|
|
998
|
+
onClick: ue(V, ["stop"]),
|
|
999
|
+
onMousedown: B[0] || (B[0] = ue(() => {
|
|
992
1000
|
}, ["stop"]))
|
|
993
|
-
}, [...
|
|
994
|
-
|
|
1001
|
+
}, [...B[4] || (B[4] = [
|
|
1002
|
+
R("span", {
|
|
995
1003
|
class: "icon-[material-symbols--minimize] text-xl mb-3",
|
|
996
1004
|
role: "img",
|
|
997
1005
|
"aria-hidden": "true"
|
|
998
1006
|
}, null, -1)
|
|
999
|
-
])], 32)) :
|
|
1000
|
-
e.showFullscreen ? (
|
|
1007
|
+
])], 32)) : T("", !0),
|
|
1008
|
+
e.showFullscreen ? (v(), Q("div", {
|
|
1001
1009
|
key: 1,
|
|
1002
1010
|
class: "qy-dialog__btn qy-dialog__btn--default",
|
|
1003
|
-
onClick:
|
|
1004
|
-
onMousedown:
|
|
1011
|
+
onClick: ue(a, ["stop"]),
|
|
1012
|
+
onMousedown: B[1] || (B[1] = ue(() => {
|
|
1005
1013
|
}, ["stop"]))
|
|
1006
1014
|
}, [
|
|
1007
|
-
|
|
1008
|
-
], 32)) :
|
|
1009
|
-
|
|
1015
|
+
G.value ? (v(), Q("span", rl)) : (v(), Q("span", il))
|
|
1016
|
+
], 32)) : T("", !0),
|
|
1017
|
+
R("div", {
|
|
1010
1018
|
class: "qy-dialog__btn qy-dialog__btn--danger",
|
|
1011
|
-
onClick:
|
|
1012
|
-
onMousedown:
|
|
1019
|
+
onClick: ue(o, ["stop"]),
|
|
1020
|
+
onMousedown: B[2] || (B[2] = ue(() => {
|
|
1013
1021
|
}, ["stop"]))
|
|
1014
|
-
}, [...
|
|
1015
|
-
|
|
1022
|
+
}, [...B[5] || (B[5] = [
|
|
1023
|
+
R("span", {
|
|
1016
1024
|
class: "icon-[ri--close-line] text-xl",
|
|
1017
1025
|
role: "img",
|
|
1018
1026
|
"aria-hidden": "true"
|
|
1019
1027
|
}, null, -1)
|
|
1020
1028
|
])], 32)
|
|
1021
1029
|
], 32)
|
|
1022
|
-
], 36)) :
|
|
1030
|
+
], 36)) : T("", !0)
|
|
1023
1031
|
]),
|
|
1024
|
-
default:
|
|
1025
|
-
|
|
1026
|
-
class:
|
|
1027
|
-
style:
|
|
1028
|
-
maxHeight:
|
|
1032
|
+
default: h(() => [
|
|
1033
|
+
R("div", {
|
|
1034
|
+
class: ke(["qy-dialog__wrapper", C($a)(G.value && "qy-dialog__wrapper--fullscreen")]),
|
|
1035
|
+
style: Pe({
|
|
1036
|
+
maxHeight: M.value ? "calc(100vh - var(--header-height) - var(--footer-height) - var(--sides-gap))" : "calc(100vh - var(--header-height) - var(--sides-gap))",
|
|
1029
1037
|
padding: e.size === "small" ? "var(--small-content-padding)" : "var(--content-padding)"
|
|
1030
1038
|
})
|
|
1031
1039
|
}, [
|
|
1032
|
-
e.size === "small" ? (
|
|
1033
|
-
|
|
1040
|
+
e.size === "small" ? (v(), Q("div", sl, [
|
|
1041
|
+
O(pe, {
|
|
1034
1042
|
size: 36,
|
|
1035
1043
|
class: "cursor-pointer text-gray-100 active:scale-75 rounded-sm transition-all",
|
|
1036
1044
|
onClick: o
|
|
1037
1045
|
}, {
|
|
1038
|
-
default:
|
|
1039
|
-
|
|
1046
|
+
default: h(() => [
|
|
1047
|
+
O(re)
|
|
1040
1048
|
]),
|
|
1041
1049
|
_: 1
|
|
1042
1050
|
})
|
|
1043
|
-
])) :
|
|
1044
|
-
|
|
1051
|
+
])) : T("", !0),
|
|
1052
|
+
I(g.$slots, "default")
|
|
1045
1053
|
], 6)
|
|
1046
1054
|
]),
|
|
1047
1055
|
_: 2
|
|
1048
1056
|
}, [
|
|
1049
1057
|
!g.$slots.footer && Array.isArray(D.value) ? {
|
|
1050
1058
|
name: "footer",
|
|
1051
|
-
fn:
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1059
|
+
fn: h(() => [
|
|
1060
|
+
R("div", ul, [
|
|
1061
|
+
R("div", null, [
|
|
1062
|
+
I(g.$slots, "footer-left")
|
|
1055
1063
|
]),
|
|
1056
|
-
|
|
1057
|
-
class:
|
|
1064
|
+
R("div", {
|
|
1065
|
+
class: ke([{
|
|
1058
1066
|
"qy-dialog__footer--outline": c.value
|
|
1059
1067
|
}, "qy-dialog__footer flex items-center justify-end"])
|
|
1060
1068
|
}, [
|
|
1061
|
-
D.value.includes("cancel") ? (
|
|
1062
|
-
D.value.includes("confirm") ? (
|
|
1063
|
-
|
|
1069
|
+
D.value.includes("cancel") ? (v(), de(s, { key: 0 })) : T("", !0),
|
|
1070
|
+
D.value.includes("confirm") ? (v(), de(te, { key: 1 })) : T("", !0),
|
|
1071
|
+
I(g.$slots, "footer-append")
|
|
1064
1072
|
], 2)
|
|
1065
1073
|
])
|
|
1066
1074
|
]),
|
|
1067
1075
|
key: "0"
|
|
1068
|
-
} :
|
|
1076
|
+
} : M.value ? {
|
|
1069
1077
|
name: "footer",
|
|
1070
|
-
fn:
|
|
1071
|
-
|
|
1072
|
-
class:
|
|
1078
|
+
fn: h(() => [
|
|
1079
|
+
R("div", {
|
|
1080
|
+
class: ke([{
|
|
1073
1081
|
"qy-dialog__footer--outline": c.value
|
|
1074
1082
|
}, "qy-dialog__footer px-[var(--content-padding)] min-h-[var(--footer-height)] flex items-center justify-end"])
|
|
1075
1083
|
}, [
|
|
1076
|
-
|
|
1077
|
-
layouts:
|
|
1078
|
-
layoutsNode: Object.values(
|
|
1084
|
+
I(g.$slots, "footer", {
|
|
1085
|
+
layouts: E.value,
|
|
1086
|
+
layoutsNode: Object.values(E.value)
|
|
1079
1087
|
})
|
|
1080
1088
|
], 2)
|
|
1081
1089
|
]),
|
|
1082
1090
|
key: "1"
|
|
1083
1091
|
} : void 0
|
|
1084
1092
|
]), 1040, ["class", "model-value", "fullscreen", "z-index"]),
|
|
1085
|
-
Ye(
|
|
1093
|
+
Ye(R("div", {
|
|
1086
1094
|
ref_key: "minimizedRef",
|
|
1087
|
-
ref:
|
|
1095
|
+
ref: oe,
|
|
1088
1096
|
class: "fixed left-0 top-0 bg-white rounded shadow-lg cursor-pointer z-[9999] hover:bg-gray-50",
|
|
1089
|
-
style:
|
|
1097
|
+
style: Pe([Z.value, { width: "300px", height: "50px", "will-change": "transform" }])
|
|
1090
1098
|
}, [
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1099
|
+
R("div", dl, [
|
|
1100
|
+
R("div", cl, [
|
|
1101
|
+
B[6] || (B[6] = R("div", { class: "icon-[mdi--window-restore] text-gray-600" }, null, -1)),
|
|
1102
|
+
R("span", fl, ye(C(ae).title), 1)
|
|
1095
1103
|
]),
|
|
1096
|
-
|
|
1097
|
-
|
|
1104
|
+
R("div", pl, [
|
|
1105
|
+
R("div", {
|
|
1098
1106
|
class: "p-1 hover:bg-gray-200 rounded",
|
|
1099
|
-
onClick:
|
|
1100
|
-
}, [...
|
|
1101
|
-
|
|
1107
|
+
onClick: ue(V, ["stop"])
|
|
1108
|
+
}, [...B[7] || (B[7] = [
|
|
1109
|
+
R("div", { class: "icon-[mdi--window-maximize] text-gray-600" }, null, -1)
|
|
1102
1110
|
])]),
|
|
1103
|
-
|
|
1111
|
+
R("div", {
|
|
1104
1112
|
class: "p-1 hover:bg-red-100 rounded",
|
|
1105
|
-
onClick:
|
|
1106
|
-
}, [...
|
|
1107
|
-
|
|
1113
|
+
onClick: ue(o, ["stop"])
|
|
1114
|
+
}, [...B[8] || (B[8] = [
|
|
1115
|
+
R("div", { class: "icon-[mdi--close] text-red-600" }, null, -1)
|
|
1108
1116
|
])])
|
|
1109
1117
|
])
|
|
1110
1118
|
])
|
|
@@ -1116,41 +1124,41 @@ const Da = { class: "qy-upload__hint" }, Ua = ["placeholder", "disabled"], Ka =
|
|
|
1116
1124
|
}
|
|
1117
1125
|
});
|
|
1118
1126
|
function st(t) {
|
|
1119
|
-
const
|
|
1120
|
-
return
|
|
1121
|
-
imageUrl:
|
|
1122
|
-
text:
|
|
1127
|
+
const P = t == null ? void 0 : t.match(/(\[url\:(.*?)\])(.*)/);
|
|
1128
|
+
return P ? {
|
|
1129
|
+
imageUrl: P[2],
|
|
1130
|
+
text: P[3]
|
|
1123
1131
|
} : {
|
|
1124
1132
|
imageUrl: "",
|
|
1125
1133
|
text: t || ""
|
|
1126
1134
|
};
|
|
1127
1135
|
}
|
|
1128
|
-
function
|
|
1129
|
-
const
|
|
1130
|
-
return
|
|
1136
|
+
function ml(t) {
|
|
1137
|
+
const P = String(t || "").match(/(\[url\:.*?\])([\s\S]*)/);
|
|
1138
|
+
return P ? P[2] : t;
|
|
1131
1139
|
}
|
|
1132
|
-
function ut(t,
|
|
1133
|
-
return
|
|
1140
|
+
function ut(t, P) {
|
|
1141
|
+
return P ? `[url:${P}]${t}` : t;
|
|
1134
1142
|
}
|
|
1135
|
-
const
|
|
1143
|
+
const yl = { class: "qy-remark-image__field" }, gl = {
|
|
1136
1144
|
key: 1,
|
|
1137
1145
|
class: "qy-remark-image__divider"
|
|
1138
|
-
},
|
|
1146
|
+
}, vl = { class: "qy-remark-image__upload-anchor" }, hl = {
|
|
1139
1147
|
key: 0,
|
|
1140
1148
|
class: "icon-[line-md--loading-twotone-loop]",
|
|
1141
1149
|
role: "img",
|
|
1142
1150
|
"aria-hidden": "true"
|
|
1143
|
-
},
|
|
1151
|
+
}, bl = {
|
|
1144
1152
|
key: 1,
|
|
1145
1153
|
class: "icon-[ion--cloud-upload-outline]",
|
|
1146
1154
|
role: "img",
|
|
1147
1155
|
"aria-hidden": "true"
|
|
1148
|
-
},
|
|
1156
|
+
}, wl = {
|
|
1149
1157
|
key: 2,
|
|
1150
1158
|
class: "icon-[ph--images-thin]",
|
|
1151
1159
|
role: "img",
|
|
1152
1160
|
"aria-hidden": "true"
|
|
1153
|
-
},
|
|
1161
|
+
}, Sl = { class: "qy-remark-image__popover" }, kl = ["src"], xl = { class: "qy-remark-image__popover-footer" }, Vl = /* @__PURE__ */ Be({
|
|
1154
1162
|
__name: "index",
|
|
1155
1163
|
props: {
|
|
1156
1164
|
defaultValue: { default: "" },
|
|
@@ -1171,14 +1179,14 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1171
1179
|
uploadRequest: {}
|
|
1172
1180
|
},
|
|
1173
1181
|
emits: ["change", "update:selectValue", "select-change"],
|
|
1174
|
-
setup(t, { expose:
|
|
1175
|
-
const e = t, n = W, H =
|
|
1182
|
+
setup(t, { expose: P, emit: W }) {
|
|
1183
|
+
const e = t, n = W, H = Qe(), c = q(null), m = q(""), f = q(""), A = q(!1), x = F(
|
|
1176
1184
|
() => e.layout === "select-prefix"
|
|
1177
1185
|
), D = F(() => ({
|
|
1178
|
-
"qy-remark-image--select-prefix":
|
|
1179
|
-
})),
|
|
1180
|
-
() =>
|
|
1181
|
-
),
|
|
1186
|
+
"qy-remark-image--select-prefix": x.value
|
|
1187
|
+
})), E = F(
|
|
1188
|
+
() => x.value || e.type === "text" ? "text" : "textarea"
|
|
1189
|
+
), M = F(() => {
|
|
1182
1190
|
if (e.width)
|
|
1183
1191
|
return {
|
|
1184
1192
|
width: typeof e.width == "number" ? `${e.width}px` : e.width
|
|
@@ -1186,47 +1194,47 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1186
1194
|
});
|
|
1187
1195
|
fe(
|
|
1188
1196
|
() => e.defaultValue,
|
|
1189
|
-
(
|
|
1190
|
-
const
|
|
1191
|
-
m.value =
|
|
1197
|
+
(b) => {
|
|
1198
|
+
const $ = st(b || "");
|
|
1199
|
+
m.value = $.text, f.value = $.imageUrl || e.defaultImage || "";
|
|
1192
1200
|
},
|
|
1193
1201
|
{ immediate: !0 }
|
|
1194
1202
|
), fe(
|
|
1195
1203
|
() => e.defaultImage,
|
|
1196
|
-
(
|
|
1197
|
-
|
|
1204
|
+
(b) => {
|
|
1205
|
+
b !== void 0 && !st(e.defaultValue || "").imageUrl && (f.value = b || "");
|
|
1198
1206
|
},
|
|
1199
1207
|
{ immediate: !0 }
|
|
1200
|
-
),
|
|
1201
|
-
De(
|
|
1202
|
-
}),
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1208
|
+
), Xe(() => {
|
|
1209
|
+
De(G);
|
|
1210
|
+
}), mt(() => {
|
|
1211
|
+
const b = j();
|
|
1212
|
+
b && b.removeEventListener("paste", X);
|
|
1205
1213
|
});
|
|
1206
|
-
function
|
|
1207
|
-
var
|
|
1208
|
-
return ((
|
|
1214
|
+
function j() {
|
|
1215
|
+
var b, $;
|
|
1216
|
+
return ((b = c.value) == null ? void 0 : b.textarea) || (($ = c.value) == null ? void 0 : $.input) || null;
|
|
1209
1217
|
}
|
|
1210
|
-
function
|
|
1211
|
-
const
|
|
1212
|
-
|
|
1218
|
+
function G() {
|
|
1219
|
+
const b = j();
|
|
1220
|
+
b && (b.removeEventListener("paste", X), b.addEventListener("paste", X));
|
|
1213
1221
|
}
|
|
1214
|
-
function
|
|
1215
|
-
m.value =
|
|
1222
|
+
function z(b) {
|
|
1223
|
+
m.value = ml(b || "");
|
|
1216
1224
|
}
|
|
1217
|
-
function U(
|
|
1218
|
-
n("update:selectValue",
|
|
1225
|
+
function U(b) {
|
|
1226
|
+
n("update:selectValue", b), n("select-change", b);
|
|
1219
1227
|
}
|
|
1220
|
-
function
|
|
1221
|
-
f.value = "",
|
|
1228
|
+
function ae() {
|
|
1229
|
+
f.value = "", Z();
|
|
1222
1230
|
}
|
|
1223
|
-
function
|
|
1224
|
-
m.value = "", f.value = "",
|
|
1231
|
+
function J() {
|
|
1232
|
+
m.value = "", f.value = "", Z();
|
|
1225
1233
|
}
|
|
1226
|
-
async function X(
|
|
1234
|
+
async function X(b) {
|
|
1227
1235
|
var o;
|
|
1228
|
-
const a = Array.from(((o =
|
|
1229
|
-
a && (
|
|
1236
|
+
const a = Array.from(((o = b.clipboardData) == null ? void 0 : o.files) || []).find((K) => K.type.startsWith("image/"));
|
|
1237
|
+
a && (b.preventDefault(), await oe({
|
|
1230
1238
|
file: a,
|
|
1231
1239
|
onError: () => {
|
|
1232
1240
|
},
|
|
@@ -1236,67 +1244,67 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1236
1244
|
}
|
|
1237
1245
|
}));
|
|
1238
1246
|
}
|
|
1239
|
-
async function
|
|
1240
|
-
var
|
|
1241
|
-
if (
|
|
1242
|
-
return
|
|
1247
|
+
async function oe(b) {
|
|
1248
|
+
var $, a;
|
|
1249
|
+
if (b.file.size > 51200 * 1e3)
|
|
1250
|
+
return be.error("图片过大"), !1;
|
|
1243
1251
|
A.value = !0;
|
|
1244
1252
|
try {
|
|
1245
|
-
const o = await ne(
|
|
1246
|
-
return f.value =
|
|
1253
|
+
const o = await ne(b);
|
|
1254
|
+
return f.value = ie(o), Z(), be.success("上传图片成功"), ($ = b.onSuccess) == null || $.call(b, o), !0;
|
|
1247
1255
|
} catch (o) {
|
|
1248
|
-
return (a =
|
|
1256
|
+
return (a = b.onError) == null || a.call(b, o), be.error("上传失败"), !1;
|
|
1249
1257
|
} finally {
|
|
1250
1258
|
A.value = !1;
|
|
1251
1259
|
}
|
|
1252
1260
|
}
|
|
1253
|
-
async function ne(
|
|
1254
|
-
const
|
|
1255
|
-
if (
|
|
1261
|
+
async function ne(b) {
|
|
1262
|
+
const $ = new FormData();
|
|
1263
|
+
if ($.append(e.uploadName, b.file), e.uploadRequest)
|
|
1256
1264
|
return e.uploadRequest({
|
|
1257
|
-
file:
|
|
1258
|
-
formData:
|
|
1259
|
-
options:
|
|
1265
|
+
file: b.file,
|
|
1266
|
+
formData: $,
|
|
1267
|
+
options: b,
|
|
1260
1268
|
api: e.api,
|
|
1261
1269
|
tokenKey: e.tokenKey
|
|
1262
1270
|
});
|
|
1263
1271
|
const a = kt.get(e.tokenKey);
|
|
1264
1272
|
return (await fetch(e.api, {
|
|
1265
1273
|
method: "POST",
|
|
1266
|
-
body:
|
|
1274
|
+
body: $,
|
|
1267
1275
|
credentials: "include",
|
|
1268
1276
|
headers: a ? { Authorization: `Bearer ${a}` } : void 0
|
|
1269
1277
|
})).json();
|
|
1270
1278
|
}
|
|
1271
|
-
function
|
|
1272
|
-
var o,
|
|
1273
|
-
if (typeof
|
|
1274
|
-
const
|
|
1279
|
+
function ie(b) {
|
|
1280
|
+
var o, K;
|
|
1281
|
+
if (typeof b == "string") return b;
|
|
1282
|
+
const $ = b, a = ($ == null ? void 0 : $.urls) ?? ((o = $ == null ? void 0 : $.data) == null ? void 0 : o.urls) ?? ((K = $ == null ? void 0 : $.data) == null ? void 0 : K.url) ?? ($ == null ? void 0 : $.url) ?? "";
|
|
1275
1283
|
return Array.isArray(a) ? a[0] || "" : a || "";
|
|
1276
1284
|
}
|
|
1277
|
-
function
|
|
1285
|
+
function Z() {
|
|
1278
1286
|
n(
|
|
1279
1287
|
"change",
|
|
1280
1288
|
ut(m.value || "", f.value || ""),
|
|
1281
1289
|
f.value || ""
|
|
1282
1290
|
);
|
|
1283
1291
|
}
|
|
1284
|
-
return
|
|
1285
|
-
deleteImage:
|
|
1292
|
+
return P({
|
|
1293
|
+
deleteImage: ae,
|
|
1286
1294
|
// 兼容旧 remarkImage,在表单 reset/clearFrom 时清空文字和图片。
|
|
1287
|
-
clearContent:
|
|
1295
|
+
clearContent: J,
|
|
1288
1296
|
// 给表单保存或外部调试读取当前拆分值。
|
|
1289
1297
|
getValue: () => ({
|
|
1290
1298
|
text: m.value || "",
|
|
1291
1299
|
imageUrl: f.value || "",
|
|
1292
1300
|
value: ut(m.value || "", f.value || "")
|
|
1293
1301
|
})
|
|
1294
|
-
}), (
|
|
1295
|
-
class:
|
|
1296
|
-
style:
|
|
1302
|
+
}), (b, $) => (v(), Q("div", {
|
|
1303
|
+
class: ke(["qy-remark-image", D.value]),
|
|
1304
|
+
style: Pe(M.value)
|
|
1297
1305
|
}, [
|
|
1298
|
-
|
|
1299
|
-
|
|
1306
|
+
R("div", yl, [
|
|
1307
|
+
x.value ? (v(), de(C(ht), {
|
|
1300
1308
|
key: 0,
|
|
1301
1309
|
class: "qy-remark-image__prefix-select",
|
|
1302
1310
|
"model-value": t.selectValue,
|
|
@@ -1305,8 +1313,8 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1305
1313
|
size: "small",
|
|
1306
1314
|
"onUpdate:modelValue": U
|
|
1307
1315
|
}, {
|
|
1308
|
-
default:
|
|
1309
|
-
(
|
|
1316
|
+
default: h(() => [
|
|
1317
|
+
(v(!0), Q(Fe, null, et(t.selectOptions, (a) => (v(), de(C(bt), {
|
|
1310
1318
|
key: String(a.value),
|
|
1311
1319
|
label: a.label,
|
|
1312
1320
|
value: a.value,
|
|
@@ -1314,59 +1322,59 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1314
1322
|
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
1315
1323
|
]),
|
|
1316
1324
|
_: 1
|
|
1317
|
-
}, 8, ["model-value", "options", "disabled"])) :
|
|
1318
|
-
|
|
1319
|
-
|
|
1325
|
+
}, 8, ["model-value", "options", "disabled"])) : T("", !0),
|
|
1326
|
+
x.value ? (v(), Q("span", gl)) : T("", !0),
|
|
1327
|
+
O(C(Oe), Ve({
|
|
1320
1328
|
ref_key: "inputRef",
|
|
1321
1329
|
ref: c,
|
|
1322
1330
|
"model-value": m.value,
|
|
1323
|
-
type:
|
|
1331
|
+
type: E.value,
|
|
1324
1332
|
rows: t.rows,
|
|
1325
1333
|
autosize: t.autosize,
|
|
1326
1334
|
disabled: t.disabled,
|
|
1327
1335
|
placeholder: t.placeholder
|
|
1328
|
-
},
|
|
1329
|
-
"onUpdate:modelValue":
|
|
1330
|
-
onBlur:
|
|
1336
|
+
}, C(H), {
|
|
1337
|
+
"onUpdate:modelValue": z,
|
|
1338
|
+
onBlur: Z
|
|
1331
1339
|
}), null, 16, ["model-value", "type", "rows", "autosize", "disabled", "placeholder"]),
|
|
1332
|
-
|
|
1340
|
+
O(C(va), {
|
|
1333
1341
|
placement: "top-start",
|
|
1334
1342
|
width: 400,
|
|
1335
1343
|
trigger: "hover",
|
|
1336
1344
|
disabled: !f.value
|
|
1337
1345
|
}, {
|
|
1338
|
-
reference:
|
|
1339
|
-
|
|
1340
|
-
|
|
1346
|
+
reference: h(() => [
|
|
1347
|
+
R("div", vl, [
|
|
1348
|
+
O(C(ha), {
|
|
1341
1349
|
disabled: A.value || t.disabled,
|
|
1342
1350
|
class: "qy-remark-image__upload",
|
|
1343
1351
|
"show-file-list": !1,
|
|
1344
|
-
"http-request":
|
|
1352
|
+
"http-request": oe
|
|
1345
1353
|
}, {
|
|
1346
|
-
default:
|
|
1347
|
-
A.value ? (
|
|
1354
|
+
default: h(() => [
|
|
1355
|
+
A.value ? (v(), Q("span", hl)) : f.value ? (v(), Q("span", wl)) : (v(), Q("span", bl))
|
|
1348
1356
|
]),
|
|
1349
1357
|
_: 1
|
|
1350
1358
|
}, 8, ["disabled"])
|
|
1351
1359
|
])
|
|
1352
1360
|
]),
|
|
1353
|
-
default:
|
|
1354
|
-
|
|
1355
|
-
|
|
1361
|
+
default: h(() => [
|
|
1362
|
+
R("div", Sl, [
|
|
1363
|
+
R("img", {
|
|
1356
1364
|
src: f.value,
|
|
1357
1365
|
class: "qy-remark-image__preview-img"
|
|
1358
|
-
}, null, 8,
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1366
|
+
}, null, 8, kl),
|
|
1367
|
+
R("div", xl, [
|
|
1368
|
+
$[1] || ($[1] = R("span", { class: "qy-remark-image__popover-tip" }, "再次点击按钮可更换图片", -1)),
|
|
1369
|
+
O(C(qe), {
|
|
1362
1370
|
link: "",
|
|
1363
1371
|
size: "small",
|
|
1364
1372
|
type: "danger",
|
|
1365
1373
|
disabled: t.disabled,
|
|
1366
|
-
onClick:
|
|
1374
|
+
onClick: ae
|
|
1367
1375
|
}, {
|
|
1368
|
-
default:
|
|
1369
|
-
|
|
1376
|
+
default: h(() => [...$[0] || ($[0] = [
|
|
1377
|
+
we(" 删除图片 ", -1)
|
|
1370
1378
|
])]),
|
|
1371
1379
|
_: 1
|
|
1372
1380
|
}, 8, ["disabled"])
|
|
@@ -1378,7 +1386,7 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1378
1386
|
])
|
|
1379
1387
|
], 6));
|
|
1380
1388
|
}
|
|
1381
|
-
}),
|
|
1389
|
+
}), Cl = /* @__PURE__ */ Re(Vl, [["__scopeId", "data-v-3158c066"]]), $l = /* @__PURE__ */ Be({
|
|
1382
1390
|
name: "QyMoneyInput",
|
|
1383
1391
|
inheritAttrs: !1,
|
|
1384
1392
|
__name: "index",
|
|
@@ -1392,8 +1400,8 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1392
1400
|
emptyValue: { default: "" }
|
|
1393
1401
|
},
|
|
1394
1402
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "enter"],
|
|
1395
|
-
setup(t, { expose:
|
|
1396
|
-
const e = t, n = W, H =
|
|
1403
|
+
setup(t, { expose: P, emit: W }) {
|
|
1404
|
+
const e = t, n = W, H = Qe(), c = q(null), m = q(A(e.modelValue)), f = F(() => A(e.modelValue));
|
|
1397
1405
|
fe(
|
|
1398
1406
|
() => e.modelValue,
|
|
1399
1407
|
(a) => {
|
|
@@ -1403,66 +1411,66 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1403
1411
|
function A(a) {
|
|
1404
1412
|
return a == null ? "" : String(a);
|
|
1405
1413
|
}
|
|
1406
|
-
function
|
|
1414
|
+
function x(a) {
|
|
1407
1415
|
return Number.isFinite(a) ? Math.max(0, Math.floor(a)) : 2;
|
|
1408
1416
|
}
|
|
1409
1417
|
function D(a) {
|
|
1410
1418
|
const o = A(a);
|
|
1411
|
-
let
|
|
1412
|
-
const y =
|
|
1413
|
-
for (let
|
|
1414
|
-
const g = o[
|
|
1419
|
+
let K = "", te = !1, s = !1;
|
|
1420
|
+
const y = x(e.precision);
|
|
1421
|
+
for (let V = 0; V < o.length; V += 1) {
|
|
1422
|
+
const g = o[V];
|
|
1415
1423
|
if (g >= "0" && g <= "9") {
|
|
1416
|
-
|
|
1424
|
+
K += g;
|
|
1417
1425
|
continue;
|
|
1418
1426
|
}
|
|
1419
|
-
if (g === "." && y > 0 && !
|
|
1420
|
-
|
|
1427
|
+
if (g === "." && y > 0 && !te) {
|
|
1428
|
+
K += g, te = !0;
|
|
1421
1429
|
continue;
|
|
1422
1430
|
}
|
|
1423
|
-
g === "-" && e.allowNegative &&
|
|
1431
|
+
g === "-" && e.allowNegative && V === 0 && !s && (K += g, s = !0);
|
|
1424
1432
|
}
|
|
1425
|
-
if (y > 0 &&
|
|
1426
|
-
const [
|
|
1427
|
-
return `${
|
|
1433
|
+
if (y > 0 && te) {
|
|
1434
|
+
const [V, g = ""] = K.split(".");
|
|
1435
|
+
return `${V}.${g.slice(0, y)}`;
|
|
1428
1436
|
}
|
|
1429
|
-
return
|
|
1437
|
+
return K;
|
|
1430
1438
|
}
|
|
1431
|
-
function
|
|
1439
|
+
function E(a) {
|
|
1432
1440
|
let o = a;
|
|
1433
1441
|
return typeof e.min == "number" && Number.isFinite(e.min) && (o = Math.max(o, e.min)), typeof e.max == "number" && Number.isFinite(e.max) && (o = Math.min(o, e.max)), o;
|
|
1434
1442
|
}
|
|
1435
|
-
function
|
|
1443
|
+
function M(a) {
|
|
1436
1444
|
const o = D(a);
|
|
1437
1445
|
if (!o || o === "-" || o === ".")
|
|
1438
1446
|
return A(e.emptyValue);
|
|
1439
|
-
const
|
|
1440
|
-
if (Number.isNaN(
|
|
1441
|
-
const
|
|
1442
|
-
return
|
|
1447
|
+
const K = Number(o);
|
|
1448
|
+
if (Number.isNaN(K)) return A(e.emptyValue);
|
|
1449
|
+
const te = x(e.precision);
|
|
1450
|
+
return E(K).toFixed(te);
|
|
1443
1451
|
}
|
|
1444
|
-
function
|
|
1452
|
+
function j(a) {
|
|
1445
1453
|
m.value = a, n("update:modelValue", a);
|
|
1446
1454
|
}
|
|
1447
|
-
function
|
|
1455
|
+
function G(a) {
|
|
1448
1456
|
const o = D(a);
|
|
1449
|
-
|
|
1457
|
+
j(o);
|
|
1450
1458
|
}
|
|
1451
|
-
function
|
|
1459
|
+
function z(a) {
|
|
1452
1460
|
const o = D(a);
|
|
1453
1461
|
m.value = o, n("input", o);
|
|
1454
1462
|
}
|
|
1455
1463
|
function U(a) {
|
|
1456
|
-
const o = e.formatTrigger === "change" ?
|
|
1457
|
-
o !== A(e.modelValue) &&
|
|
1464
|
+
const o = e.formatTrigger === "change" ? M(a) : D(a);
|
|
1465
|
+
o !== A(e.modelValue) && j(o), n("change", o);
|
|
1458
1466
|
}
|
|
1459
|
-
function
|
|
1467
|
+
function ae(a) {
|
|
1460
1468
|
n("focus", a);
|
|
1461
1469
|
}
|
|
1462
|
-
function
|
|
1470
|
+
function J(a) {
|
|
1463
1471
|
if (e.formatTrigger === "blur") {
|
|
1464
|
-
const o =
|
|
1465
|
-
o !== A(e.modelValue) &&
|
|
1472
|
+
const o = M(m.value);
|
|
1473
|
+
o !== A(e.modelValue) && j(o);
|
|
1466
1474
|
}
|
|
1467
1475
|
n("blur", a);
|
|
1468
1476
|
}
|
|
@@ -1470,164 +1478,80 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1470
1478
|
const a = A(e.emptyValue);
|
|
1471
1479
|
m.value = a, n("update:modelValue", a), n("clear");
|
|
1472
1480
|
}
|
|
1473
|
-
function
|
|
1481
|
+
function oe(a) {
|
|
1474
1482
|
n("enter", a);
|
|
1475
1483
|
}
|
|
1476
1484
|
function ne() {
|
|
1477
1485
|
var a, o;
|
|
1478
1486
|
(o = (a = c.value) == null ? void 0 : a.focus) == null || o.call(a);
|
|
1479
1487
|
}
|
|
1480
|
-
function
|
|
1488
|
+
function ie() {
|
|
1481
1489
|
var a, o;
|
|
1482
1490
|
(o = (a = c.value) == null ? void 0 : a.blur) == null || o.call(a);
|
|
1483
1491
|
}
|
|
1484
|
-
function
|
|
1492
|
+
function Z() {
|
|
1485
1493
|
var a, o;
|
|
1486
1494
|
(o = (a = c.value) == null ? void 0 : a.select) == null || o.call(a);
|
|
1487
1495
|
}
|
|
1488
|
-
function
|
|
1496
|
+
function b() {
|
|
1489
1497
|
var a, o;
|
|
1490
1498
|
(o = (a = c.value) == null ? void 0 : a.clear) == null || o.call(a);
|
|
1491
1499
|
}
|
|
1492
|
-
function
|
|
1500
|
+
function $() {
|
|
1493
1501
|
var a;
|
|
1494
1502
|
return ((a = c.value) == null ? void 0 : a.input) || null;
|
|
1495
1503
|
}
|
|
1496
|
-
return
|
|
1504
|
+
return P({
|
|
1497
1505
|
focus: ne,
|
|
1498
|
-
blur:
|
|
1499
|
-
select:
|
|
1500
|
-
clear:
|
|
1501
|
-
getNativeInput:
|
|
1502
|
-
}), (a, o) => (
|
|
1506
|
+
blur: ie,
|
|
1507
|
+
select: Z,
|
|
1508
|
+
clear: b,
|
|
1509
|
+
getNativeInput: $
|
|
1510
|
+
}), (a, o) => (v(), de(C(Oe), Ve({
|
|
1503
1511
|
ref_key: "inputRef",
|
|
1504
1512
|
ref: c
|
|
1505
|
-
},
|
|
1513
|
+
}, C(H), {
|
|
1506
1514
|
"model-value": f.value,
|
|
1507
1515
|
inputmode: "decimal",
|
|
1508
|
-
"onUpdate:modelValue":
|
|
1509
|
-
onInput:
|
|
1516
|
+
"onUpdate:modelValue": G,
|
|
1517
|
+
onInput: z,
|
|
1510
1518
|
onChange: U,
|
|
1511
|
-
onFocus:
|
|
1512
|
-
onBlur:
|
|
1519
|
+
onFocus: ae,
|
|
1520
|
+
onBlur: J,
|
|
1513
1521
|
onClear: X,
|
|
1514
|
-
onKeydown:
|
|
1522
|
+
onKeydown: je(oe, ["enter"])
|
|
1515
1523
|
}), Ue({ _: 2 }, [
|
|
1516
1524
|
a.$slots.prefix ? {
|
|
1517
1525
|
name: "prefix",
|
|
1518
|
-
fn:
|
|
1519
|
-
|
|
1526
|
+
fn: h(() => [
|
|
1527
|
+
I(a.$slots, "prefix")
|
|
1520
1528
|
]),
|
|
1521
1529
|
key: "0"
|
|
1522
1530
|
} : void 0,
|
|
1523
1531
|
a.$slots.suffix ? {
|
|
1524
1532
|
name: "suffix",
|
|
1525
|
-
fn:
|
|
1526
|
-
|
|
1533
|
+
fn: h(() => [
|
|
1534
|
+
I(a.$slots, "suffix")
|
|
1527
1535
|
]),
|
|
1528
1536
|
key: "1"
|
|
1529
1537
|
} : void 0,
|
|
1530
1538
|
a.$slots.prepend ? {
|
|
1531
1539
|
name: "prepend",
|
|
1532
|
-
fn:
|
|
1533
|
-
|
|
1540
|
+
fn: h(() => [
|
|
1541
|
+
I(a.$slots, "prepend")
|
|
1534
1542
|
]),
|
|
1535
1543
|
key: "2"
|
|
1536
1544
|
} : void 0,
|
|
1537
1545
|
a.$slots.append ? {
|
|
1538
1546
|
name: "append",
|
|
1539
|
-
fn:
|
|
1540
|
-
|
|
1547
|
+
fn: h(() => [
|
|
1548
|
+
I(a.$slots, "append")
|
|
1541
1549
|
]),
|
|
1542
1550
|
key: "3"
|
|
1543
1551
|
} : void 0
|
|
1544
1552
|
]), 1040, ["model-value"]));
|
|
1545
1553
|
}
|
|
1546
|
-
}),
|
|
1547
|
-
name: "QyRadioGroup",
|
|
1548
|
-
inheritAttrs: !1,
|
|
1549
|
-
__name: "index",
|
|
1550
|
-
props: {
|
|
1551
|
-
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
1552
|
-
options: { default: () => [] },
|
|
1553
|
-
labelKey: { default: "label" },
|
|
1554
|
-
valueKey: { default: "value" },
|
|
1555
|
-
disabledKey: { default: "disabled" },
|
|
1556
|
-
disabled: { type: Boolean, default: !1 },
|
|
1557
|
-
size: { default: void 0 },
|
|
1558
|
-
name: { default: void 0 },
|
|
1559
|
-
type: { default: "radio" },
|
|
1560
|
-
border: { type: Boolean, default: !1 }
|
|
1561
|
-
},
|
|
1562
|
-
emits: ["update:modelValue", "change"],
|
|
1563
|
-
setup(t, { expose: O, emit: W }) {
|
|
1564
|
-
const e = t, n = W, H = ze(), c = z(null), m = F(
|
|
1565
|
-
() => e.type === "button" ? ma : pa
|
|
1566
|
-
), f = F(
|
|
1567
|
-
() => (e.options || []).map((v) => ({
|
|
1568
|
-
raw: v,
|
|
1569
|
-
label: (v == null ? void 0 : v[e.labelKey]) ?? (v == null ? void 0 : v.label) ?? (v == null ? void 0 : v.value) ?? "",
|
|
1570
|
-
value: (v == null ? void 0 : v[e.valueKey]) ?? (v == null ? void 0 : v.value) ?? (v == null ? void 0 : v.label),
|
|
1571
|
-
disabled: !!(v != null && v[e.disabledKey])
|
|
1572
|
-
}))
|
|
1573
|
-
);
|
|
1574
|
-
function A(v) {
|
|
1575
|
-
const E = {
|
|
1576
|
-
value: v.value,
|
|
1577
|
-
label: v.value,
|
|
1578
|
-
disabled: v.disabled
|
|
1579
|
-
};
|
|
1580
|
-
return e.type === "button" ? E : {
|
|
1581
|
-
...E,
|
|
1582
|
-
border: e.border
|
|
1583
|
-
};
|
|
1584
|
-
}
|
|
1585
|
-
function V(v, E) {
|
|
1586
|
-
return `${String(v.value ?? v.label ?? "")}-${E}`;
|
|
1587
|
-
}
|
|
1588
|
-
function D(v) {
|
|
1589
|
-
n("update:modelValue", v);
|
|
1590
|
-
}
|
|
1591
|
-
function L(v) {
|
|
1592
|
-
n("change", v);
|
|
1593
|
-
}
|
|
1594
|
-
function P() {
|
|
1595
|
-
return c.value;
|
|
1596
|
-
}
|
|
1597
|
-
return O({
|
|
1598
|
-
getRadioGroupInstance: P
|
|
1599
|
-
}), (v, E) => (h(), ie(x(ya), Se({
|
|
1600
|
-
ref_key: "radioGroupRef",
|
|
1601
|
-
ref: c
|
|
1602
|
-
}, x(H), {
|
|
1603
|
-
"model-value": t.modelValue,
|
|
1604
|
-
disabled: t.disabled,
|
|
1605
|
-
size: t.size,
|
|
1606
|
-
name: t.name,
|
|
1607
|
-
"onUpdate:modelValue": D,
|
|
1608
|
-
onChange: L
|
|
1609
|
-
}), {
|
|
1610
|
-
default: b(() => [
|
|
1611
|
-
v.$slots.default ? Q(v.$slots, "default", {}, void 0, void 0, 0) : (h(!0), R(Ie, { key: 1 }, je(f.value, ($, U) => (h(), ie(ra(m.value), Se({
|
|
1612
|
-
key: V($, U)
|
|
1613
|
-
}, { ref_for: !0 }, A($)), {
|
|
1614
|
-
default: b(() => [
|
|
1615
|
-
Q(v.$slots, "option", {
|
|
1616
|
-
option: $.raw,
|
|
1617
|
-
label: $.label,
|
|
1618
|
-
value: $.value,
|
|
1619
|
-
disabled: $.disabled
|
|
1620
|
-
}, () => [
|
|
1621
|
-
ge(ye($.label), 1)
|
|
1622
|
-
])
|
|
1623
|
-
]),
|
|
1624
|
-
_: 2
|
|
1625
|
-
}, 1040))), 128))
|
|
1626
|
-
]),
|
|
1627
|
-
_: 3
|
|
1628
|
-
}, 16, ["model-value", "disabled", "size", "name"]));
|
|
1629
|
-
}
|
|
1630
|
-
}), hl = /* @__PURE__ */ Be({
|
|
1554
|
+
}), ql = /* @__PURE__ */ Be({
|
|
1631
1555
|
name: "QyRemoteSelect",
|
|
1632
1556
|
inheritAttrs: !1,
|
|
1633
1557
|
__name: "index",
|
|
@@ -1660,15 +1584,15 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1660
1584
|
commitOnBlur: { type: Boolean, default: !1 }
|
|
1661
1585
|
},
|
|
1662
1586
|
emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur", "options-change", "loading-change", "error"],
|
|
1663
|
-
setup(t, { expose:
|
|
1664
|
-
const e = t, n = W, H =
|
|
1665
|
-
let
|
|
1666
|
-
const
|
|
1667
|
-
if (
|
|
1668
|
-
const p = /* @__PURE__ */ new Map(),
|
|
1669
|
-
p.set(
|
|
1587
|
+
setup(t, { expose: P, emit: W }) {
|
|
1588
|
+
const e = t, n = W, H = Qe(), c = q(null), m = q([]), f = q(/* @__PURE__ */ new Map()), A = q(!1), x = q(""), D = q("");
|
|
1589
|
+
let E = 0, M = null;
|
|
1590
|
+
const j = F(() => e.loading || A.value), G = q(!1), z = F(() => x.value !== ""), U = F(() => {
|
|
1591
|
+
if (z.value) return m.value;
|
|
1592
|
+
const p = /* @__PURE__ */ new Map(), Y = (i) => {
|
|
1593
|
+
p.set(ae(i), i);
|
|
1670
1594
|
};
|
|
1671
|
-
return e.defaultOptions.forEach(
|
|
1595
|
+
return e.defaultOptions.forEach(Y), e.reserveSelectedOption && f.value.forEach((i) => Y(i)), m.value.forEach(Y), Array.from(p.values());
|
|
1672
1596
|
});
|
|
1673
1597
|
fe(
|
|
1674
1598
|
() => e.defaultOptions,
|
|
@@ -1683,72 +1607,72 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1683
1607
|
},
|
|
1684
1608
|
{ immediate: !0 }
|
|
1685
1609
|
);
|
|
1686
|
-
function
|
|
1610
|
+
function ae(p) {
|
|
1687
1611
|
return (p == null ? void 0 : p[e.valueKey]) ?? (p == null ? void 0 : p.value) ?? (p == null ? void 0 : p.label);
|
|
1688
1612
|
}
|
|
1689
|
-
function
|
|
1613
|
+
function J(p) {
|
|
1690
1614
|
return Array.isArray(e.modelValue) ? e.modelValue.includes(p) : e.modelValue === p;
|
|
1691
1615
|
}
|
|
1692
1616
|
function X(p) {
|
|
1693
1617
|
if (!e.reserveSelectedOption) return;
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1618
|
+
const Y = ae(p);
|
|
1619
|
+
J(Y) && f.value.set(Y, p);
|
|
1696
1620
|
}
|
|
1697
|
-
function
|
|
1621
|
+
function oe(p) {
|
|
1698
1622
|
return e.disabled ? !1 : p ? p.length >= e.minLength : e.remoteOnFocus;
|
|
1699
1623
|
}
|
|
1700
1624
|
function ne(p) {
|
|
1701
1625
|
A.value !== p && (A.value = p, n("loading-change", p));
|
|
1702
1626
|
}
|
|
1703
|
-
async function
|
|
1704
|
-
const
|
|
1705
|
-
if (
|
|
1627
|
+
async function ie(p) {
|
|
1628
|
+
const Y = B(p), i = ++E;
|
|
1629
|
+
if (re(Y), !oe(Y)) {
|
|
1706
1630
|
m.value = [], ne(!1), n("options-change", U.value);
|
|
1707
1631
|
return;
|
|
1708
1632
|
}
|
|
1709
1633
|
ne(!0);
|
|
1710
1634
|
try {
|
|
1711
|
-
const
|
|
1712
|
-
if (
|
|
1713
|
-
m.value = Array.isArray(
|
|
1714
|
-
} catch (
|
|
1715
|
-
if (
|
|
1716
|
-
m.value = [], n("error",
|
|
1635
|
+
const w = await e.fetchMethod(Y);
|
|
1636
|
+
if (i !== E) return;
|
|
1637
|
+
m.value = Array.isArray(w) ? w : [], m.value.forEach(X), n("options-change", U.value);
|
|
1638
|
+
} catch (w) {
|
|
1639
|
+
if (i !== E) return;
|
|
1640
|
+
m.value = [], n("error", w), n("options-change", U.value);
|
|
1717
1641
|
} finally {
|
|
1718
|
-
|
|
1642
|
+
i === E && ne(!1);
|
|
1719
1643
|
}
|
|
1720
1644
|
}
|
|
1721
|
-
function
|
|
1722
|
-
|
|
1645
|
+
function Z() {
|
|
1646
|
+
G.value || (G.value = !0, ie(""));
|
|
1723
1647
|
}
|
|
1724
|
-
function
|
|
1725
|
-
const
|
|
1726
|
-
D.value =
|
|
1727
|
-
|
|
1648
|
+
function b(p) {
|
|
1649
|
+
const Y = B(p);
|
|
1650
|
+
D.value = Y, E += 1, re(Y), M && (clearTimeout(M), M = null), M = setTimeout(() => {
|
|
1651
|
+
ie(Y);
|
|
1728
1652
|
}, e.debounce);
|
|
1729
1653
|
}
|
|
1730
|
-
function
|
|
1731
|
-
|
|
1654
|
+
function $() {
|
|
1655
|
+
G.value = !0, ie("");
|
|
1732
1656
|
}
|
|
1733
1657
|
function a() {
|
|
1734
|
-
|
|
1658
|
+
ie(x.value);
|
|
1735
1659
|
}
|
|
1736
1660
|
function o(p) {
|
|
1737
1661
|
D.value = "", n("update:modelValue", p);
|
|
1738
1662
|
}
|
|
1739
|
-
function
|
|
1663
|
+
function K(p) {
|
|
1740
1664
|
D.value = "", U.value.forEach(X), n("change", p);
|
|
1741
1665
|
}
|
|
1742
|
-
function
|
|
1666
|
+
function te() {
|
|
1743
1667
|
D.value = "", n("clear");
|
|
1744
1668
|
}
|
|
1745
1669
|
function s(p) {
|
|
1746
|
-
p && e.remoteOnFocus && !
|
|
1670
|
+
p && e.remoteOnFocus && !x.value && Z(), n("visible-change", p);
|
|
1747
1671
|
}
|
|
1748
1672
|
function y(p) {
|
|
1749
|
-
e.remoteOnFocus && !
|
|
1673
|
+
e.remoteOnFocus && !x.value && Z(), n("focus", p);
|
|
1750
1674
|
}
|
|
1751
|
-
function
|
|
1675
|
+
function V(p) {
|
|
1752
1676
|
g(), n("blur", p);
|
|
1753
1677
|
}
|
|
1754
1678
|
function g() {
|
|
@@ -1756,36 +1680,36 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1756
1680
|
const p = D.value;
|
|
1757
1681
|
p.trim() && (D.value = "", n("update:modelValue", p), n("change", p));
|
|
1758
1682
|
}
|
|
1759
|
-
function
|
|
1683
|
+
function B(p) {
|
|
1760
1684
|
return String(p ?? "");
|
|
1761
1685
|
}
|
|
1762
|
-
function
|
|
1763
|
-
|
|
1686
|
+
function re(p) {
|
|
1687
|
+
x.value = p, m.value = [], n("options-change", U.value);
|
|
1764
1688
|
}
|
|
1765
|
-
function
|
|
1766
|
-
var p,
|
|
1767
|
-
(
|
|
1689
|
+
function pe() {
|
|
1690
|
+
var p, Y;
|
|
1691
|
+
(Y = (p = c.value) == null ? void 0 : p.focus) == null || Y.call(p);
|
|
1768
1692
|
}
|
|
1769
|
-
function
|
|
1770
|
-
var p,
|
|
1771
|
-
(
|
|
1693
|
+
function ge() {
|
|
1694
|
+
var p, Y;
|
|
1695
|
+
(Y = (p = c.value) == null ? void 0 : p.blur) == null || Y.call(p);
|
|
1772
1696
|
}
|
|
1773
|
-
function
|
|
1697
|
+
function xe() {
|
|
1774
1698
|
n("update:modelValue", e.multiple ? [] : ""), n("clear");
|
|
1775
1699
|
}
|
|
1776
1700
|
return ft(() => {
|
|
1777
|
-
|
|
1778
|
-
}),
|
|
1701
|
+
M && clearTimeout(M);
|
|
1702
|
+
}), P({
|
|
1779
1703
|
// 暴露远程选择常用控制方法,供弹窗打开后聚焦或请求失败后重试。
|
|
1780
|
-
focus:
|
|
1781
|
-
blur:
|
|
1782
|
-
clear:
|
|
1704
|
+
focus: pe,
|
|
1705
|
+
blur: ge,
|
|
1706
|
+
clear: xe,
|
|
1783
1707
|
retryFetch: a,
|
|
1784
|
-
fetchDefaultOptions:
|
|
1785
|
-
}), (p,
|
|
1708
|
+
fetchDefaultOptions: $
|
|
1709
|
+
}), (p, Y) => (v(), de(tt, Ve({
|
|
1786
1710
|
ref_key: "selectRef",
|
|
1787
1711
|
ref: c
|
|
1788
|
-
},
|
|
1712
|
+
}, C(H), {
|
|
1789
1713
|
"model-value": t.modelValue,
|
|
1790
1714
|
options: U.value,
|
|
1791
1715
|
"label-key": t.labelKey,
|
|
@@ -1806,54 +1730,54 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1806
1730
|
"popper-class": t.popperClass,
|
|
1807
1731
|
remote: "",
|
|
1808
1732
|
"remote-show-suffix": t.remoteShowSuffix,
|
|
1809
|
-
"remote-method":
|
|
1810
|
-
loading:
|
|
1733
|
+
"remote-method": b,
|
|
1734
|
+
loading: j.value,
|
|
1811
1735
|
"onUpdate:modelValue": o,
|
|
1812
|
-
onChange:
|
|
1813
|
-
onClear:
|
|
1736
|
+
onChange: K,
|
|
1737
|
+
onClear: te,
|
|
1814
1738
|
onVisibleChange: s,
|
|
1815
1739
|
onFocus: y,
|
|
1816
|
-
onBlur:
|
|
1740
|
+
onBlur: V
|
|
1817
1741
|
}), Ue({
|
|
1818
|
-
default:
|
|
1819
|
-
p.$slots.default ?
|
|
1742
|
+
default: h(() => [
|
|
1743
|
+
p.$slots.default ? I(p.$slots, "default", {}, void 0, void 0, 0) : T("", !0)
|
|
1820
1744
|
]),
|
|
1821
1745
|
_: 2
|
|
1822
1746
|
}, [
|
|
1823
1747
|
p.$slots.prefix ? {
|
|
1824
1748
|
name: "prefix",
|
|
1825
|
-
fn:
|
|
1826
|
-
|
|
1749
|
+
fn: h(() => [
|
|
1750
|
+
I(p.$slots, "prefix")
|
|
1827
1751
|
]),
|
|
1828
1752
|
key: "0"
|
|
1829
1753
|
} : void 0,
|
|
1830
1754
|
p.$slots.empty ? {
|
|
1831
1755
|
name: "empty",
|
|
1832
|
-
fn:
|
|
1833
|
-
|
|
1756
|
+
fn: h(() => [
|
|
1757
|
+
I(p.$slots, "empty")
|
|
1834
1758
|
]),
|
|
1835
1759
|
key: "1"
|
|
1836
1760
|
} : void 0,
|
|
1837
1761
|
p.$slots.loading ? {
|
|
1838
1762
|
name: "loading",
|
|
1839
|
-
fn:
|
|
1840
|
-
|
|
1763
|
+
fn: h(() => [
|
|
1764
|
+
I(p.$slots, "loading")
|
|
1841
1765
|
]),
|
|
1842
1766
|
key: "2"
|
|
1843
1767
|
} : void 0,
|
|
1844
1768
|
p.$slots.tag ? {
|
|
1845
1769
|
name: "tag",
|
|
1846
|
-
fn:
|
|
1847
|
-
|
|
1770
|
+
fn: h((i) => [
|
|
1771
|
+
I(p.$slots, "tag", gt(vt(i)))
|
|
1848
1772
|
]),
|
|
1849
1773
|
key: "3"
|
|
1850
1774
|
} : void 0
|
|
1851
1775
|
]), 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"]));
|
|
1852
1776
|
}
|
|
1853
|
-
}),
|
|
1777
|
+
}), Bl = { class: "qy-search-input__item" }, Ql = ["innerHTML"], Al = {
|
|
1854
1778
|
key: 0,
|
|
1855
1779
|
class: "qy-search-input__item-description"
|
|
1856
|
-
},
|
|
1780
|
+
}, zl = /* @__PURE__ */ Be({
|
|
1857
1781
|
name: "QySearchInput",
|
|
1858
1782
|
inheritAttrs: !1,
|
|
1859
1783
|
__name: "index",
|
|
@@ -1883,239 +1807,239 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
1883
1807
|
fitInputWidth: { type: Boolean, default: !0 }
|
|
1884
1808
|
},
|
|
1885
1809
|
emits: ["update:modelValue", "search", "clear", "input", "change", "focus", "blur", "enter", "select", "visible-change", "suggestions-change", "error"],
|
|
1886
|
-
setup(t, { expose:
|
|
1887
|
-
const e = t, n = W, H =
|
|
1810
|
+
setup(t, { expose: P, emit: W }) {
|
|
1811
|
+
const e = t, n = W, H = Qe(), c = q(null), m = q(E(e.modelValue)), f = F(() => E(e.modelValue)), A = F(
|
|
1888
1812
|
() => ["qy-search-input__popper", e.popperClass].filter(Boolean).join(" ")
|
|
1889
|
-
),
|
|
1813
|
+
), x = F(() => E(e.modelValue)), D = q("");
|
|
1890
1814
|
fe(
|
|
1891
1815
|
() => e.modelValue,
|
|
1892
|
-
(
|
|
1893
|
-
m.value =
|
|
1816
|
+
(i) => {
|
|
1817
|
+
m.value = E(i);
|
|
1894
1818
|
}
|
|
1895
1819
|
);
|
|
1896
|
-
function
|
|
1897
|
-
return
|
|
1820
|
+
function E(i) {
|
|
1821
|
+
return i == null ? "" : String(i);
|
|
1898
1822
|
}
|
|
1899
|
-
function
|
|
1900
|
-
return e.removeSpace ?
|
|
1823
|
+
function M(i) {
|
|
1824
|
+
return e.removeSpace ? i.replace(/\s+/g, "") : i;
|
|
1901
1825
|
}
|
|
1902
|
-
function
|
|
1903
|
-
return e.trimMode !==
|
|
1826
|
+
function j(i, w) {
|
|
1827
|
+
return e.trimMode !== w ? i : i.trim();
|
|
1904
1828
|
}
|
|
1905
|
-
function
|
|
1906
|
-
return
|
|
1829
|
+
function G(i) {
|
|
1830
|
+
return M(E(i));
|
|
1907
1831
|
}
|
|
1908
|
-
function
|
|
1909
|
-
m.value =
|
|
1832
|
+
function z(i) {
|
|
1833
|
+
m.value = i, n("update:modelValue", i);
|
|
1910
1834
|
}
|
|
1911
|
-
function U(
|
|
1835
|
+
function U(i, w = "") {
|
|
1912
1836
|
return {
|
|
1913
|
-
...
|
|
1914
|
-
label:
|
|
1915
|
-
value:
|
|
1916
|
-
description:
|
|
1837
|
+
...i,
|
|
1838
|
+
label: i.label || i.value,
|
|
1839
|
+
value: i.value || i.label,
|
|
1840
|
+
description: i.description || w
|
|
1917
1841
|
};
|
|
1918
1842
|
}
|
|
1919
|
-
function
|
|
1920
|
-
return
|
|
1921
|
-
if (Array.isArray(
|
|
1922
|
-
const
|
|
1923
|
-
return
|
|
1843
|
+
function ae(i = []) {
|
|
1844
|
+
return i.flatMap((w) => {
|
|
1845
|
+
if (Array.isArray(w.items)) {
|
|
1846
|
+
const ee = w;
|
|
1847
|
+
return ee.items.map((Se) => U(Se, ee.groupLabel));
|
|
1924
1848
|
}
|
|
1925
|
-
return U(
|
|
1849
|
+
return U(w);
|
|
1926
1850
|
});
|
|
1927
1851
|
}
|
|
1928
|
-
function
|
|
1929
|
-
const
|
|
1930
|
-
return (
|
|
1852
|
+
function J(i) {
|
|
1853
|
+
const w = i.toLowerCase();
|
|
1854
|
+
return (ee) => [ee.label, ee.value, ee.description].filter(Boolean).some((Se) => String(Se).toLowerCase().includes(w));
|
|
1931
1855
|
}
|
|
1932
|
-
function X(
|
|
1933
|
-
return
|
|
1856
|
+
function X(i) {
|
|
1857
|
+
return i ? i.length >= e.minLength : e.triggerOnFocus;
|
|
1934
1858
|
}
|
|
1935
|
-
function
|
|
1936
|
-
n("suggestions-change",
|
|
1859
|
+
function oe(i) {
|
|
1860
|
+
n("suggestions-change", i), n("visible-change", i.length > 0);
|
|
1937
1861
|
}
|
|
1938
|
-
async function ne(
|
|
1939
|
-
if (!X(
|
|
1940
|
-
return
|
|
1862
|
+
async function ne(i) {
|
|
1863
|
+
if (!X(i))
|
|
1864
|
+
return oe([]), [];
|
|
1941
1865
|
if (e.fetchSuggestionsMethod) {
|
|
1942
|
-
const
|
|
1866
|
+
const Se = await new Promise((Ce) => {
|
|
1943
1867
|
var ce;
|
|
1944
|
-
(ce = e.fetchSuggestionsMethod) == null || ce.call(e,
|
|
1945
|
-
Ce(
|
|
1868
|
+
(ce = e.fetchSuggestionsMethod) == null || ce.call(e, i, (Me) => {
|
|
1869
|
+
Ce(ae(Me));
|
|
1946
1870
|
});
|
|
1947
1871
|
});
|
|
1948
|
-
return
|
|
1872
|
+
return oe(Se), Se;
|
|
1949
1873
|
}
|
|
1950
1874
|
if (e.fetchSuggestions) {
|
|
1951
|
-
const
|
|
1952
|
-
return
|
|
1875
|
+
const Se = await e.fetchSuggestions(i), Ce = ae(Array.isArray(Se) ? Se : []);
|
|
1876
|
+
return oe(Ce), Ce;
|
|
1953
1877
|
}
|
|
1954
|
-
const
|
|
1955
|
-
return
|
|
1878
|
+
const w = ae(e.suggestions), ee = i ? w.filter(J(i)) : w;
|
|
1879
|
+
return oe(ee), ee;
|
|
1956
1880
|
}
|
|
1957
|
-
async function
|
|
1958
|
-
D.value =
|
|
1881
|
+
async function ie(i, w) {
|
|
1882
|
+
D.value = i;
|
|
1959
1883
|
try {
|
|
1960
|
-
const
|
|
1961
|
-
|
|
1962
|
-
} catch (
|
|
1963
|
-
n("error",
|
|
1884
|
+
const ee = await ne(i);
|
|
1885
|
+
w(ee);
|
|
1886
|
+
} catch (ee) {
|
|
1887
|
+
n("error", ee), oe([]), w([]);
|
|
1964
1888
|
}
|
|
1965
1889
|
}
|
|
1966
|
-
function
|
|
1967
|
-
var
|
|
1968
|
-
D.value && ((
|
|
1890
|
+
function Z() {
|
|
1891
|
+
var i, w;
|
|
1892
|
+
D.value && ((w = (i = c.value) == null ? void 0 : i.getData) == null || w.call(i, D.value));
|
|
1969
1893
|
}
|
|
1970
|
-
function
|
|
1971
|
-
const
|
|
1972
|
-
|
|
1894
|
+
function b(i) {
|
|
1895
|
+
const w = G(i);
|
|
1896
|
+
z(w);
|
|
1973
1897
|
}
|
|
1974
|
-
function
|
|
1975
|
-
const
|
|
1976
|
-
m.value =
|
|
1898
|
+
function $(i) {
|
|
1899
|
+
const w = G(i);
|
|
1900
|
+
m.value = w, n("input", w);
|
|
1977
1901
|
}
|
|
1978
|
-
function a(
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1902
|
+
function a(i) {
|
|
1903
|
+
const w = j(G(i), "change");
|
|
1904
|
+
w !== E(e.modelValue) && z(w), n("change", w);
|
|
1981
1905
|
}
|
|
1982
|
-
function o(
|
|
1983
|
-
n("focus",
|
|
1906
|
+
function o(i) {
|
|
1907
|
+
n("focus", i);
|
|
1984
1908
|
}
|
|
1985
|
-
function
|
|
1986
|
-
const
|
|
1987
|
-
|
|
1909
|
+
function K(i) {
|
|
1910
|
+
const w = j(m.value, "blur");
|
|
1911
|
+
w !== E(e.modelValue) && z(w), n("blur", i), n("visible-change", !1);
|
|
1988
1912
|
}
|
|
1989
|
-
function
|
|
1990
|
-
m.value = "", n("update:modelValue", ""), n("clear"),
|
|
1913
|
+
function te() {
|
|
1914
|
+
m.value = "", n("update:modelValue", ""), n("clear"), oe([]);
|
|
1991
1915
|
}
|
|
1992
|
-
function s(
|
|
1993
|
-
n("enter",
|
|
1916
|
+
function s(i) {
|
|
1917
|
+
n("enter", i), e.searchOnEnter && y();
|
|
1994
1918
|
}
|
|
1995
1919
|
function y() {
|
|
1996
|
-
n("search",
|
|
1920
|
+
n("search", E(e.modelValue));
|
|
1997
1921
|
}
|
|
1998
|
-
function
|
|
1999
|
-
n("select",
|
|
1922
|
+
function V(i) {
|
|
1923
|
+
n("select", i), e.searchOnSelect && n("search", i.value);
|
|
2000
1924
|
}
|
|
2001
|
-
function g(
|
|
2002
|
-
return
|
|
1925
|
+
function g(i) {
|
|
1926
|
+
return i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2003
1927
|
}
|
|
2004
|
-
function
|
|
2005
|
-
return
|
|
1928
|
+
function B(i) {
|
|
1929
|
+
return i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2006
1930
|
}
|
|
2007
|
-
function
|
|
2008
|
-
const
|
|
2009
|
-
if (!e.highlightKeyword || !f.value) return
|
|
2010
|
-
const
|
|
2011
|
-
return
|
|
2012
|
-
new RegExp(`(${
|
|
1931
|
+
function re(i) {
|
|
1932
|
+
const w = g(i || "");
|
|
1933
|
+
if (!e.highlightKeyword || !f.value) return w;
|
|
1934
|
+
const ee = B(g(f.value));
|
|
1935
|
+
return ee ? w.replace(
|
|
1936
|
+
new RegExp(`(${ee})`, "ig"),
|
|
2013
1937
|
'<mark class="qy-search-input__mark">$1</mark>'
|
|
2014
|
-
) :
|
|
1938
|
+
) : w;
|
|
2015
1939
|
}
|
|
2016
|
-
function
|
|
2017
|
-
var
|
|
2018
|
-
(
|
|
1940
|
+
function pe() {
|
|
1941
|
+
var i, w;
|
|
1942
|
+
(w = (i = c.value) == null ? void 0 : i.focus) == null || w.call(i);
|
|
2019
1943
|
}
|
|
2020
|
-
function
|
|
2021
|
-
var
|
|
2022
|
-
(
|
|
1944
|
+
function ge() {
|
|
1945
|
+
var i, w;
|
|
1946
|
+
(w = (i = c.value) == null ? void 0 : i.blur) == null || w.call(i);
|
|
2023
1947
|
}
|
|
2024
|
-
function
|
|
2025
|
-
var
|
|
2026
|
-
(
|
|
1948
|
+
function xe() {
|
|
1949
|
+
var i, w, ee;
|
|
1950
|
+
(ee = (w = (i = c.value) == null ? void 0 : i.inputRef) == null ? void 0 : w.select) == null || ee.call(w);
|
|
2027
1951
|
}
|
|
2028
1952
|
function p() {
|
|
2029
|
-
var
|
|
2030
|
-
(
|
|
1953
|
+
var i, w;
|
|
1954
|
+
(w = (i = c.value) == null ? void 0 : i.clear) == null || w.call(i);
|
|
2031
1955
|
}
|
|
2032
|
-
function
|
|
2033
|
-
var
|
|
2034
|
-
(
|
|
1956
|
+
function Y() {
|
|
1957
|
+
var i, w;
|
|
1958
|
+
(w = (i = c.value) == null ? void 0 : i.close) == null || w.call(i);
|
|
2035
1959
|
}
|
|
2036
|
-
return
|
|
1960
|
+
return P({
|
|
2037
1961
|
// 暴露搜索框常用控制方法,供弹窗打开后聚焦或失败后重试建议项。
|
|
2038
|
-
focus:
|
|
2039
|
-
blur:
|
|
2040
|
-
select:
|
|
1962
|
+
focus: pe,
|
|
1963
|
+
blur: ge,
|
|
1964
|
+
select: xe,
|
|
2041
1965
|
clear: p,
|
|
2042
|
-
closePanel:
|
|
2043
|
-
retryFetch:
|
|
2044
|
-
}), (
|
|
2045
|
-
class:
|
|
1966
|
+
closePanel: Y,
|
|
1967
|
+
retryFetch: Z
|
|
1968
|
+
}), (i, w) => (v(), Q("div", {
|
|
1969
|
+
class: ke(["qy-search-input", { "is-disabled": t.disabled }])
|
|
2046
1970
|
}, [
|
|
2047
|
-
|
|
1971
|
+
O(C(ba), Ve({
|
|
2048
1972
|
ref_key: "autocompleteRef",
|
|
2049
1973
|
ref: c
|
|
2050
|
-
},
|
|
2051
|
-
"model-value":
|
|
1974
|
+
}, C(H), {
|
|
1975
|
+
"model-value": x.value,
|
|
2052
1976
|
disabled: t.disabled,
|
|
2053
1977
|
placeholder: t.placeholder,
|
|
2054
1978
|
clearable: t.clearable,
|
|
2055
1979
|
debounce: t.debounce,
|
|
2056
|
-
"fetch-suggestions":
|
|
1980
|
+
"fetch-suggestions": ie,
|
|
2057
1981
|
"trigger-on-focus": t.triggerOnFocus,
|
|
2058
1982
|
teleported: t.teleported,
|
|
2059
1983
|
"fit-input-width": t.fitInputWidth,
|
|
2060
1984
|
"popper-class": A.value,
|
|
2061
1985
|
"append-to": t.appendTo,
|
|
2062
1986
|
"value-key": "value",
|
|
2063
|
-
"onUpdate:modelValue":
|
|
2064
|
-
onInput:
|
|
1987
|
+
"onUpdate:modelValue": b,
|
|
1988
|
+
onInput: $,
|
|
2065
1989
|
onChange: a,
|
|
2066
1990
|
onFocus: o,
|
|
2067
|
-
onBlur:
|
|
2068
|
-
onClear:
|
|
2069
|
-
onSelect:
|
|
2070
|
-
onKeydown:
|
|
1991
|
+
onBlur: K,
|
|
1992
|
+
onClear: te,
|
|
1993
|
+
onSelect: V,
|
|
1994
|
+
onKeydown: je(s, ["enter"])
|
|
2071
1995
|
}), Ue({
|
|
2072
|
-
default:
|
|
2073
|
-
|
|
2074
|
-
item:
|
|
1996
|
+
default: h(({ item: ee }) => [
|
|
1997
|
+
I(i.$slots, "item", {
|
|
1998
|
+
item: ee,
|
|
2075
1999
|
keyword: f.value
|
|
2076
2000
|
}, () => [
|
|
2077
|
-
|
|
2078
|
-
|
|
2001
|
+
R("div", Bl, [
|
|
2002
|
+
R("div", {
|
|
2079
2003
|
class: "qy-search-input__item-label",
|
|
2080
|
-
innerHTML:
|
|
2081
|
-
}, null, 8,
|
|
2082
|
-
|
|
2004
|
+
innerHTML: re(ee.label || ee.value || "")
|
|
2005
|
+
}, null, 8, Ql),
|
|
2006
|
+
ee.description ? (v(), Q("div", Al, ye(ee.description), 1)) : T("", !0)
|
|
2083
2007
|
])
|
|
2084
2008
|
], !0)
|
|
2085
2009
|
]),
|
|
2086
2010
|
_: 2
|
|
2087
2011
|
}, [
|
|
2088
|
-
|
|
2012
|
+
i.$slots.prefix ? {
|
|
2089
2013
|
name: "prefix",
|
|
2090
|
-
fn:
|
|
2091
|
-
|
|
2014
|
+
fn: h(() => [
|
|
2015
|
+
I(i.$slots, "prefix", {}, void 0, !0)
|
|
2092
2016
|
]),
|
|
2093
2017
|
key: "0"
|
|
2094
2018
|
} : void 0,
|
|
2095
|
-
|
|
2019
|
+
i.$slots.suffix ? {
|
|
2096
2020
|
name: "suffix",
|
|
2097
|
-
fn:
|
|
2098
|
-
|
|
2021
|
+
fn: h(() => [
|
|
2022
|
+
I(i.$slots, "suffix", {}, void 0, !0)
|
|
2099
2023
|
]),
|
|
2100
2024
|
key: "1"
|
|
2101
2025
|
} : void 0,
|
|
2102
|
-
|
|
2026
|
+
i.$slots.prepend ? {
|
|
2103
2027
|
name: "prepend",
|
|
2104
|
-
fn:
|
|
2105
|
-
|
|
2028
|
+
fn: h(() => [
|
|
2029
|
+
I(i.$slots, "prepend", {}, void 0, !0)
|
|
2106
2030
|
]),
|
|
2107
2031
|
key: "2"
|
|
2108
2032
|
} : void 0,
|
|
2109
|
-
|
|
2033
|
+
i.$slots.append || t.showButton ? {
|
|
2110
2034
|
name: "append",
|
|
2111
|
-
fn:
|
|
2112
|
-
|
|
2035
|
+
fn: h(() => [
|
|
2036
|
+
i.$slots.append ? I(i.$slots, "append", {}, void 0, !0, 0) : (v(), de(C(qe), Ve({ key: 1 }, t.buttonProps, {
|
|
2113
2037
|
loading: t.loading,
|
|
2114
2038
|
disabled: t.disabled,
|
|
2115
2039
|
onClick: y
|
|
2116
2040
|
}), {
|
|
2117
|
-
default:
|
|
2118
|
-
|
|
2041
|
+
default: h(() => [
|
|
2042
|
+
we(ye(t.buttonText), 1)
|
|
2119
2043
|
]),
|
|
2120
2044
|
_: 1
|
|
2121
2045
|
}, 16, ["loading", "disabled"]))
|
|
@@ -2125,16 +2049,16 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2125
2049
|
]), 1040, ["model-value", "disabled", "placeholder", "clearable", "debounce", "trigger-on-focus", "teleported", "fit-input-width", "popper-class", "append-to"])
|
|
2126
2050
|
], 2));
|
|
2127
2051
|
}
|
|
2128
|
-
}), Vt = /* @__PURE__ */
|
|
2052
|
+
}), Vt = /* @__PURE__ */ Re(zl, [["__scopeId", "data-v-cd7f5dfc"]]), Rl = { class: "qy-record-quote-search" }, Il = {
|
|
2129
2053
|
key: 0,
|
|
2130
2054
|
class: "qy-record-quote-search__header"
|
|
2131
|
-
},
|
|
2055
|
+
}, Fl = {
|
|
2132
2056
|
key: 0,
|
|
2133
2057
|
class: "qy-record-quote-search__label"
|
|
2134
|
-
},
|
|
2058
|
+
}, Tl = {
|
|
2135
2059
|
key: 1,
|
|
2136
2060
|
class: "qy-record-quote-search__description"
|
|
2137
|
-
},
|
|
2061
|
+
}, Pl = /* @__PURE__ */ Be({
|
|
2138
2062
|
name: "QyRecordQuoteSearch",
|
|
2139
2063
|
inheritAttrs: !1,
|
|
2140
2064
|
__name: "index",
|
|
@@ -2162,33 +2086,33 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2162
2086
|
trimMode: { default: "blur" }
|
|
2163
2087
|
},
|
|
2164
2088
|
emits: ["update:modelValue", "search", "clear", "normalize", "enter", "select", "error", "success"],
|
|
2165
|
-
setup(t, { expose:
|
|
2166
|
-
const e = t, n = W, H =
|
|
2167
|
-
function
|
|
2089
|
+
setup(t, { expose: P, emit: W }) {
|
|
2090
|
+
const e = t, n = W, H = Qe(), c = q(null), m = q(!1), f = F(() => e.statusText || ""), A = F(() => e.loading || m.value);
|
|
2091
|
+
function x(a) {
|
|
2168
2092
|
return a == null ? "" : String(a);
|
|
2169
2093
|
}
|
|
2170
2094
|
function D(a) {
|
|
2171
|
-
const o =
|
|
2172
|
-
return
|
|
2095
|
+
const o = x(a).trim(), K = E(o), te = K.match(/BJ\d{8}[A-Z0-9]{4}/i);
|
|
2096
|
+
return te ? te[0] : K;
|
|
2173
2097
|
}
|
|
2174
|
-
function
|
|
2175
|
-
return
|
|
2098
|
+
function E(a) {
|
|
2099
|
+
return x(a).replace(/\s+/g, "").trim().toUpperCase();
|
|
2176
2100
|
}
|
|
2177
|
-
function
|
|
2101
|
+
function M(a) {
|
|
2178
2102
|
return e.extractMethod ? e.extractMethod(a) : D(a);
|
|
2179
2103
|
}
|
|
2180
|
-
function
|
|
2181
|
-
return e.normalizeMethod ? e.normalizeMethod(a) :
|
|
2104
|
+
function j(a) {
|
|
2105
|
+
return e.normalizeMethod ? e.normalizeMethod(a) : E(a);
|
|
2182
2106
|
}
|
|
2183
|
-
function
|
|
2184
|
-
const
|
|
2185
|
-
return n("normalize", { rawValue:
|
|
2186
|
-
rawValue:
|
|
2107
|
+
function G(a, o) {
|
|
2108
|
+
const K = x(a), te = M(K), s = e.autoNormalize ? j(te) : te;
|
|
2109
|
+
return n("normalize", { rawValue: K, code: s }), {
|
|
2110
|
+
rawValue: K,
|
|
2187
2111
|
code: s,
|
|
2188
2112
|
item: o
|
|
2189
2113
|
};
|
|
2190
2114
|
}
|
|
2191
|
-
function
|
|
2115
|
+
function z(a) {
|
|
2192
2116
|
n("update:modelValue", a);
|
|
2193
2117
|
}
|
|
2194
2118
|
async function U(a) {
|
|
@@ -2204,58 +2128,58 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2204
2128
|
}
|
|
2205
2129
|
}
|
|
2206
2130
|
}
|
|
2207
|
-
function
|
|
2208
|
-
const o =
|
|
2209
|
-
o.code !==
|
|
2131
|
+
function ae(a) {
|
|
2132
|
+
const o = G(a);
|
|
2133
|
+
o.code !== x(e.modelValue) && n("update:modelValue", o.code), U(o);
|
|
2210
2134
|
}
|
|
2211
|
-
function
|
|
2135
|
+
function J() {
|
|
2212
2136
|
n("clear");
|
|
2213
2137
|
}
|
|
2214
2138
|
function X(a) {
|
|
2215
2139
|
n("enter", a);
|
|
2216
2140
|
}
|
|
2217
|
-
function
|
|
2141
|
+
function oe(a) {
|
|
2218
2142
|
if (n("select", a), !e.searchOnSelect) return;
|
|
2219
|
-
const o =
|
|
2220
|
-
o.code !==
|
|
2143
|
+
const o = G(a.value, a);
|
|
2144
|
+
o.code !== x(e.modelValue) && n("update:modelValue", o.code), U(o);
|
|
2221
2145
|
}
|
|
2222
2146
|
function ne(a) {
|
|
2223
2147
|
n("error", a);
|
|
2224
2148
|
}
|
|
2225
|
-
function
|
|
2149
|
+
function ie() {
|
|
2226
2150
|
var a, o;
|
|
2227
2151
|
(o = (a = c.value) == null ? void 0 : a.focus) == null || o.call(a);
|
|
2228
2152
|
}
|
|
2229
|
-
function
|
|
2153
|
+
function Z() {
|
|
2230
2154
|
var a, o;
|
|
2231
2155
|
(o = (a = c.value) == null ? void 0 : a.blur) == null || o.call(a);
|
|
2232
2156
|
}
|
|
2233
|
-
function
|
|
2157
|
+
function b() {
|
|
2234
2158
|
var a, o;
|
|
2235
2159
|
(o = (a = c.value) == null ? void 0 : a.select) == null || o.call(a);
|
|
2236
2160
|
}
|
|
2237
|
-
function
|
|
2161
|
+
function $() {
|
|
2238
2162
|
var a, o;
|
|
2239
2163
|
(o = (a = c.value) == null ? void 0 : a.clear) == null || o.call(a);
|
|
2240
2164
|
}
|
|
2241
|
-
return
|
|
2242
|
-
focus:
|
|
2243
|
-
blur:
|
|
2244
|
-
select:
|
|
2245
|
-
clear:
|
|
2246
|
-
extractQuoteOrderCode:
|
|
2247
|
-
normalizeQuoteOrderCode:
|
|
2248
|
-
}), (a, o) => (
|
|
2249
|
-
|
|
2250
|
-
t.label || t.description ? (
|
|
2251
|
-
t.label ? (
|
|
2252
|
-
t.description ? (
|
|
2253
|
-
])) :
|
|
2165
|
+
return P({
|
|
2166
|
+
focus: ie,
|
|
2167
|
+
blur: Z,
|
|
2168
|
+
select: b,
|
|
2169
|
+
clear: $,
|
|
2170
|
+
extractQuoteOrderCode: M,
|
|
2171
|
+
normalizeQuoteOrderCode: j
|
|
2172
|
+
}), (a, o) => (v(), Q("div", Rl, [
|
|
2173
|
+
I(a.$slots, "label", {}, () => [
|
|
2174
|
+
t.label || t.description ? (v(), Q("div", Il, [
|
|
2175
|
+
t.label ? (v(), Q("div", Fl, ye(t.label), 1)) : T("", !0),
|
|
2176
|
+
t.description ? (v(), Q("div", Tl, ye(t.description), 1)) : T("", !0)
|
|
2177
|
+
])) : T("", !0)
|
|
2254
2178
|
], !0),
|
|
2255
|
-
|
|
2179
|
+
O(Vt, Ve({
|
|
2256
2180
|
ref_key: "searchRef",
|
|
2257
2181
|
ref: c
|
|
2258
|
-
},
|
|
2182
|
+
}, C(H), {
|
|
2259
2183
|
"model-value": t.modelValue,
|
|
2260
2184
|
loading: A.value,
|
|
2261
2185
|
disabled: t.disabled,
|
|
@@ -2269,75 +2193,75 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2269
2193
|
debounce: t.debounce,
|
|
2270
2194
|
"min-length": t.minLength,
|
|
2271
2195
|
"search-on-select": !1,
|
|
2272
|
-
"onUpdate:modelValue":
|
|
2273
|
-
onSearch:
|
|
2274
|
-
onClear:
|
|
2196
|
+
"onUpdate:modelValue": z,
|
|
2197
|
+
onSearch: ae,
|
|
2198
|
+
onClear: J,
|
|
2275
2199
|
onEnter: X,
|
|
2276
|
-
onSelect:
|
|
2200
|
+
onSelect: oe,
|
|
2277
2201
|
onError: ne
|
|
2278
2202
|
}), Ue({ _: 2 }, [
|
|
2279
2203
|
a.$slots.prefix ? {
|
|
2280
2204
|
name: "prefix",
|
|
2281
|
-
fn:
|
|
2282
|
-
|
|
2205
|
+
fn: h(() => [
|
|
2206
|
+
I(a.$slots, "prefix", {}, void 0, !0)
|
|
2283
2207
|
]),
|
|
2284
2208
|
key: "0"
|
|
2285
2209
|
} : void 0,
|
|
2286
2210
|
a.$slots.suffix ? {
|
|
2287
2211
|
name: "suffix",
|
|
2288
|
-
fn:
|
|
2289
|
-
|
|
2212
|
+
fn: h(() => [
|
|
2213
|
+
I(a.$slots, "suffix", {}, void 0, !0)
|
|
2290
2214
|
]),
|
|
2291
2215
|
key: "1"
|
|
2292
2216
|
} : void 0,
|
|
2293
2217
|
a.$slots.item ? {
|
|
2294
2218
|
name: "item",
|
|
2295
|
-
fn:
|
|
2296
|
-
|
|
2219
|
+
fn: h((K) => [
|
|
2220
|
+
I(a.$slots, "item", gt(vt(K)), void 0, !0)
|
|
2297
2221
|
]),
|
|
2298
2222
|
key: "2"
|
|
2299
2223
|
} : void 0,
|
|
2300
2224
|
a.$slots.empty ? {
|
|
2301
2225
|
name: "empty",
|
|
2302
|
-
fn:
|
|
2303
|
-
|
|
2226
|
+
fn: h(() => [
|
|
2227
|
+
I(a.$slots, "empty", {}, void 0, !0)
|
|
2304
2228
|
]),
|
|
2305
2229
|
key: "3"
|
|
2306
2230
|
} : void 0,
|
|
2307
2231
|
a.$slots.loading ? {
|
|
2308
2232
|
name: "loading",
|
|
2309
|
-
fn:
|
|
2310
|
-
|
|
2233
|
+
fn: h(() => [
|
|
2234
|
+
I(a.$slots, "loading", {}, void 0, !0)
|
|
2311
2235
|
]),
|
|
2312
2236
|
key: "4"
|
|
2313
2237
|
} : void 0
|
|
2314
2238
|
]), 1040, ["model-value", "loading", "disabled", "placeholder", "trim-mode", "button-text", "suggestions", "fetch-suggestions", "fetch-suggestions-method", "debounce", "min-length"]),
|
|
2315
|
-
t.showStatus && f.value ?
|
|
2239
|
+
t.showStatus && f.value ? I(a.$slots, "status", {
|
|
2316
2240
|
status: t.status,
|
|
2317
2241
|
statusText: f.value
|
|
2318
2242
|
}, () => [
|
|
2319
|
-
|
|
2320
|
-
class:
|
|
2243
|
+
R("div", {
|
|
2244
|
+
class: ke(["qy-record-quote-search__status", `is-${t.status}`])
|
|
2321
2245
|
}, ye(f.value), 3)
|
|
2322
|
-
], !0, 0) :
|
|
2246
|
+
], !0, 0) : T("", !0)
|
|
2323
2247
|
]));
|
|
2324
2248
|
}
|
|
2325
|
-
}),
|
|
2249
|
+
}), Ml = /* @__PURE__ */ Re(Pl, [["__scopeId", "data-v-3a314f64"]]), Ol = { class: "qy-selection-dialog" }, Dl = { class: "qy-selection-dialog__main" }, Ul = {
|
|
2326
2250
|
key: 0,
|
|
2327
2251
|
class: "qy-selection-dialog__selected"
|
|
2328
|
-
},
|
|
2252
|
+
}, Kl = { class: "qy-selection-dialog__selected-tags" }, Ll = {
|
|
2329
2253
|
key: 0,
|
|
2330
2254
|
class: "qy-selection-dialog__selected-actions"
|
|
2331
|
-
},
|
|
2255
|
+
}, El = {
|
|
2332
2256
|
key: 1,
|
|
2333
2257
|
class: "qy-selection-dialog__search-row"
|
|
2334
|
-
},
|
|
2258
|
+
}, jl = {
|
|
2335
2259
|
key: 0,
|
|
2336
2260
|
class: "qy-selection-dialog__toolbar"
|
|
2337
|
-
},
|
|
2261
|
+
}, Nl = {
|
|
2338
2262
|
key: 2,
|
|
2339
2263
|
class: "qy-selection-dialog__pagination"
|
|
2340
|
-
},
|
|
2264
|
+
}, Hl = { class: "qy-selection-dialog__paste-actions" }, Zl = /* @__PURE__ */ Be({
|
|
2341
2265
|
name: "QySelectionDialog",
|
|
2342
2266
|
inheritAttrs: !1,
|
|
2343
2267
|
__name: "index",
|
|
@@ -2376,22 +2300,22 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2376
2300
|
pageSizes: { default: () => [10, 20, 50, 100] }
|
|
2377
2301
|
},
|
|
2378
2302
|
emits: ["update:modelValue", "selection-change", "confirm", "submit", "cancel", "close", "append", "loaded"],
|
|
2379
|
-
setup(t, { expose:
|
|
2380
|
-
const e = t, n = W, H =
|
|
2303
|
+
setup(t, { expose: P, emit: W }) {
|
|
2304
|
+
const e = t, n = W, H = Qe(), c = pt(), m = pa(), f = q(null), A = q([]), x = q([]), D = q([]), E = q(!1), M = q(0), j = q(!1), G = q(""), z = _e({
|
|
2381
2305
|
category: [],
|
|
2382
2306
|
type: "",
|
|
2383
2307
|
page: 1,
|
|
2384
2308
|
pageSize: 10,
|
|
2385
2309
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
2386
2310
|
...e.queryParams
|
|
2387
|
-
}), U = F(() => e.selectionMode ? e.selectionMode : e.selection === "multi" ? "multiple" : e.selection),
|
|
2311
|
+
}), U = F(() => e.selectionMode ? e.selectionMode : e.selection === "multi" ? "multiple" : e.selection), ae = F(() => e.mainKey || e.rowKey), J = F(() => e.tagName || e.labelKey), X = F(() => e.typeOptions.length ? e.typeOptions : e.type || []), oe = F(() => ({
|
|
2388
2312
|
...e.typeSelectionProps,
|
|
2389
2313
|
...e.typeSelectProps
|
|
2390
|
-
})), ne = F(() => e.tableProps || {}),
|
|
2314
|
+
})), ne = F(() => e.tableProps || {}), ie = F(
|
|
2391
2315
|
() => e.showSearch || !!H["search-visible"]
|
|
2392
|
-
),
|
|
2393
|
-
() =>
|
|
2394
|
-
),
|
|
2316
|
+
), Z = F(() => e.showAppend || e.append), b = F(
|
|
2317
|
+
() => Z.value || !!c.toolbar || !!c.bar
|
|
2318
|
+
), $ = F(() => e.fetchMethod || e.query), a = F(() => o() ? e.modelValue : e.selected);
|
|
2395
2319
|
function o() {
|
|
2396
2320
|
const u = (m == null ? void 0 : m.vnode.props) || {};
|
|
2397
2321
|
return Object.prototype.hasOwnProperty.call(u, "modelValue") || Object.prototype.hasOwnProperty.call(u, "model-value") || Object.prototype.hasOwnProperty.call(u, "onUpdate:modelValue");
|
|
@@ -2399,7 +2323,7 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2399
2323
|
fe(
|
|
2400
2324
|
[() => e.modelValue, () => e.selected, () => e.open],
|
|
2401
2325
|
() => {
|
|
2402
|
-
e.open && (
|
|
2326
|
+
e.open && (x.value = Ae(a.value), ee());
|
|
2403
2327
|
},
|
|
2404
2328
|
{ immediate: !0, deep: !0 }
|
|
2405
2329
|
), fe(
|
|
@@ -2412,198 +2336,198 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2412
2336
|
D.value = e.categoryOptions || [];
|
|
2413
2337
|
},
|
|
2414
2338
|
{ immediate: !0 }
|
|
2415
|
-
), fe(
|
|
2416
|
-
u || (
|
|
2339
|
+
), fe(j, (u) => {
|
|
2340
|
+
u || (G.value = "");
|
|
2417
2341
|
});
|
|
2418
|
-
async function
|
|
2419
|
-
|
|
2342
|
+
async function K() {
|
|
2343
|
+
x.value = Ae(a.value), await te(), await s(), ee();
|
|
2420
2344
|
}
|
|
2421
|
-
async function
|
|
2345
|
+
async function te() {
|
|
2422
2346
|
const u = e.categoryFetchMethod || (typeof e.category == "function" ? e.category : null);
|
|
2423
2347
|
if (!u) return;
|
|
2424
2348
|
const d = await u();
|
|
2425
|
-
D.value =
|
|
2349
|
+
D.value = pe(d);
|
|
2426
2350
|
}
|
|
2427
2351
|
async function s() {
|
|
2428
|
-
if (
|
|
2429
|
-
|
|
2352
|
+
if ($.value) {
|
|
2353
|
+
E.value = !0;
|
|
2430
2354
|
try {
|
|
2431
|
-
const u = await
|
|
2432
|
-
return A.value =
|
|
2355
|
+
const u = await $.value(xe()), d = e.responseFormatter ? await e.responseFormatter(u) : u, { rows: N, total: l } = re(d);
|
|
2356
|
+
return A.value = N, M.value = l, n("loaded", N), ee(), d;
|
|
2433
2357
|
} finally {
|
|
2434
|
-
|
|
2358
|
+
E.value = !1;
|
|
2435
2359
|
}
|
|
2436
2360
|
}
|
|
2437
2361
|
}
|
|
2438
2362
|
function y() {
|
|
2439
|
-
return
|
|
2363
|
+
return z.page = 1, s();
|
|
2440
2364
|
}
|
|
2441
|
-
function
|
|
2442
|
-
return
|
|
2365
|
+
function V() {
|
|
2366
|
+
return z.page = 1, s();
|
|
2443
2367
|
}
|
|
2444
2368
|
function g() {
|
|
2445
|
-
return Object.assign(
|
|
2369
|
+
return Object.assign(z, {
|
|
2446
2370
|
category: [],
|
|
2447
2371
|
type: "",
|
|
2448
2372
|
page: 1,
|
|
2449
|
-
pageSize:
|
|
2373
|
+
pageSize: z.pageSize,
|
|
2450
2374
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
2451
2375
|
...e.queryParams
|
|
2452
2376
|
}), s();
|
|
2453
2377
|
}
|
|
2454
|
-
function
|
|
2378
|
+
function B() {
|
|
2455
2379
|
n("append");
|
|
2456
2380
|
}
|
|
2457
|
-
function
|
|
2381
|
+
function re(u) {
|
|
2458
2382
|
if (Array.isArray(u))
|
|
2459
2383
|
return { rows: u, total: u.length };
|
|
2460
2384
|
const d = u == null ? void 0 : u.data;
|
|
2461
2385
|
if (Array.isArray(d))
|
|
2462
2386
|
return { rows: d, total: (u == null ? void 0 : u.total) ?? d.length };
|
|
2463
|
-
const
|
|
2464
|
-
return { rows:
|
|
2387
|
+
const N = (u == null ? void 0 : u.records) || (u == null ? void 0 : u.rows) || (d == null ? void 0 : d.records) || [], l = (u == null ? void 0 : u.total) ?? (d == null ? void 0 : d.total) ?? N.length;
|
|
2388
|
+
return { rows: N, total: l };
|
|
2465
2389
|
}
|
|
2466
|
-
function
|
|
2390
|
+
function pe(u) {
|
|
2467
2391
|
const d = (u == null ? void 0 : u.data) ?? u;
|
|
2468
2392
|
if (!Array.isArray(d)) return [];
|
|
2469
2393
|
if (typeof e.categoryFormatter == "function")
|
|
2470
2394
|
return e.categoryFormatter(d);
|
|
2471
2395
|
if (Array.isArray(e.categoryFormatter)) {
|
|
2472
|
-
const [
|
|
2473
|
-
return d.map((
|
|
2474
|
-
...
|
|
2475
|
-
label:
|
|
2476
|
-
value:
|
|
2477
|
-
children: Array.isArray(
|
|
2396
|
+
const [N, l] = e.categoryFormatter;
|
|
2397
|
+
return d.map((r) => ({
|
|
2398
|
+
...r,
|
|
2399
|
+
label: r[N],
|
|
2400
|
+
value: r[l],
|
|
2401
|
+
children: Array.isArray(r.children) ? ge(r.children, N, l) : r.children
|
|
2478
2402
|
}));
|
|
2479
2403
|
}
|
|
2480
2404
|
return d;
|
|
2481
2405
|
}
|
|
2482
|
-
function
|
|
2406
|
+
function ge(u, d, N) {
|
|
2483
2407
|
return u.map((l) => ({
|
|
2484
2408
|
...l,
|
|
2485
2409
|
label: l[d],
|
|
2486
|
-
value: l[
|
|
2487
|
-
children: Array.isArray(l.children) ?
|
|
2410
|
+
value: l[N],
|
|
2411
|
+
children: Array.isArray(l.children) ? ge(l.children, d, N) : l.children
|
|
2488
2412
|
}));
|
|
2489
2413
|
}
|
|
2490
|
-
function
|
|
2491
|
-
const u = { ...e.queryParams,
|
|
2414
|
+
function xe() {
|
|
2415
|
+
const u = { ...e.queryParams, ...z };
|
|
2492
2416
|
return e.searchKey && (u[e.searchKey] = String(u[e.searchKey] || "").trim()), u.category = p(), u;
|
|
2493
2417
|
}
|
|
2494
2418
|
function p() {
|
|
2495
2419
|
if (Object.prototype.hasOwnProperty.call(e.queryParams, "category"))
|
|
2496
2420
|
return e.queryParams.category;
|
|
2497
|
-
const u =
|
|
2421
|
+
const u = z.category;
|
|
2498
2422
|
return Array.isArray(u) ? u : u ? [u] : [];
|
|
2499
2423
|
}
|
|
2500
|
-
function
|
|
2501
|
-
var d,
|
|
2424
|
+
function Y(u) {
|
|
2425
|
+
var d, N;
|
|
2502
2426
|
if (U.value !== "none") {
|
|
2503
2427
|
if (U.value === "single") {
|
|
2504
|
-
|
|
2428
|
+
x.value = [u], (d = f.value) == null || d.setCurrentRow(u), Te();
|
|
2505
2429
|
return;
|
|
2506
2430
|
}
|
|
2507
|
-
|
|
2431
|
+
Se(u) && ((N = f.value) == null || N.toggleRowSelection(u, !Ce(u)));
|
|
2508
2432
|
}
|
|
2509
2433
|
}
|
|
2510
|
-
function
|
|
2434
|
+
function i(u) {
|
|
2511
2435
|
if (U.value !== "multiple") return;
|
|
2512
|
-
const d = new Set(A.value.map(ce)),
|
|
2513
|
-
|
|
2514
|
-
(l) => !d.has(ce(l)) ||
|
|
2436
|
+
const d = new Set(A.value.map(ce)), N = new Set(u.map(ce));
|
|
2437
|
+
x.value = x.value.filter(
|
|
2438
|
+
(l) => !d.has(ce(l)) || N.has(ce(l))
|
|
2515
2439
|
), u.forEach((l) => {
|
|
2516
|
-
Ce(l) ||
|
|
2440
|
+
Ce(l) || x.value.push(l);
|
|
2517
2441
|
}), Te();
|
|
2518
2442
|
}
|
|
2519
|
-
function
|
|
2520
|
-
var
|
|
2521
|
-
|
|
2522
|
-
(
|
|
2443
|
+
function w(u) {
|
|
2444
|
+
var N, l;
|
|
2445
|
+
x.value = x.value.filter(
|
|
2446
|
+
(r) => ce(r) !== ce(u)
|
|
2523
2447
|
);
|
|
2524
|
-
const d = A.value.find((
|
|
2525
|
-
d && (U.value === "multiple" ? (
|
|
2448
|
+
const d = A.value.find((r) => ce(r) === ce(u));
|
|
2449
|
+
d && (U.value === "multiple" ? (N = f.value) == null || N.toggleRowSelection(d, !1) : (l = f.value) == null || l.setCurrentRow()), Te();
|
|
2526
2450
|
}
|
|
2527
|
-
function
|
|
2451
|
+
function ee() {
|
|
2528
2452
|
De(() => {
|
|
2529
2453
|
var u;
|
|
2530
2454
|
if (f.value) {
|
|
2531
2455
|
if (U.value === "single") {
|
|
2532
|
-
const [d] =
|
|
2456
|
+
const [d] = x.value, N = A.value.find(
|
|
2533
2457
|
(l) => d && ce(l) === ce(d)
|
|
2534
2458
|
);
|
|
2535
|
-
(u = f.value) == null || u.setCurrentRow(
|
|
2459
|
+
(u = f.value) == null || u.setCurrentRow(N);
|
|
2536
2460
|
return;
|
|
2537
2461
|
}
|
|
2538
2462
|
U.value === "multiple" && A.value.forEach((d) => {
|
|
2539
|
-
var
|
|
2540
|
-
(
|
|
2463
|
+
var N;
|
|
2464
|
+
(N = f.value) == null || N.toggleRowSelection(d, Ce(d));
|
|
2541
2465
|
});
|
|
2542
2466
|
}
|
|
2543
2467
|
});
|
|
2544
2468
|
}
|
|
2545
|
-
function
|
|
2546
|
-
var
|
|
2547
|
-
const d = (
|
|
2469
|
+
function Se(u) {
|
|
2470
|
+
var N;
|
|
2471
|
+
const d = (N = ne.value) == null ? void 0 : N.selectable;
|
|
2548
2472
|
return typeof d == "function" ? d(u) !== !1 : !0;
|
|
2549
2473
|
}
|
|
2550
2474
|
function Ce(u) {
|
|
2551
|
-
return
|
|
2475
|
+
return x.value.some((d) => ce(d) === ce(u));
|
|
2552
2476
|
}
|
|
2553
2477
|
function ce(u) {
|
|
2554
|
-
return Ke(u,
|
|
2478
|
+
return Ke(u, ae.value);
|
|
2555
2479
|
}
|
|
2556
|
-
function
|
|
2557
|
-
return Ke(u,
|
|
2480
|
+
function Me(u) {
|
|
2481
|
+
return Ke(u, J.value) ?? ce(u);
|
|
2558
2482
|
}
|
|
2559
2483
|
function Ke(u, d) {
|
|
2560
2484
|
if (!(!u || !d))
|
|
2561
|
-
return d.split(".").reduce((
|
|
2485
|
+
return d.split(".").reduce((N, l) => N == null ? void 0 : N[l], u);
|
|
2562
2486
|
}
|
|
2563
2487
|
function Te() {
|
|
2564
|
-
const u = Ae(
|
|
2488
|
+
const u = Ae(x.value);
|
|
2565
2489
|
n("selection-change", u);
|
|
2566
2490
|
}
|
|
2567
|
-
function
|
|
2568
|
-
const u = Ae(
|
|
2569
|
-
n("update:modelValue", u), n("confirm", u), n("submit", { selection: u, rows: u, query: {
|
|
2491
|
+
function Ne() {
|
|
2492
|
+
const u = Ae(x.value);
|
|
2493
|
+
n("update:modelValue", u), n("confirm", u), n("submit", { selection: u, rows: u, query: { ...z } });
|
|
2570
2494
|
}
|
|
2571
2495
|
function Le() {
|
|
2572
|
-
|
|
2496
|
+
x.value = Ae(a.value), n("cancel"), n("close");
|
|
2573
2497
|
}
|
|
2574
|
-
async function
|
|
2498
|
+
async function He() {
|
|
2575
2499
|
var d;
|
|
2576
|
-
const u = JSON.stringify(
|
|
2577
|
-
await ((d = navigator.clipboard) == null ? void 0 : d.writeText(u)),
|
|
2500
|
+
const u = JSON.stringify(x.value);
|
|
2501
|
+
await ((d = navigator.clipboard) == null ? void 0 : d.writeText(u)), be.success("复制成功");
|
|
2578
2502
|
}
|
|
2579
|
-
function
|
|
2503
|
+
function Ie() {
|
|
2580
2504
|
try {
|
|
2581
|
-
const u = JSON.parse(
|
|
2505
|
+
const u = JSON.parse(G.value);
|
|
2582
2506
|
if (!Array.isArray(u)) {
|
|
2583
|
-
|
|
2507
|
+
be.error("粘贴内容需要是数组");
|
|
2584
2508
|
return;
|
|
2585
2509
|
}
|
|
2586
2510
|
u.forEach((d) => {
|
|
2587
|
-
Ce(d) ||
|
|
2588
|
-
}),
|
|
2511
|
+
Ce(d) || x.value.push(d);
|
|
2512
|
+
}), j.value = !1, Te(), ee();
|
|
2589
2513
|
} catch (u) {
|
|
2590
|
-
|
|
2514
|
+
be.error(`粘贴错误: ${(u == null ? void 0 : u.message) || "内容格式错误"}`);
|
|
2591
2515
|
}
|
|
2592
2516
|
}
|
|
2593
2517
|
function Ae(u = []) {
|
|
2594
2518
|
return u.map((d) => ({ ...d }));
|
|
2595
2519
|
}
|
|
2596
|
-
return
|
|
2520
|
+
return P({
|
|
2597
2521
|
search: y,
|
|
2598
2522
|
handleSearch: s,
|
|
2599
2523
|
handleQuerySearch: y,
|
|
2600
2524
|
resetSearch: g,
|
|
2601
2525
|
getTableRef: () => f.value,
|
|
2602
2526
|
getTableData: () => A.value,
|
|
2603
|
-
getSelection: () => Ae(
|
|
2527
|
+
getSelection: () => Ae(x.value)
|
|
2604
2528
|
}), (u, d) => {
|
|
2605
|
-
const
|
|
2606
|
-
return
|
|
2529
|
+
const N = ua;
|
|
2530
|
+
return v(), de(Je, Ve(C(H), {
|
|
2607
2531
|
"model-value": t.open,
|
|
2608
2532
|
title: t.title,
|
|
2609
2533
|
width: t.width,
|
|
@@ -2611,79 +2535,79 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2611
2535
|
draggable: "",
|
|
2612
2536
|
"align-center": "",
|
|
2613
2537
|
"append-to-body": "",
|
|
2614
|
-
onOpened:
|
|
2615
|
-
onConfirm:
|
|
2538
|
+
onOpened: K,
|
|
2539
|
+
onConfirm: Ne,
|
|
2616
2540
|
onCancel: Le
|
|
2617
2541
|
}), {
|
|
2618
|
-
default:
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
t.showSelected ? (
|
|
2623
|
-
d[12] || (d[12] =
|
|
2624
|
-
|
|
2625
|
-
(
|
|
2542
|
+
default: h(() => [
|
|
2543
|
+
R("div", Ol, [
|
|
2544
|
+
I(u.$slots, "side", {}, void 0, !0),
|
|
2545
|
+
R("div", Dl, [
|
|
2546
|
+
t.showSelected ? (v(), Q("div", Ul, [
|
|
2547
|
+
d[12] || (d[12] = R("span", { class: "qy-selection-dialog__selected-label" }, "已选项", -1)),
|
|
2548
|
+
R("div", Kl, [
|
|
2549
|
+
(v(!0), Q(Fe, null, et(x.value, (l) => (v(), de(We, {
|
|
2626
2550
|
key: ce(l),
|
|
2627
2551
|
closable: "",
|
|
2628
2552
|
class: "qy-selection-dialog__selected-tag",
|
|
2629
|
-
onClose: (
|
|
2553
|
+
onClose: (r) => w(l)
|
|
2630
2554
|
}, {
|
|
2631
|
-
default:
|
|
2632
|
-
|
|
2555
|
+
default: h(() => [
|
|
2556
|
+
we(ye(Me(l)), 1)
|
|
2633
2557
|
]),
|
|
2634
2558
|
_: 2
|
|
2635
2559
|
}, 1032, ["onClose"]))), 128)),
|
|
2636
|
-
|
|
2560
|
+
x.value.length ? T("", !0) : (v(), de(We, {
|
|
2637
2561
|
key: 0,
|
|
2638
|
-
|
|
2562
|
+
tone: "info"
|
|
2639
2563
|
}, {
|
|
2640
|
-
default:
|
|
2641
|
-
|
|
2564
|
+
default: h(() => [...d[9] || (d[9] = [
|
|
2565
|
+
we("无", -1)
|
|
2642
2566
|
])]),
|
|
2643
2567
|
_: 1
|
|
2644
2568
|
}))
|
|
2645
2569
|
]),
|
|
2646
|
-
t.showCopyPaste ? (
|
|
2647
|
-
|
|
2570
|
+
t.showCopyPaste ? (v(), Q("div", Ll, [
|
|
2571
|
+
O(C(qe), {
|
|
2648
2572
|
size: "small",
|
|
2649
|
-
onClick:
|
|
2573
|
+
onClick: He
|
|
2650
2574
|
}, {
|
|
2651
|
-
default:
|
|
2652
|
-
|
|
2575
|
+
default: h(() => [...d[10] || (d[10] = [
|
|
2576
|
+
we("复制", -1)
|
|
2653
2577
|
])]),
|
|
2654
2578
|
_: 1
|
|
2655
2579
|
}),
|
|
2656
|
-
|
|
2580
|
+
O(C(qe), {
|
|
2657
2581
|
size: "small",
|
|
2658
|
-
onClick: d[0] || (d[0] = (l) =>
|
|
2582
|
+
onClick: d[0] || (d[0] = (l) => j.value = !0)
|
|
2659
2583
|
}, {
|
|
2660
|
-
default:
|
|
2661
|
-
|
|
2584
|
+
default: h(() => [...d[11] || (d[11] = [
|
|
2585
|
+
we("粘贴", -1)
|
|
2662
2586
|
])]),
|
|
2663
2587
|
_: 1
|
|
2664
2588
|
})
|
|
2665
|
-
])) :
|
|
2666
|
-
])) :
|
|
2667
|
-
|
|
2668
|
-
|
|
2589
|
+
])) : T("", !0)
|
|
2590
|
+
])) : T("", !0),
|
|
2591
|
+
ie.value ? (v(), Q("div", El, [
|
|
2592
|
+
O(C(wt), {
|
|
2669
2593
|
class: "qy-selection-dialog__search",
|
|
2670
2594
|
inline: "",
|
|
2671
|
-
model:
|
|
2595
|
+
model: z
|
|
2672
2596
|
}, {
|
|
2673
|
-
default:
|
|
2674
|
-
|
|
2675
|
-
query:
|
|
2597
|
+
default: h(() => [
|
|
2598
|
+
I(u.$slots, "search", {
|
|
2599
|
+
query: z,
|
|
2676
2600
|
search: y,
|
|
2677
2601
|
reset: g
|
|
2678
2602
|
}, () => [
|
|
2679
|
-
D.value.length ? (
|
|
2603
|
+
D.value.length ? (v(), de(C(ze), {
|
|
2680
2604
|
key: 0,
|
|
2681
2605
|
label: "分类"
|
|
2682
2606
|
}, {
|
|
2683
|
-
default:
|
|
2684
|
-
|
|
2685
|
-
modelValue:
|
|
2686
|
-
"onUpdate:modelValue": d[1] || (d[1] = (l) =>
|
|
2607
|
+
default: h(() => [
|
|
2608
|
+
O(St, {
|
|
2609
|
+
modelValue: z.category,
|
|
2610
|
+
"onUpdate:modelValue": d[1] || (d[1] = (l) => z.category = l),
|
|
2687
2611
|
class: "qy-selection-dialog__category",
|
|
2688
2612
|
options: D.value,
|
|
2689
2613
|
clearable: "",
|
|
@@ -2694,53 +2618,53 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2694
2618
|
}, null, 8, ["modelValue", "options"])
|
|
2695
2619
|
]),
|
|
2696
2620
|
_: 1
|
|
2697
|
-
})) :
|
|
2698
|
-
X.value.length ? (
|
|
2621
|
+
})) : T("", !0),
|
|
2622
|
+
X.value.length ? (v(), de(C(ze), {
|
|
2699
2623
|
key: 1,
|
|
2700
2624
|
label: "类型"
|
|
2701
2625
|
}, {
|
|
2702
|
-
default:
|
|
2703
|
-
|
|
2704
|
-
modelValue:
|
|
2705
|
-
"onUpdate:modelValue": d[2] || (d[2] = (l) =>
|
|
2626
|
+
default: h(() => [
|
|
2627
|
+
O(tt, Ve({
|
|
2628
|
+
modelValue: z.type,
|
|
2629
|
+
"onUpdate:modelValue": d[2] || (d[2] = (l) => z.type = l),
|
|
2706
2630
|
class: "qy-selection-dialog__type",
|
|
2707
2631
|
options: X.value,
|
|
2708
2632
|
placeholder: "请选择类型",
|
|
2709
2633
|
clearable: ""
|
|
2710
|
-
},
|
|
2634
|
+
}, oe.value, { onChange: y }), null, 16, ["modelValue", "options"])
|
|
2711
2635
|
]),
|
|
2712
2636
|
_: 1
|
|
2713
|
-
})) :
|
|
2714
|
-
t.searchKey ? (
|
|
2637
|
+
})) : T("", !0),
|
|
2638
|
+
t.searchKey ? (v(), de(C(ze), {
|
|
2715
2639
|
key: 2,
|
|
2716
2640
|
label: "搜索"
|
|
2717
2641
|
}, {
|
|
2718
|
-
default:
|
|
2719
|
-
|
|
2720
|
-
modelValue:
|
|
2721
|
-
"onUpdate:modelValue": d[3] || (d[3] = (l) =>
|
|
2642
|
+
default: h(() => [
|
|
2643
|
+
O(C(Oe), {
|
|
2644
|
+
modelValue: z[t.searchKey],
|
|
2645
|
+
"onUpdate:modelValue": d[3] || (d[3] = (l) => z[t.searchKey] = l),
|
|
2722
2646
|
clearable: "",
|
|
2723
2647
|
placeholder: "请输入",
|
|
2724
2648
|
class: "qy-selection-dialog__search-input",
|
|
2725
|
-
onKeydown:
|
|
2649
|
+
onKeydown: je(ue(y, ["prevent"]), ["enter"])
|
|
2726
2650
|
}, null, 8, ["modelValue", "onKeydown"])
|
|
2727
2651
|
]),
|
|
2728
2652
|
_: 1
|
|
2729
|
-
})) :
|
|
2730
|
-
|
|
2731
|
-
default:
|
|
2732
|
-
|
|
2653
|
+
})) : T("", !0),
|
|
2654
|
+
O(C(ze), null, {
|
|
2655
|
+
default: h(() => [
|
|
2656
|
+
O(C(qe), {
|
|
2733
2657
|
type: "primary",
|
|
2734
2658
|
onClick: y
|
|
2735
2659
|
}, {
|
|
2736
|
-
default:
|
|
2737
|
-
|
|
2660
|
+
default: h(() => [...d[13] || (d[13] = [
|
|
2661
|
+
we("查询", -1)
|
|
2738
2662
|
])]),
|
|
2739
2663
|
_: 1
|
|
2740
2664
|
}),
|
|
2741
|
-
|
|
2742
|
-
default:
|
|
2743
|
-
|
|
2665
|
+
O(C(qe), { onClick: g }, {
|
|
2666
|
+
default: h(() => [...d[14] || (d[14] = [
|
|
2667
|
+
we("重置", -1)
|
|
2744
2668
|
])]),
|
|
2745
2669
|
_: 1
|
|
2746
2670
|
})
|
|
@@ -2751,101 +2675,101 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2751
2675
|
]),
|
|
2752
2676
|
_: 3
|
|
2753
2677
|
}, 8, ["model"]),
|
|
2754
|
-
|
|
2755
|
-
|
|
2678
|
+
b.value ? (v(), Q("div", jl, [
|
|
2679
|
+
Z.value ? (v(), de(C(qe), {
|
|
2756
2680
|
key: 0,
|
|
2757
2681
|
type: "primary",
|
|
2758
|
-
onClick:
|
|
2682
|
+
onClick: B
|
|
2759
2683
|
}, {
|
|
2760
|
-
default:
|
|
2761
|
-
|
|
2684
|
+
default: h(() => [...d[15] || (d[15] = [
|
|
2685
|
+
we(" 新增 ", -1)
|
|
2762
2686
|
])]),
|
|
2763
2687
|
_: 1
|
|
2764
|
-
})) :
|
|
2765
|
-
|
|
2766
|
-
query:
|
|
2688
|
+
})) : T("", !0),
|
|
2689
|
+
I(u.$slots, "toolbar", {
|
|
2690
|
+
query: z,
|
|
2767
2691
|
search: y
|
|
2768
2692
|
}, void 0, !0),
|
|
2769
|
-
|
|
2770
|
-
query:
|
|
2693
|
+
I(u.$slots, "bar", {
|
|
2694
|
+
query: z,
|
|
2771
2695
|
search: y
|
|
2772
2696
|
}, void 0, !0)
|
|
2773
|
-
])) :
|
|
2774
|
-
])) :
|
|
2775
|
-
Ye((
|
|
2697
|
+
])) : T("", !0)
|
|
2698
|
+
])) : T("", !0),
|
|
2699
|
+
Ye((v(), de(C(wa), Ve({
|
|
2776
2700
|
ref_key: "tableRef",
|
|
2777
2701
|
ref: f,
|
|
2778
2702
|
data: A.value,
|
|
2779
|
-
"row-key":
|
|
2703
|
+
"row-key": ae.value,
|
|
2780
2704
|
border: "",
|
|
2781
2705
|
"highlight-current-row": "",
|
|
2782
2706
|
"max-height": "550px"
|
|
2783
2707
|
}, ne.value, {
|
|
2784
|
-
onSelectionChange:
|
|
2785
|
-
onRowClick:
|
|
2708
|
+
onSelectionChange: i,
|
|
2709
|
+
onRowClick: Y
|
|
2786
2710
|
}), {
|
|
2787
|
-
default:
|
|
2711
|
+
default: h(() => {
|
|
2788
2712
|
var l;
|
|
2789
2713
|
return [
|
|
2790
|
-
U.value === "multiple" ? (
|
|
2714
|
+
U.value === "multiple" ? (v(), de(C(Sa), {
|
|
2791
2715
|
key: 0,
|
|
2792
2716
|
type: "selection",
|
|
2793
2717
|
"reserve-selection": "",
|
|
2794
2718
|
width: "42",
|
|
2795
2719
|
selectable: (l = ne.value) == null ? void 0 : l.selectable
|
|
2796
|
-
}, null, 8, ["selectable"])) :
|
|
2797
|
-
|
|
2798
|
-
|
|
2720
|
+
}, null, 8, ["selectable"])) : T("", !0),
|
|
2721
|
+
I(u.$slots, "columns", {}, void 0, !0),
|
|
2722
|
+
I(u.$slots, "cols", {}, void 0, !0)
|
|
2799
2723
|
];
|
|
2800
2724
|
}),
|
|
2801
2725
|
_: 3
|
|
2802
2726
|
}, 16, ["data", "row-key"])), [
|
|
2803
|
-
[
|
|
2727
|
+
[N, E.value]
|
|
2804
2728
|
]),
|
|
2805
|
-
t.showPagination &&
|
|
2806
|
-
|
|
2807
|
-
"current-page":
|
|
2808
|
-
"onUpdate:currentPage": d[4] || (d[4] = (l) =>
|
|
2809
|
-
"page-size":
|
|
2810
|
-
"onUpdate:pageSize": d[5] || (d[5] = (l) =>
|
|
2811
|
-
total:
|
|
2729
|
+
t.showPagination && M.value > 0 ? (v(), Q("div", Nl, [
|
|
2730
|
+
O(C(ka), {
|
|
2731
|
+
"current-page": z.page,
|
|
2732
|
+
"onUpdate:currentPage": d[4] || (d[4] = (l) => z.page = l),
|
|
2733
|
+
"page-size": z.pageSize,
|
|
2734
|
+
"onUpdate:pageSize": d[5] || (d[5] = (l) => z.pageSize = l),
|
|
2735
|
+
total: M.value,
|
|
2812
2736
|
"page-sizes": t.pageSizes,
|
|
2813
2737
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
2814
|
-
onSizeChange:
|
|
2738
|
+
onSizeChange: V,
|
|
2815
2739
|
onCurrentChange: s
|
|
2816
2740
|
}, null, 8, ["current-page", "page-size", "total", "page-sizes"])
|
|
2817
|
-
])) :
|
|
2741
|
+
])) : T("", !0)
|
|
2818
2742
|
])
|
|
2819
2743
|
]),
|
|
2820
|
-
|
|
2821
|
-
modelValue:
|
|
2822
|
-
"onUpdate:modelValue": d[8] || (d[8] = (l) =>
|
|
2744
|
+
O(Je, {
|
|
2745
|
+
modelValue: j.value,
|
|
2746
|
+
"onUpdate:modelValue": d[8] || (d[8] = (l) => j.value = l),
|
|
2823
2747
|
title: "粘贴数据",
|
|
2824
2748
|
layout: !1,
|
|
2825
2749
|
width: "560px"
|
|
2826
2750
|
}, {
|
|
2827
|
-
default:
|
|
2828
|
-
|
|
2829
|
-
modelValue:
|
|
2830
|
-
"onUpdate:modelValue": d[6] || (d[6] = (l) =>
|
|
2751
|
+
default: h(() => [
|
|
2752
|
+
O(C(Oe), {
|
|
2753
|
+
modelValue: G.value,
|
|
2754
|
+
"onUpdate:modelValue": d[6] || (d[6] = (l) => G.value = l),
|
|
2831
2755
|
type: "textarea",
|
|
2832
2756
|
rows: 8
|
|
2833
2757
|
}, null, 8, ["modelValue"]),
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
onClick: d[7] || (d[7] = (l) =>
|
|
2758
|
+
R("div", Hl, [
|
|
2759
|
+
O(C(qe), {
|
|
2760
|
+
onClick: d[7] || (d[7] = (l) => j.value = !1)
|
|
2837
2761
|
}, {
|
|
2838
|
-
default:
|
|
2839
|
-
|
|
2762
|
+
default: h(() => [...d[16] || (d[16] = [
|
|
2763
|
+
we("取消", -1)
|
|
2840
2764
|
])]),
|
|
2841
2765
|
_: 1
|
|
2842
2766
|
}),
|
|
2843
|
-
|
|
2767
|
+
O(C(qe), {
|
|
2844
2768
|
type: "primary",
|
|
2845
|
-
onClick:
|
|
2769
|
+
onClick: Ie
|
|
2846
2770
|
}, {
|
|
2847
|
-
default:
|
|
2848
|
-
|
|
2771
|
+
default: h(() => [...d[17] || (d[17] = [
|
|
2772
|
+
we("确认", -1)
|
|
2849
2773
|
])]),
|
|
2850
2774
|
_: 1
|
|
2851
2775
|
})
|
|
@@ -2858,7 +2782,7 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2858
2782
|
}, 16, ["model-value", "title", "width"]);
|
|
2859
2783
|
};
|
|
2860
2784
|
}
|
|
2861
|
-
}), Ct = /* @__PURE__ */
|
|
2785
|
+
}), Ct = /* @__PURE__ */ Re(Zl, [["__scopeId", "data-v-e59770ef"]]), _l = /* @__PURE__ */ Be({
|
|
2862
2786
|
name: "QyLegacySelectionDialog",
|
|
2863
2787
|
inheritAttrs: !1,
|
|
2864
2788
|
__name: "index",
|
|
@@ -2884,8 +2808,8 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2884
2808
|
select: { default: null }
|
|
2885
2809
|
},
|
|
2886
2810
|
emits: ["close", "submit", "openDialog", "changeIndexShow"],
|
|
2887
|
-
setup(t, { expose:
|
|
2888
|
-
const e = t, n = W, H =
|
|
2811
|
+
setup(t, { expose: P, emit: W }) {
|
|
2812
|
+
const e = t, n = W, H = Qe(), c = q(null), m = _e({
|
|
2889
2813
|
category: [],
|
|
2890
2814
|
code: "",
|
|
2891
2815
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
@@ -2893,7 +2817,7 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2893
2817
|
pageSize: 10,
|
|
2894
2818
|
type: "",
|
|
2895
2819
|
...e.queryParams
|
|
2896
|
-
}), f =
|
|
2820
|
+
}), f = _e({
|
|
2897
2821
|
total: 0,
|
|
2898
2822
|
tableData: [],
|
|
2899
2823
|
open: !1,
|
|
@@ -2905,10 +2829,10 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2905
2829
|
dialogOpen: !1,
|
|
2906
2830
|
pasteData: "",
|
|
2907
2831
|
pasteDataDialog: !1
|
|
2908
|
-
}), A = F(() => e.type || []),
|
|
2832
|
+
}), A = F(() => e.type || []), x = F(() => f.categories), D = async (s) => {
|
|
2909
2833
|
if (!e.query) return { data: { records: [], total: 0 } };
|
|
2910
|
-
const y = await e.query(
|
|
2911
|
-
return f.total =
|
|
2834
|
+
const y = await e.query(oe(s)), V = e.responseFormatter ? await e.responseFormatter(y) : y;
|
|
2835
|
+
return f.total = K(V), V;
|
|
2912
2836
|
};
|
|
2913
2837
|
fe(
|
|
2914
2838
|
() => e.open,
|
|
@@ -2925,7 +2849,7 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2925
2849
|
), fe(
|
|
2926
2850
|
[() => e.selected, () => e.open],
|
|
2927
2851
|
() => {
|
|
2928
|
-
e.open && (f.selection =
|
|
2852
|
+
e.open && (f.selection = te(e.selected));
|
|
2929
2853
|
},
|
|
2930
2854
|
{ immediate: !0, deep: !0 }
|
|
2931
2855
|
), fe(
|
|
@@ -2948,39 +2872,39 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2948
2872
|
), fe(
|
|
2949
2873
|
() => e.open,
|
|
2950
2874
|
async (s) => {
|
|
2951
|
-
s && (f.dialogOpen = !1, await
|
|
2875
|
+
s && (f.dialogOpen = !1, await E());
|
|
2952
2876
|
},
|
|
2953
2877
|
{ immediate: !0 }
|
|
2954
2878
|
);
|
|
2955
|
-
async function
|
|
2879
|
+
async function E() {
|
|
2956
2880
|
if (!e.category) {
|
|
2957
2881
|
f.categories = [];
|
|
2958
2882
|
return;
|
|
2959
2883
|
}
|
|
2960
2884
|
const s = typeof e.category == "function" ? await e.category() : e.category;
|
|
2961
|
-
f.categories =
|
|
2885
|
+
f.categories = b(s);
|
|
2962
2886
|
}
|
|
2963
|
-
async function
|
|
2887
|
+
async function M() {
|
|
2964
2888
|
var s;
|
|
2965
2889
|
return await De(), (s = c.value) == null ? void 0 : s.handleQuerySearch();
|
|
2966
2890
|
}
|
|
2967
|
-
function
|
|
2968
|
-
f.selection =
|
|
2891
|
+
function j(s) {
|
|
2892
|
+
f.selection = te(s);
|
|
2969
2893
|
}
|
|
2970
|
-
function
|
|
2894
|
+
function G(s) {
|
|
2971
2895
|
var y;
|
|
2972
2896
|
f.tableData = s, f.tableRef = (y = c.value) == null ? void 0 : y.getTableRef();
|
|
2973
2897
|
}
|
|
2974
|
-
function
|
|
2975
|
-
f.selection =
|
|
2898
|
+
function z(s) {
|
|
2899
|
+
f.selection = te(s), n("submit", f);
|
|
2976
2900
|
}
|
|
2977
2901
|
function U() {
|
|
2978
2902
|
n("close");
|
|
2979
2903
|
}
|
|
2980
|
-
function
|
|
2904
|
+
function ae() {
|
|
2981
2905
|
f.dialogOpen = !0, n("openDialog");
|
|
2982
2906
|
}
|
|
2983
|
-
function
|
|
2907
|
+
function J(s) {
|
|
2984
2908
|
n("changeIndexShow", s);
|
|
2985
2909
|
}
|
|
2986
2910
|
async function X(s) {
|
|
@@ -2989,12 +2913,12 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
2989
2913
|
...m,
|
|
2990
2914
|
[e.searchKey]: s[e.mainKey],
|
|
2991
2915
|
category: []
|
|
2992
|
-
}),
|
|
2916
|
+
}), V = e.responseFormatter ? await e.responseFormatter(y) : y, [g] = o(V);
|
|
2993
2917
|
g && (e.selection === "multi" ? (f.selection = f.selection.filter(
|
|
2994
|
-
(
|
|
2918
|
+
(B) => B[e.mainKey] !== g[e.mainKey]
|
|
2995
2919
|
), f.selection.push(g)) : f.selection = [g]);
|
|
2996
2920
|
}
|
|
2997
|
-
function
|
|
2921
|
+
function oe(s = {}) {
|
|
2998
2922
|
m.page = s.page ?? m.page, m.pageSize = s.pageSize ?? m.pageSize;
|
|
2999
2923
|
const y = {
|
|
3000
2924
|
...m,
|
|
@@ -3008,48 +2932,48 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
3008
2932
|
const s = m.category;
|
|
3009
2933
|
if (Array.isArray(s)) return s;
|
|
3010
2934
|
if (!s) return [];
|
|
3011
|
-
const y =
|
|
3012
|
-
return y ?
|
|
2935
|
+
const y = ie(f.categories, s);
|
|
2936
|
+
return y ? Z(y) : [s];
|
|
3013
2937
|
}
|
|
3014
|
-
function
|
|
3015
|
-
for (const
|
|
3016
|
-
if (
|
|
3017
|
-
const g =
|
|
2938
|
+
function ie(s, y) {
|
|
2939
|
+
for (const V of s || []) {
|
|
2940
|
+
if (V.value === y) return V;
|
|
2941
|
+
const g = ie(V.children || [], y);
|
|
3018
2942
|
if (g) return g;
|
|
3019
2943
|
}
|
|
3020
2944
|
}
|
|
3021
|
-
function
|
|
3022
|
-
return [s.value, ...(s.children || []).flatMap(
|
|
2945
|
+
function Z(s) {
|
|
2946
|
+
return [s.value, ...(s.children || []).flatMap(Z)];
|
|
3023
2947
|
}
|
|
3024
|
-
function
|
|
2948
|
+
function b(s) {
|
|
3025
2949
|
const y = (s == null ? void 0 : s.data) ?? s;
|
|
3026
2950
|
if (!Array.isArray(y)) return [];
|
|
3027
2951
|
if (typeof e.categoryFormatter == "function")
|
|
3028
2952
|
return e.categoryFormatter(y);
|
|
3029
2953
|
if (Array.isArray(e.categoryFormatter)) {
|
|
3030
|
-
const [
|
|
3031
|
-
return a(
|
|
2954
|
+
const [V, g] = e.categoryFormatter;
|
|
2955
|
+
return a($(y, g), V, g);
|
|
3032
2956
|
}
|
|
3033
2957
|
return y;
|
|
3034
2958
|
}
|
|
3035
|
-
function
|
|
3036
|
-
const
|
|
3037
|
-
return
|
|
3038
|
-
const
|
|
3039
|
-
if (!
|
|
3040
|
-
g.push(
|
|
2959
|
+
function $(s, y) {
|
|
2960
|
+
const V = s.map((B) => ({ ...B })), g = [];
|
|
2961
|
+
return V.forEach((B) => {
|
|
2962
|
+
const re = B.parentCateCode;
|
|
2963
|
+
if (!re) {
|
|
2964
|
+
g.push(B);
|
|
3041
2965
|
return;
|
|
3042
2966
|
}
|
|
3043
|
-
const
|
|
3044
|
-
|
|
2967
|
+
const pe = V.find((ge) => ge[y] === re);
|
|
2968
|
+
pe ? (pe.children || (pe.children = [])).push(B) : g.push(B);
|
|
3045
2969
|
}), g;
|
|
3046
2970
|
}
|
|
3047
|
-
function a(s, y,
|
|
2971
|
+
function a(s, y, V) {
|
|
3048
2972
|
return s.map((g) => ({
|
|
3049
2973
|
...g,
|
|
3050
2974
|
label: g[y],
|
|
3051
|
-
value: g[
|
|
3052
|
-
children: Array.isArray(g.children) ? a(g.children, y,
|
|
2975
|
+
value: g[V],
|
|
2976
|
+
children: Array.isArray(g.children) ? a(g.children, y, V) : g.children
|
|
3053
2977
|
}));
|
|
3054
2978
|
}
|
|
3055
2979
|
function o(s) {
|
|
@@ -3057,28 +2981,28 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
3057
2981
|
const y = s == null ? void 0 : s.data;
|
|
3058
2982
|
return Array.isArray(y) ? y : (s == null ? void 0 : s.records) || (s == null ? void 0 : s.rows) || (y == null ? void 0 : y.records) || [];
|
|
3059
2983
|
}
|
|
3060
|
-
function
|
|
2984
|
+
function K(s) {
|
|
3061
2985
|
if (Array.isArray(s)) return s.length;
|
|
3062
|
-
const y = o(s),
|
|
3063
|
-
return (s == null ? void 0 : s.total) ?? (Array.isArray(
|
|
2986
|
+
const y = o(s), V = s == null ? void 0 : s.data;
|
|
2987
|
+
return (s == null ? void 0 : s.total) ?? (Array.isArray(V) ? V.length : V == null ? void 0 : V.total) ?? y.length;
|
|
3064
2988
|
}
|
|
3065
|
-
function
|
|
2989
|
+
function te(s = []) {
|
|
3066
2990
|
return s.map((y) => ({ ...y }));
|
|
3067
2991
|
}
|
|
3068
|
-
return
|
|
3069
|
-
search:
|
|
3070
|
-
handleSearch:
|
|
3071
|
-
handleConditionChange:
|
|
2992
|
+
return P({
|
|
2993
|
+
search: M,
|
|
2994
|
+
handleSearch: M,
|
|
2995
|
+
handleConditionChange: M,
|
|
3072
2996
|
getTableRef: () => f.tableRef,
|
|
3073
2997
|
getTableData: () => f.tableData,
|
|
3074
|
-
getSelection: () =>
|
|
3075
|
-
}), (s, y) => (
|
|
3076
|
-
|
|
2998
|
+
getSelection: () => te(f.selection)
|
|
2999
|
+
}), (s, y) => (v(), Q(Fe, null, [
|
|
3000
|
+
O(Ct, Ve({
|
|
3077
3001
|
ref_key: "selectionDialogRef",
|
|
3078
3002
|
ref: c
|
|
3079
|
-
},
|
|
3003
|
+
}, C(H), {
|
|
3080
3004
|
modelValue: f.selection,
|
|
3081
|
-
"onUpdate:modelValue": y[3] || (y[3] = (
|
|
3005
|
+
"onUpdate:modelValue": y[3] || (y[3] = (V) => f.selection = V),
|
|
3082
3006
|
open: t.open,
|
|
3083
3007
|
title: t.title,
|
|
3084
3008
|
width: t.width,
|
|
@@ -3089,99 +3013,99 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
3089
3013
|
"label-key": t.tagName,
|
|
3090
3014
|
"search-key": t.searchKey,
|
|
3091
3015
|
"query-params": {},
|
|
3092
|
-
"category-options":
|
|
3016
|
+
"category-options": x.value,
|
|
3093
3017
|
"type-options": A.value,
|
|
3094
3018
|
"type-select-props": t.typeSelectionProps,
|
|
3095
3019
|
"table-props": t.tableProps,
|
|
3096
3020
|
"show-copy-paste": !0,
|
|
3097
3021
|
"show-append": t.append,
|
|
3098
|
-
onSelectionChange:
|
|
3099
|
-
onConfirm:
|
|
3022
|
+
onSelectionChange: j,
|
|
3023
|
+
onConfirm: z,
|
|
3100
3024
|
onCancel: U,
|
|
3101
|
-
onAppend:
|
|
3102
|
-
onLoaded:
|
|
3025
|
+
onAppend: ae,
|
|
3026
|
+
onLoaded: G
|
|
3103
3027
|
}), {
|
|
3104
|
-
side:
|
|
3105
|
-
|
|
3028
|
+
side: h(() => [
|
|
3029
|
+
I(s.$slots, "side", {
|
|
3106
3030
|
state: f,
|
|
3107
3031
|
cate: f.categories,
|
|
3108
3032
|
form: m,
|
|
3109
3033
|
query: m,
|
|
3110
|
-
getData:
|
|
3111
|
-
search:
|
|
3112
|
-
changeIndexShow:
|
|
3034
|
+
getData: M,
|
|
3035
|
+
search: M,
|
|
3036
|
+
changeIndexShow: J
|
|
3113
3037
|
}, void 0, !0)
|
|
3114
3038
|
]),
|
|
3115
|
-
search:
|
|
3116
|
-
|
|
3039
|
+
search: h(() => [
|
|
3040
|
+
O(C(wt), {
|
|
3117
3041
|
inline: "",
|
|
3118
3042
|
model: m
|
|
3119
3043
|
}, {
|
|
3120
|
-
default:
|
|
3121
|
-
f.categories.length ? (
|
|
3044
|
+
default: h(() => [
|
|
3045
|
+
f.categories.length ? (v(), de(C(ze), {
|
|
3122
3046
|
key: 0,
|
|
3123
3047
|
label: "分类"
|
|
3124
3048
|
}, {
|
|
3125
|
-
default:
|
|
3126
|
-
|
|
3049
|
+
default: h(() => [
|
|
3050
|
+
O(C(xa), {
|
|
3127
3051
|
modelValue: m.category,
|
|
3128
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
3052
|
+
"onUpdate:modelValue": y[0] || (y[0] = (V) => m.category = V),
|
|
3129
3053
|
class: "qy-legacy-selection-dialog__category",
|
|
3130
3054
|
data: f.categories,
|
|
3131
3055
|
clearable: "",
|
|
3132
3056
|
filterable: "",
|
|
3133
3057
|
"check-strictly": "",
|
|
3134
3058
|
"render-after-expand": !1,
|
|
3135
|
-
onChange:
|
|
3059
|
+
onChange: M
|
|
3136
3060
|
}, null, 8, ["modelValue", "data"])
|
|
3137
3061
|
]),
|
|
3138
3062
|
_: 1
|
|
3139
|
-
})) :
|
|
3140
|
-
A.value.length ? (
|
|
3063
|
+
})) : T("", !0),
|
|
3064
|
+
A.value.length ? (v(), de(C(ze), {
|
|
3141
3065
|
key: 1,
|
|
3142
3066
|
label: "类型"
|
|
3143
3067
|
}, {
|
|
3144
|
-
default:
|
|
3145
|
-
|
|
3068
|
+
default: h(() => [
|
|
3069
|
+
O(C(ht), Ve({
|
|
3146
3070
|
modelValue: m.type,
|
|
3147
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
3071
|
+
"onUpdate:modelValue": y[1] || (y[1] = (V) => m.type = V),
|
|
3148
3072
|
clearable: ""
|
|
3149
|
-
}, t.typeSelectionProps, { onChange:
|
|
3150
|
-
default:
|
|
3151
|
-
(
|
|
3152
|
-
key:
|
|
3153
|
-
label:
|
|
3154
|
-
value:
|
|
3073
|
+
}, t.typeSelectionProps, { onChange: M }), {
|
|
3074
|
+
default: h(() => [
|
|
3075
|
+
(v(!0), Q(Fe, null, et(A.value, (V) => (v(), de(C(bt), {
|
|
3076
|
+
key: V.value,
|
|
3077
|
+
label: V.label,
|
|
3078
|
+
value: V.value
|
|
3155
3079
|
}, null, 8, ["label", "value"]))), 128))
|
|
3156
3080
|
]),
|
|
3157
3081
|
_: 1
|
|
3158
3082
|
}, 16, ["modelValue"])
|
|
3159
3083
|
]),
|
|
3160
3084
|
_: 1
|
|
3161
|
-
})) :
|
|
3162
|
-
t.searchKey ? (
|
|
3085
|
+
})) : T("", !0),
|
|
3086
|
+
t.searchKey ? (v(), de(C(ze), {
|
|
3163
3087
|
key: 2,
|
|
3164
3088
|
label: "搜索"
|
|
3165
3089
|
}, {
|
|
3166
|
-
default:
|
|
3167
|
-
|
|
3090
|
+
default: h(() => [
|
|
3091
|
+
O(C(Oe), {
|
|
3168
3092
|
modelValue: m[t.searchKey],
|
|
3169
|
-
"onUpdate:modelValue": y[2] || (y[2] = (
|
|
3093
|
+
"onUpdate:modelValue": y[2] || (y[2] = (V) => m[t.searchKey] = V),
|
|
3170
3094
|
clearable: "",
|
|
3171
3095
|
class: "qy-legacy-selection-dialog__search-input",
|
|
3172
|
-
onKeydown:
|
|
3096
|
+
onKeydown: je(ue(M, ["prevent"]), ["enter"])
|
|
3173
3097
|
}, null, 8, ["modelValue", "onKeydown"])
|
|
3174
3098
|
]),
|
|
3175
3099
|
_: 1
|
|
3176
|
-
})) :
|
|
3177
|
-
|
|
3178
|
-
default:
|
|
3179
|
-
|
|
3100
|
+
})) : T("", !0),
|
|
3101
|
+
O(C(ze), null, {
|
|
3102
|
+
default: h(() => [
|
|
3103
|
+
O(C(qe), {
|
|
3180
3104
|
type: "primary",
|
|
3181
|
-
onClick:
|
|
3105
|
+
onClick: M
|
|
3182
3106
|
}, {
|
|
3183
|
-
default:
|
|
3184
|
-
|
|
3107
|
+
default: h(() => [...y[4] || (y[4] = [
|
|
3108
|
+
we("查询", -1)
|
|
3185
3109
|
])]),
|
|
3186
3110
|
_: 1
|
|
3187
3111
|
})
|
|
@@ -3192,32 +3116,32 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
3192
3116
|
_: 1
|
|
3193
3117
|
}, 8, ["model"])
|
|
3194
3118
|
]),
|
|
3195
|
-
toolbar:
|
|
3196
|
-
|
|
3119
|
+
toolbar: h(() => [
|
|
3120
|
+
I(s.$slots, "bar", {
|
|
3197
3121
|
query: m,
|
|
3198
|
-
search:
|
|
3122
|
+
search: M
|
|
3199
3123
|
}, void 0, !0)
|
|
3200
3124
|
]),
|
|
3201
|
-
columns:
|
|
3202
|
-
|
|
3203
|
-
|
|
3125
|
+
columns: h(() => [
|
|
3126
|
+
I(s.$slots, "cols", {}, void 0, !0),
|
|
3127
|
+
I(s.$slots, "columns", {}, void 0, !0)
|
|
3204
3128
|
]),
|
|
3205
3129
|
_: 3
|
|
3206
3130
|
}, 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"]),
|
|
3207
|
-
|
|
3131
|
+
I(s.$slots, "dialog", {
|
|
3208
3132
|
state: f,
|
|
3209
3133
|
form: m,
|
|
3210
|
-
getData:
|
|
3134
|
+
getData: M
|
|
3211
3135
|
}, void 0, !0)
|
|
3212
3136
|
], 64));
|
|
3213
3137
|
}
|
|
3214
|
-
}),
|
|
3138
|
+
}), Wl = /* @__PURE__ */ Re(_l, [["__scopeId", "data-v-b54ca11b"]]), Gl = { class: "qy-form-section__heading" }, Jl = {
|
|
3215
3139
|
key: 0,
|
|
3216
3140
|
class: "qy-form-section__title"
|
|
3217
|
-
},
|
|
3141
|
+
}, Xl = {
|
|
3218
3142
|
key: 0,
|
|
3219
3143
|
class: "qy-form-section__description"
|
|
3220
|
-
},
|
|
3144
|
+
}, Yl = { class: "qy-form-section__actions" }, eo = /* @__PURE__ */ Be({
|
|
3221
3145
|
name: "QyFormSection",
|
|
3222
3146
|
__name: "index",
|
|
3223
3147
|
props: {
|
|
@@ -3233,8 +3157,8 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
3233
3157
|
headerClass: { default: "" }
|
|
3234
3158
|
},
|
|
3235
3159
|
emits: ["toggle"],
|
|
3236
|
-
setup(t, { emit:
|
|
3237
|
-
const W = t, e =
|
|
3160
|
+
setup(t, { emit: P }) {
|
|
3161
|
+
const W = t, e = P, n = q(W.defaultExpanded);
|
|
3238
3162
|
fe(
|
|
3239
3163
|
() => W.defaultExpanded,
|
|
3240
3164
|
(m) => {
|
|
@@ -3247,8 +3171,8 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
3247
3171
|
function c() {
|
|
3248
3172
|
W.collapsible && H();
|
|
3249
3173
|
}
|
|
3250
|
-
return (m, f) => (
|
|
3251
|
-
class:
|
|
3174
|
+
return (m, f) => (v(), Q("section", {
|
|
3175
|
+
class: ke(["qy-form-section", [
|
|
3252
3176
|
`is-bg-${t.background}`,
|
|
3253
3177
|
{
|
|
3254
3178
|
"is-bordered": t.bordered,
|
|
@@ -3256,53 +3180,53 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
3256
3180
|
}
|
|
3257
3181
|
]])
|
|
3258
3182
|
}, [
|
|
3259
|
-
|
|
3260
|
-
class:
|
|
3183
|
+
R("header", {
|
|
3184
|
+
class: ke(["qy-form-section__header", t.headerClass]),
|
|
3261
3185
|
onClick: c
|
|
3262
3186
|
}, [
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
t.title ? (
|
|
3187
|
+
R("div", Gl, [
|
|
3188
|
+
I(m.$slots, "title", {}, () => [
|
|
3189
|
+
t.title ? (v(), Q("div", Jl, ye(t.title), 1)) : T("", !0)
|
|
3266
3190
|
], !0),
|
|
3267
|
-
|
|
3268
|
-
t.description ? (
|
|
3191
|
+
I(m.$slots, "description", {}, () => [
|
|
3192
|
+
t.description ? (v(), Q("div", Xl, ye(t.description), 1)) : T("", !0)
|
|
3269
3193
|
], !0)
|
|
3270
3194
|
]),
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
t.collapsible ? (
|
|
3195
|
+
R("div", Yl, [
|
|
3196
|
+
I(m.$slots, "actions", {}, void 0, !0),
|
|
3197
|
+
t.collapsible ? (v(), Q("button", {
|
|
3274
3198
|
key: 0,
|
|
3275
3199
|
type: "button",
|
|
3276
3200
|
class: "qy-form-section__toggle",
|
|
3277
|
-
onClick:
|
|
3278
|
-
}, ye(n.value ? "收起" : "展开"), 1)) :
|
|
3201
|
+
onClick: ue(H, ["stop"])
|
|
3202
|
+
}, ye(n.value ? "收起" : "展开"), 1)) : T("", !0)
|
|
3279
3203
|
])
|
|
3280
3204
|
], 2),
|
|
3281
|
-
Ye(
|
|
3282
|
-
class:
|
|
3205
|
+
Ye(R("div", {
|
|
3206
|
+
class: ke(["qy-form-section__body", t.bodyClass])
|
|
3283
3207
|
}, [
|
|
3284
|
-
|
|
3285
|
-
t.tip ? (
|
|
3208
|
+
I(m.$slots, "tip", {}, () => [
|
|
3209
|
+
t.tip ? (v(), Q("div", {
|
|
3286
3210
|
key: 0,
|
|
3287
|
-
class:
|
|
3288
|
-
}, ye(t.tip), 3)) :
|
|
3211
|
+
class: ke(["qy-form-section__tip", `is-${t.tipType}`])
|
|
3212
|
+
}, ye(t.tip), 3)) : T("", !0)
|
|
3289
3213
|
], !0),
|
|
3290
|
-
|
|
3214
|
+
I(m.$slots, "default", {}, void 0, !0)
|
|
3291
3215
|
], 2), [
|
|
3292
3216
|
[yt, n.value]
|
|
3293
3217
|
])
|
|
3294
3218
|
], 2));
|
|
3295
3219
|
}
|
|
3296
|
-
}),
|
|
3220
|
+
}), to = /* @__PURE__ */ Re(eo, [["__scopeId", "data-v-8149aa01"]]), ao = {
|
|
3297
3221
|
key: 0,
|
|
3298
3222
|
class: "qy-action-bar__left"
|
|
3299
|
-
},
|
|
3223
|
+
}, lo = {
|
|
3300
3224
|
key: 1,
|
|
3301
3225
|
class: "qy-action-bar__center"
|
|
3302
|
-
},
|
|
3226
|
+
}, oo = {
|
|
3303
3227
|
key: 2,
|
|
3304
3228
|
class: "qy-action-bar__right"
|
|
3305
|
-
},
|
|
3229
|
+
}, no = /* @__PURE__ */ Be({
|
|
3306
3230
|
name: "QyActionBar",
|
|
3307
3231
|
__name: "index",
|
|
3308
3232
|
props: {
|
|
@@ -3315,13 +3239,13 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
3315
3239
|
background: { default: "#fff" }
|
|
3316
3240
|
},
|
|
3317
3241
|
setup(t) {
|
|
3318
|
-
const
|
|
3242
|
+
const P = t, W = F(() => ({
|
|
3319
3243
|
// offsetBottom 只负责业务偏移,安全区补偿由 CSS padding 处理。
|
|
3320
|
-
bottom: `${
|
|
3321
|
-
background:
|
|
3244
|
+
bottom: `${P.offsetBottom}px`,
|
|
3245
|
+
background: P.background
|
|
3322
3246
|
}));
|
|
3323
|
-
return (e, n) => (
|
|
3324
|
-
class:
|
|
3247
|
+
return (e, n) => (v(), Q("div", {
|
|
3248
|
+
class: ke(["qy-action-bar", [
|
|
3325
3249
|
`is-justify-${t.justify}`,
|
|
3326
3250
|
{
|
|
3327
3251
|
"is-sticky": t.sticky,
|
|
@@ -3330,89 +3254,103 @@ const ol = { class: "qy-remark-image__field" }, rl = {
|
|
|
3330
3254
|
"is-wrap": t.wrap
|
|
3331
3255
|
}
|
|
3332
3256
|
]]),
|
|
3333
|
-
style:
|
|
3257
|
+
style: Pe(W.value)
|
|
3334
3258
|
}, [
|
|
3335
|
-
e.$slots.left ? (
|
|
3336
|
-
|
|
3337
|
-
])) :
|
|
3338
|
-
e.$slots.default ? (
|
|
3339
|
-
|
|
3340
|
-
])) :
|
|
3341
|
-
e.$slots.right ? (
|
|
3342
|
-
|
|
3343
|
-
])) :
|
|
3259
|
+
e.$slots.left ? (v(), Q("div", ao, [
|
|
3260
|
+
I(e.$slots, "left", {}, void 0, !0)
|
|
3261
|
+
])) : T("", !0),
|
|
3262
|
+
e.$slots.default ? (v(), Q("div", lo, [
|
|
3263
|
+
I(e.$slots, "default", {}, void 0, !0)
|
|
3264
|
+
])) : T("", !0),
|
|
3265
|
+
e.$slots.right ? (v(), Q("div", oo, [
|
|
3266
|
+
I(e.$slots, "right", {}, void 0, !0)
|
|
3267
|
+
])) : T("", !0)
|
|
3344
3268
|
], 6));
|
|
3345
3269
|
}
|
|
3346
|
-
}),
|
|
3347
|
-
|
|
3270
|
+
}), io = /* @__PURE__ */ Re(no, [["__scopeId", "data-v-ecba8f49"]]), $t = _(xt, "QyUpload"), qt = _(Va, "QyImage"), Bt = _(Ca, "QyImagePreview"), Qt = _(al, "QyImageUpload"), At = _(Je, "QyDialog"), zt = _(Cl, "QyRemarkImage"), Rt = _(Qa, "QyButton"), It = _(Aa, "QyDropdown"), Ft = _(za, "QyInput"), Tt = _(Ra, "QyInputNumber"), Pt = _($l, "QyMoneyInput"), Mt = _(Ia, "QyDatePicker"), Ot = _(Fa, "QyCheckbox"), Dt = _(Ta, "QyCheckboxGroup"), Ut = _(Pa, "QyRadio"), Kt = _(Ma, "QyAutocomplete"), Lt = _(Oa, "QyMenuActions"), Et = _(
|
|
3271
|
+
Da,
|
|
3348
3272
|
"QyTableColumnSettings"
|
|
3349
|
-
),
|
|
3350
|
-
|
|
3273
|
+
), jt = _(Ua, "QyRadioGroup"), Nt = _(ql, "QyRemoteSelect"), Ht = _(Vt, "QySearchInput"), Zt = _(
|
|
3274
|
+
Ml,
|
|
3351
3275
|
"QyRecordQuoteSearch"
|
|
3352
|
-
),
|
|
3353
|
-
|
|
3276
|
+
), _t = _(tt, "QySelect"), Wt = _(St, "QyTreeSelect"), Gt = _(Ct, "QySelectionDialog"), Jt = _(
|
|
3277
|
+
Wl,
|
|
3354
3278
|
"QyLegacySelectionDialog"
|
|
3355
|
-
),
|
|
3356
|
-
t.component("QyDialog", At), t.component("QyUpload", $t), t.component("QyImage", qt), t.component("QyImagePreview", Bt), t.component("QyImageUpload",
|
|
3357
|
-
},
|
|
3358
|
-
install:
|
|
3279
|
+
), Xt = _(to, "QyFormSection"), Yt = _(io, "QyActionBar"), ea = _(Ka, "QyFilePicker"), ta = _(La, "QySwitch"), aa = _(We, "QyTag"), la = _(Ea, "QyTooltip"), oa = _(ja, "QyPopover"), ro = (t) => {
|
|
3280
|
+
t.component("QyDialog", At), t.component("QyUpload", $t), t.component("QyImage", qt), t.component("QyImagePreview", Bt), t.component("QyImageUpload", Qt), t.component("QyRemarkImage", zt), t.component("QyButton", Rt), t.component("QyDropdown", It), t.component("QyInput", Ft), t.component("QyInputNumber", Tt), t.component("QyMoneyInput", Pt), t.component("QyDatePicker", Mt), t.component("QyCheckbox", Ot), t.component("QyCheckboxGroup", Dt), t.component("QyRadio", Ut), t.component("QyAutocomplete", Kt), t.component("QyMenuActions", Lt), t.component("QyTableColumnSettings", Et), t.component("QyRadioGroup", jt), t.component("QyRemoteSelect", Nt), t.component("QySearchInput", Ht), t.component("QyRecordQuoteSearch", Zt), t.component("QySelect", _t), t.component("QyTreeSelect", Wt), t.component("QySelectionDialog", Gt), t.component("QyLegacySelectionDialog", Jt), t.component("QyFormSection", Xt), t.component("QyActionBar", Yt), t.component("QyFilePicker", ea), t.component("QySwitch", ta), t.component("QyTag", aa), t.component("QyTooltip", la), t.component("QyPopover", oa);
|
|
3281
|
+
}, Do = {
|
|
3282
|
+
install: ro,
|
|
3359
3283
|
QyUpload: $t,
|
|
3360
3284
|
QyImage: qt,
|
|
3361
3285
|
QyImagePreview: Bt,
|
|
3362
|
-
openQyImagePreview:
|
|
3363
|
-
QyImageUpload:
|
|
3286
|
+
openQyImagePreview: Na,
|
|
3287
|
+
QyImageUpload: Qt,
|
|
3364
3288
|
QyDialog: At,
|
|
3365
|
-
QyButton:
|
|
3366
|
-
QyDropdown:
|
|
3289
|
+
QyButton: Rt,
|
|
3290
|
+
QyDropdown: It,
|
|
3367
3291
|
QyInput: Ft,
|
|
3368
3292
|
QyInputNumber: Tt,
|
|
3369
|
-
QyMoneyInput:
|
|
3370
|
-
QyDatePicker:
|
|
3371
|
-
QyCheckbox:
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3293
|
+
QyMoneyInput: Pt,
|
|
3294
|
+
QyDatePicker: Mt,
|
|
3295
|
+
QyCheckbox: Ot,
|
|
3296
|
+
QyCheckboxGroup: Dt,
|
|
3297
|
+
QyRadio: Ut,
|
|
3298
|
+
QyAutocomplete: Kt,
|
|
3299
|
+
QyMenuActions: Lt,
|
|
3300
|
+
QyTableColumnSettings: Et,
|
|
3301
|
+
QyRadioGroup: jt,
|
|
3302
|
+
QyRemoteSelect: Nt,
|
|
3303
|
+
QySearchInput: Ht,
|
|
3304
|
+
QyRecordQuoteSearch: Zt,
|
|
3305
|
+
QySelect: _t,
|
|
3306
|
+
QyTreeSelect: Wt,
|
|
3307
|
+
QySelectionDialog: Gt,
|
|
3308
|
+
QyLegacySelectionDialog: Jt,
|
|
3309
|
+
QyFormSection: Xt,
|
|
3310
|
+
QyActionBar: Yt,
|
|
3311
|
+
QyFilePicker: ea,
|
|
3312
|
+
QySwitch: ta,
|
|
3313
|
+
QyTag: aa,
|
|
3314
|
+
QyTooltip: la,
|
|
3315
|
+
QyPopover: oa,
|
|
3316
|
+
QyRemarkImage: zt
|
|
3386
3317
|
};
|
|
3387
3318
|
export {
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3319
|
+
ta as A,
|
|
3320
|
+
Et as B,
|
|
3321
|
+
aa as C,
|
|
3322
|
+
la as D,
|
|
3323
|
+
Wt as E,
|
|
3324
|
+
$t as F,
|
|
3325
|
+
Do as G,
|
|
3326
|
+
ml as H,
|
|
3327
|
+
st as I,
|
|
3328
|
+
ut as J,
|
|
3329
|
+
Yt as Q,
|
|
3330
|
+
Kt as a,
|
|
3331
|
+
Rt as b,
|
|
3332
|
+
Ot as c,
|
|
3333
|
+
Dt as d,
|
|
3334
|
+
Mt as e,
|
|
3335
|
+
At as f,
|
|
3336
|
+
It as g,
|
|
3337
|
+
ea as h,
|
|
3338
|
+
Xt as i,
|
|
3339
|
+
qt as j,
|
|
3340
|
+
Bt as k,
|
|
3341
|
+
Qt as l,
|
|
3342
|
+
Ft as m,
|
|
3343
|
+
Tt as n,
|
|
3344
|
+
Jt as o,
|
|
3407
3345
|
Lt as p,
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3346
|
+
Pt as q,
|
|
3347
|
+
oa as r,
|
|
3348
|
+
Ut as s,
|
|
3411
3349
|
jt as t,
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3350
|
+
Zt as u,
|
|
3351
|
+
zt as v,
|
|
3352
|
+
Nt as w,
|
|
3353
|
+
Ht as x,
|
|
3354
|
+
_t as y,
|
|
3355
|
+
Gt as z
|
|
3418
3356
|
};
|