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