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