@qynpm/ui 1.0.28 → 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 +88 -0
- 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 +1 -1
- package/dist/qy-input-number/index.mjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-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-DleLvEzf.mjs → index-BQj_q6rA.mjs} +998 -972
- package/dist/shared/{index-CVoiIRas.mjs → index-BSxEaYHx.mjs} +1 -1
- package/dist/shared/{index-BTL45WYB.cjs → index-Bs6yjkZ5.cjs} +1 -1
- 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 +101 -0
- 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-B8phg478.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,
|
|
@@ -1754,13 +1763,13 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
1754
1763
|
"remote-show-suffix": t.remoteShowSuffix,
|
|
1755
1764
|
"remote-method": b,
|
|
1756
1765
|
loading: j.value,
|
|
1757
|
-
"onUpdate:modelValue":
|
|
1758
|
-
onChange:
|
|
1766
|
+
"onUpdate:modelValue": l,
|
|
1767
|
+
onChange: L,
|
|
1759
1768
|
onClear: te,
|
|
1760
1769
|
onVisibleChange: s,
|
|
1761
1770
|
onFocus: p,
|
|
1762
|
-
onBlur:
|
|
1763
|
-
}),
|
|
1771
|
+
onBlur: C
|
|
1772
|
+
}), _e({
|
|
1764
1773
|
default: h(() => [
|
|
1765
1774
|
m.$slots.default ? R(m.$slots, "default", {}, void 0, void 0, 0) : P("", !0)
|
|
1766
1775
|
]),
|
|
@@ -1789,17 +1798,17 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
1789
1798
|
} : void 0,
|
|
1790
1799
|
m.$slots.tag ? {
|
|
1791
1800
|
name: "tag",
|
|
1792
|
-
fn: h((
|
|
1793
|
-
R(m.$slots, "tag", gt(vt(
|
|
1801
|
+
fn: h((i) => [
|
|
1802
|
+
R(m.$slots, "tag", gt(vt(i)))
|
|
1794
1803
|
]),
|
|
1795
1804
|
key: "3"
|
|
1796
1805
|
} : void 0
|
|
1797
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"]));
|
|
1798
1807
|
}
|
|
1799
|
-
}),
|
|
1808
|
+
}), Rl = { class: "qy-search-input__item" }, Fl = ["innerHTML"], Pl = {
|
|
1800
1809
|
key: 0,
|
|
1801
1810
|
class: "qy-search-input__item-description"
|
|
1802
|
-
},
|
|
1811
|
+
}, Dl = /* @__PURE__ */ qe({
|
|
1803
1812
|
name: "QySearchInput",
|
|
1804
1813
|
inheritAttrs: !1,
|
|
1805
1814
|
__name: "index",
|
|
@@ -1832,126 +1841,126 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
1832
1841
|
setup(t, { expose: D, emit: W }) {
|
|
1833
1842
|
const e = t, n = W, H = Be(), d = q(null), y = q(E(e.modelValue)), f = F(() => E(e.modelValue)), I = F(
|
|
1834
1843
|
() => ["qy-search-input__popper", e.popperClass].filter(Boolean).join(" ")
|
|
1835
|
-
),
|
|
1844
|
+
), Q = F(() => E(e.modelValue)), _ = q("");
|
|
1836
1845
|
fe(
|
|
1837
1846
|
() => e.modelValue,
|
|
1838
|
-
(
|
|
1839
|
-
y.value = E(
|
|
1847
|
+
(i) => {
|
|
1848
|
+
y.value = E(i);
|
|
1840
1849
|
}
|
|
1841
1850
|
);
|
|
1842
|
-
function E(
|
|
1843
|
-
return
|
|
1851
|
+
function E(i) {
|
|
1852
|
+
return i == null ? "" : String(i);
|
|
1844
1853
|
}
|
|
1845
|
-
function M(
|
|
1846
|
-
return e.removeSpace ?
|
|
1854
|
+
function M(i) {
|
|
1855
|
+
return e.removeSpace ? i.replace(/\s+/g, "") : i;
|
|
1847
1856
|
}
|
|
1848
|
-
function j(
|
|
1849
|
-
return e.trimMode !== w ?
|
|
1857
|
+
function j(i, w) {
|
|
1858
|
+
return e.trimMode !== w ? i : i.trim();
|
|
1850
1859
|
}
|
|
1851
|
-
function G(
|
|
1852
|
-
return M(E(
|
|
1860
|
+
function G(i) {
|
|
1861
|
+
return M(E(i));
|
|
1853
1862
|
}
|
|
1854
|
-
function T(
|
|
1855
|
-
y.value =
|
|
1863
|
+
function T(i) {
|
|
1864
|
+
y.value = i, n("update:modelValue", i);
|
|
1856
1865
|
}
|
|
1857
|
-
function
|
|
1866
|
+
function U(i, w = "") {
|
|
1858
1867
|
return {
|
|
1859
|
-
...
|
|
1860
|
-
label:
|
|
1861
|
-
value:
|
|
1862
|
-
description:
|
|
1868
|
+
...i,
|
|
1869
|
+
label: i.label || i.value,
|
|
1870
|
+
value: i.value || i.label,
|
|
1871
|
+
description: i.description || w
|
|
1863
1872
|
};
|
|
1864
1873
|
}
|
|
1865
|
-
function ae(
|
|
1866
|
-
return
|
|
1874
|
+
function ae(i = []) {
|
|
1875
|
+
return i.flatMap((w) => {
|
|
1867
1876
|
if (Array.isArray(w.items)) {
|
|
1868
1877
|
const ee = w;
|
|
1869
|
-
return ee.items.map((Se) =>
|
|
1878
|
+
return ee.items.map((Se) => U(Se, ee.groupLabel));
|
|
1870
1879
|
}
|
|
1871
|
-
return
|
|
1880
|
+
return U(w);
|
|
1872
1881
|
});
|
|
1873
1882
|
}
|
|
1874
|
-
function
|
|
1875
|
-
const w =
|
|
1883
|
+
function J(i) {
|
|
1884
|
+
const w = i.toLowerCase();
|
|
1876
1885
|
return (ee) => [ee.label, ee.value, ee.description].filter(Boolean).some((Se) => String(Se).toLowerCase().includes(w));
|
|
1877
1886
|
}
|
|
1878
|
-
function
|
|
1879
|
-
return
|
|
1887
|
+
function X(i) {
|
|
1888
|
+
return i ? i.length >= e.minLength : e.triggerOnFocus;
|
|
1880
1889
|
}
|
|
1881
|
-
function
|
|
1882
|
-
n("suggestions-change",
|
|
1890
|
+
function le(i) {
|
|
1891
|
+
n("suggestions-change", i), n("visible-change", i.length > 0);
|
|
1883
1892
|
}
|
|
1884
|
-
async function ne(
|
|
1885
|
-
if (!
|
|
1886
|
-
return
|
|
1893
|
+
async function ne(i) {
|
|
1894
|
+
if (!X(i))
|
|
1895
|
+
return le([]), [];
|
|
1887
1896
|
if (e.fetchSuggestionsMethod) {
|
|
1888
1897
|
const Se = await new Promise(($e) => {
|
|
1889
1898
|
var de;
|
|
1890
|
-
(de = e.fetchSuggestionsMethod) == null || de.call(e,
|
|
1899
|
+
(de = e.fetchSuggestionsMethod) == null || de.call(e, i, (De) => {
|
|
1891
1900
|
$e(ae(De));
|
|
1892
1901
|
});
|
|
1893
1902
|
});
|
|
1894
|
-
return
|
|
1903
|
+
return le(Se), Se;
|
|
1895
1904
|
}
|
|
1896
1905
|
if (e.fetchSuggestions) {
|
|
1897
|
-
const Se = await e.fetchSuggestions(
|
|
1898
|
-
return
|
|
1906
|
+
const Se = await e.fetchSuggestions(i), $e = ae(Array.isArray(Se) ? Se : []);
|
|
1907
|
+
return le($e), $e;
|
|
1899
1908
|
}
|
|
1900
|
-
const w = ae(e.suggestions), ee =
|
|
1901
|
-
return
|
|
1909
|
+
const w = ae(e.suggestions), ee = i ? w.filter(J(i)) : w;
|
|
1910
|
+
return le(ee), ee;
|
|
1902
1911
|
}
|
|
1903
|
-
async function
|
|
1904
|
-
|
|
1912
|
+
async function ie(i, w) {
|
|
1913
|
+
_.value = i;
|
|
1905
1914
|
try {
|
|
1906
|
-
const ee = await ne(
|
|
1915
|
+
const ee = await ne(i);
|
|
1907
1916
|
w(ee);
|
|
1908
1917
|
} catch (ee) {
|
|
1909
|
-
n("error", ee),
|
|
1918
|
+
n("error", ee), le([]), w([]);
|
|
1910
1919
|
}
|
|
1911
1920
|
}
|
|
1912
1921
|
function Z() {
|
|
1913
|
-
var
|
|
1914
|
-
|
|
1922
|
+
var i, w;
|
|
1923
|
+
_.value && ((w = (i = d.value) == null ? void 0 : i.getData) == null || w.call(i, _.value));
|
|
1915
1924
|
}
|
|
1916
|
-
function b(
|
|
1917
|
-
const w = G(
|
|
1925
|
+
function b(i) {
|
|
1926
|
+
const w = G(i);
|
|
1918
1927
|
T(w);
|
|
1919
1928
|
}
|
|
1920
|
-
function V(
|
|
1921
|
-
const w = G(
|
|
1929
|
+
function V(i) {
|
|
1930
|
+
const w = G(i);
|
|
1922
1931
|
y.value = w, n("input", w);
|
|
1923
1932
|
}
|
|
1924
|
-
function a(
|
|
1925
|
-
const w = j(G(
|
|
1933
|
+
function a(i) {
|
|
1934
|
+
const w = j(G(i), "change");
|
|
1926
1935
|
w !== E(e.modelValue) && T(w), n("change", w);
|
|
1927
1936
|
}
|
|
1928
|
-
function
|
|
1929
|
-
n("focus",
|
|
1937
|
+
function l(i) {
|
|
1938
|
+
n("focus", i);
|
|
1930
1939
|
}
|
|
1931
|
-
function
|
|
1940
|
+
function L(i) {
|
|
1932
1941
|
const w = j(y.value, "blur");
|
|
1933
|
-
w !== E(e.modelValue) && T(w), n("blur",
|
|
1942
|
+
w !== E(e.modelValue) && T(w), n("blur", i), n("visible-change", !1);
|
|
1934
1943
|
}
|
|
1935
1944
|
function te() {
|
|
1936
|
-
y.value = "", n("update:modelValue", ""), n("clear"),
|
|
1945
|
+
y.value = "", n("update:modelValue", ""), n("clear"), le([]);
|
|
1937
1946
|
}
|
|
1938
|
-
function s(
|
|
1939
|
-
n("enter",
|
|
1947
|
+
function s(i) {
|
|
1948
|
+
n("enter", i), e.searchOnEnter && p();
|
|
1940
1949
|
}
|
|
1941
1950
|
function p() {
|
|
1942
1951
|
n("search", E(e.modelValue));
|
|
1943
1952
|
}
|
|
1944
|
-
function
|
|
1945
|
-
n("select",
|
|
1953
|
+
function C(i) {
|
|
1954
|
+
n("select", i), e.searchOnSelect && n("search", i.value);
|
|
1946
1955
|
}
|
|
1947
|
-
function g(
|
|
1948
|
-
return
|
|
1956
|
+
function g(i) {
|
|
1957
|
+
return i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1949
1958
|
}
|
|
1950
|
-
function B(
|
|
1951
|
-
return
|
|
1959
|
+
function B(i) {
|
|
1960
|
+
return i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1952
1961
|
}
|
|
1953
|
-
function
|
|
1954
|
-
const w = g(
|
|
1962
|
+
function re(i) {
|
|
1963
|
+
const w = g(i || "");
|
|
1955
1964
|
if (!e.highlightKeyword || !f.value) return w;
|
|
1956
1965
|
const ee = B(g(f.value));
|
|
1957
1966
|
return ee ? w.replace(
|
|
@@ -1960,46 +1969,46 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
1960
1969
|
) : w;
|
|
1961
1970
|
}
|
|
1962
1971
|
function me() {
|
|
1963
|
-
var
|
|
1964
|
-
(w = (
|
|
1972
|
+
var i, w;
|
|
1973
|
+
(w = (i = d.value) == null ? void 0 : i.focus) == null || w.call(i);
|
|
1965
1974
|
}
|
|
1966
|
-
function
|
|
1967
|
-
var
|
|
1968
|
-
(w = (
|
|
1975
|
+
function we() {
|
|
1976
|
+
var i, w;
|
|
1977
|
+
(w = (i = d.value) == null ? void 0 : i.blur) == null || w.call(i);
|
|
1969
1978
|
}
|
|
1970
1979
|
function xe() {
|
|
1971
|
-
var
|
|
1972
|
-
(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);
|
|
1973
1982
|
}
|
|
1974
1983
|
function m() {
|
|
1975
|
-
var
|
|
1976
|
-
(w = (
|
|
1984
|
+
var i, w;
|
|
1985
|
+
(w = (i = d.value) == null ? void 0 : i.clear) == null || w.call(i);
|
|
1977
1986
|
}
|
|
1978
1987
|
function Y() {
|
|
1979
|
-
var
|
|
1980
|
-
(w = (
|
|
1988
|
+
var i, w;
|
|
1989
|
+
(w = (i = d.value) == null ? void 0 : i.close) == null || w.call(i);
|
|
1981
1990
|
}
|
|
1982
1991
|
return D({
|
|
1983
1992
|
// 暴露搜索框常用控制方法,供弹窗打开后聚焦或失败后重试建议项。
|
|
1984
1993
|
focus: me,
|
|
1985
|
-
blur:
|
|
1994
|
+
blur: we,
|
|
1986
1995
|
select: xe,
|
|
1987
1996
|
clear: m,
|
|
1988
1997
|
closePanel: Y,
|
|
1989
1998
|
retryFetch: Z
|
|
1990
|
-
}), (
|
|
1999
|
+
}), (i, w) => (v(), A("div", {
|
|
1991
2000
|
class: ke(["qy-search-input", { "is-disabled": t.disabled }])
|
|
1992
2001
|
}, [
|
|
1993
|
-
O($(
|
|
2002
|
+
O($(Wa), Qe({
|
|
1994
2003
|
ref_key: "autocompleteRef",
|
|
1995
2004
|
ref: d
|
|
1996
2005
|
}, $(H), {
|
|
1997
|
-
"model-value":
|
|
2006
|
+
"model-value": Q.value,
|
|
1998
2007
|
disabled: t.disabled,
|
|
1999
2008
|
placeholder: t.placeholder,
|
|
2000
2009
|
clearable: t.clearable,
|
|
2001
2010
|
debounce: t.debounce,
|
|
2002
|
-
"fetch-suggestions":
|
|
2011
|
+
"fetch-suggestions": ie,
|
|
2003
2012
|
"trigger-on-focus": t.triggerOnFocus,
|
|
2004
2013
|
teleported: t.teleported,
|
|
2005
2014
|
"fit-input-width": t.fitInputWidth,
|
|
@@ -2009,59 +2018,59 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2009
2018
|
"onUpdate:modelValue": b,
|
|
2010
2019
|
onInput: V,
|
|
2011
2020
|
onChange: a,
|
|
2012
|
-
onFocus:
|
|
2013
|
-
onBlur:
|
|
2021
|
+
onFocus: l,
|
|
2022
|
+
onBlur: L,
|
|
2014
2023
|
onClear: te,
|
|
2015
|
-
onSelect:
|
|
2024
|
+
onSelect: C,
|
|
2016
2025
|
onKeydown: Ee(s, ["enter"])
|
|
2017
|
-
}),
|
|
2026
|
+
}), _e({
|
|
2018
2027
|
default: h(({ item: ee }) => [
|
|
2019
|
-
R(
|
|
2028
|
+
R(i.$slots, "item", {
|
|
2020
2029
|
item: ee,
|
|
2021
2030
|
keyword: f.value
|
|
2022
2031
|
}, () => [
|
|
2023
|
-
z("div",
|
|
2032
|
+
z("div", Rl, [
|
|
2024
2033
|
z("div", {
|
|
2025
2034
|
class: "qy-search-input__item-label",
|
|
2026
|
-
innerHTML:
|
|
2027
|
-
}, null, 8,
|
|
2028
|
-
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)
|
|
2029
2038
|
])
|
|
2030
2039
|
], !0)
|
|
2031
2040
|
]),
|
|
2032
2041
|
_: 2
|
|
2033
2042
|
}, [
|
|
2034
|
-
|
|
2043
|
+
i.$slots.prefix ? {
|
|
2035
2044
|
name: "prefix",
|
|
2036
2045
|
fn: h(() => [
|
|
2037
|
-
R(
|
|
2046
|
+
R(i.$slots, "prefix", {}, void 0, !0)
|
|
2038
2047
|
]),
|
|
2039
2048
|
key: "0"
|
|
2040
2049
|
} : void 0,
|
|
2041
|
-
|
|
2050
|
+
i.$slots.suffix ? {
|
|
2042
2051
|
name: "suffix",
|
|
2043
2052
|
fn: h(() => [
|
|
2044
|
-
R(
|
|
2053
|
+
R(i.$slots, "suffix", {}, void 0, !0)
|
|
2045
2054
|
]),
|
|
2046
2055
|
key: "1"
|
|
2047
2056
|
} : void 0,
|
|
2048
|
-
|
|
2057
|
+
i.$slots.prepend ? {
|
|
2049
2058
|
name: "prepend",
|
|
2050
2059
|
fn: h(() => [
|
|
2051
|
-
R(
|
|
2060
|
+
R(i.$slots, "prepend", {}, void 0, !0)
|
|
2052
2061
|
]),
|
|
2053
2062
|
key: "2"
|
|
2054
2063
|
} : void 0,
|
|
2055
|
-
|
|
2064
|
+
i.$slots.append || t.showButton ? {
|
|
2056
2065
|
name: "append",
|
|
2057
2066
|
fn: h(() => [
|
|
2058
|
-
|
|
2067
|
+
i.$slots.append ? R(i.$slots, "append", {}, void 0, !0, 0) : (v(), ce($(Ve), Qe({ key: 1 }, t.buttonProps, {
|
|
2059
2068
|
loading: t.loading,
|
|
2060
2069
|
disabled: t.disabled,
|
|
2061
2070
|
onClick: p
|
|
2062
2071
|
}), {
|
|
2063
2072
|
default: h(() => [
|
|
2064
|
-
|
|
2073
|
+
be(pe(t.buttonText), 1)
|
|
2065
2074
|
]),
|
|
2066
2075
|
_: 1
|
|
2067
2076
|
}, 16, ["loading", "disabled"]))
|
|
@@ -2071,16 +2080,16 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2071
2080
|
]), 1040, ["model-value", "disabled", "placeholder", "clearable", "debounce", "trigger-on-focus", "teleported", "fit-input-width", "popper-class", "append-to"])
|
|
2072
2081
|
], 2));
|
|
2073
2082
|
}
|
|
2074
|
-
}),
|
|
2083
|
+
}), $t = /* @__PURE__ */ Te(Dl, [["__scopeId", "data-v-cd7f5dfc"]]), Ml = { class: "qy-record-quote-search" }, Ol = {
|
|
2075
2084
|
key: 0,
|
|
2076
2085
|
class: "qy-record-quote-search__header"
|
|
2077
|
-
},
|
|
2086
|
+
}, _l = {
|
|
2078
2087
|
key: 0,
|
|
2079
2088
|
class: "qy-record-quote-search__label"
|
|
2080
|
-
},
|
|
2089
|
+
}, Ul = {
|
|
2081
2090
|
key: 1,
|
|
2082
2091
|
class: "qy-record-quote-search__description"
|
|
2083
|
-
},
|
|
2092
|
+
}, Ll = /* @__PURE__ */ qe({
|
|
2084
2093
|
name: "QyRecordQuoteSearch",
|
|
2085
2094
|
inheritAttrs: !1,
|
|
2086
2095
|
__name: "index",
|
|
@@ -2110,95 +2119,95 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2110
2119
|
emits: ["update:modelValue", "search", "clear", "normalize", "enter", "select", "error", "success"],
|
|
2111
2120
|
setup(t, { expose: D, emit: W }) {
|
|
2112
2121
|
const e = t, n = W, H = Be(), d = q(null), y = q(!1), f = F(() => e.statusText || ""), I = F(() => e.loading || y.value);
|
|
2113
|
-
function
|
|
2122
|
+
function Q(a) {
|
|
2114
2123
|
return a == null ? "" : String(a);
|
|
2115
2124
|
}
|
|
2116
|
-
function
|
|
2117
|
-
const
|
|
2118
|
-
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;
|
|
2119
2128
|
}
|
|
2120
2129
|
function E(a) {
|
|
2121
|
-
return
|
|
2130
|
+
return Q(a).replace(/\s+/g, "").trim().toUpperCase();
|
|
2122
2131
|
}
|
|
2123
2132
|
function M(a) {
|
|
2124
|
-
return e.extractMethod ? e.extractMethod(a) :
|
|
2133
|
+
return e.extractMethod ? e.extractMethod(a) : _(a);
|
|
2125
2134
|
}
|
|
2126
2135
|
function j(a) {
|
|
2127
2136
|
return e.normalizeMethod ? e.normalizeMethod(a) : E(a);
|
|
2128
2137
|
}
|
|
2129
|
-
function G(a,
|
|
2130
|
-
const
|
|
2131
|
-
return n("normalize", { rawValue:
|
|
2132
|
-
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,
|
|
2133
2142
|
code: s,
|
|
2134
|
-
item:
|
|
2143
|
+
item: l
|
|
2135
2144
|
};
|
|
2136
2145
|
}
|
|
2137
2146
|
function T(a) {
|
|
2138
2147
|
n("update:modelValue", a);
|
|
2139
2148
|
}
|
|
2140
|
-
async function
|
|
2149
|
+
async function U(a) {
|
|
2141
2150
|
if (n("search", a), !!e.searchMethod) {
|
|
2142
2151
|
y.value = !0;
|
|
2143
2152
|
try {
|
|
2144
|
-
const
|
|
2145
|
-
n("success",
|
|
2146
|
-
} catch (
|
|
2147
|
-
n("error",
|
|
2153
|
+
const l = await e.searchMethod(a);
|
|
2154
|
+
n("success", l);
|
|
2155
|
+
} catch (l) {
|
|
2156
|
+
n("error", l);
|
|
2148
2157
|
} finally {
|
|
2149
2158
|
y.value = !1;
|
|
2150
2159
|
}
|
|
2151
2160
|
}
|
|
2152
2161
|
}
|
|
2153
2162
|
function ae(a) {
|
|
2154
|
-
const
|
|
2155
|
-
|
|
2163
|
+
const l = G(a);
|
|
2164
|
+
l.code !== Q(e.modelValue) && n("update:modelValue", l.code), U(l);
|
|
2156
2165
|
}
|
|
2157
|
-
function
|
|
2166
|
+
function J() {
|
|
2158
2167
|
n("clear");
|
|
2159
2168
|
}
|
|
2160
|
-
function
|
|
2169
|
+
function X(a) {
|
|
2161
2170
|
n("enter", a);
|
|
2162
2171
|
}
|
|
2163
|
-
function
|
|
2172
|
+
function le(a) {
|
|
2164
2173
|
if (n("select", a), !e.searchOnSelect) return;
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2174
|
+
const l = G(a.value, a);
|
|
2175
|
+
l.code !== Q(e.modelValue) && n("update:modelValue", l.code), U(l);
|
|
2167
2176
|
}
|
|
2168
2177
|
function ne(a) {
|
|
2169
2178
|
n("error", a);
|
|
2170
2179
|
}
|
|
2171
|
-
function
|
|
2172
|
-
var a,
|
|
2173
|
-
(
|
|
2180
|
+
function ie() {
|
|
2181
|
+
var a, l;
|
|
2182
|
+
(l = (a = d.value) == null ? void 0 : a.focus) == null || l.call(a);
|
|
2174
2183
|
}
|
|
2175
2184
|
function Z() {
|
|
2176
|
-
var a,
|
|
2177
|
-
(
|
|
2185
|
+
var a, l;
|
|
2186
|
+
(l = (a = d.value) == null ? void 0 : a.blur) == null || l.call(a);
|
|
2178
2187
|
}
|
|
2179
2188
|
function b() {
|
|
2180
|
-
var a,
|
|
2181
|
-
(
|
|
2189
|
+
var a, l;
|
|
2190
|
+
(l = (a = d.value) == null ? void 0 : a.select) == null || l.call(a);
|
|
2182
2191
|
}
|
|
2183
2192
|
function V() {
|
|
2184
|
-
var a,
|
|
2185
|
-
(
|
|
2193
|
+
var a, l;
|
|
2194
|
+
(l = (a = d.value) == null ? void 0 : a.clear) == null || l.call(a);
|
|
2186
2195
|
}
|
|
2187
2196
|
return D({
|
|
2188
|
-
focus:
|
|
2197
|
+
focus: ie,
|
|
2189
2198
|
blur: Z,
|
|
2190
2199
|
select: b,
|
|
2191
2200
|
clear: V,
|
|
2192
2201
|
extractQuoteOrderCode: M,
|
|
2193
2202
|
normalizeQuoteOrderCode: j
|
|
2194
|
-
}), (a,
|
|
2203
|
+
}), (a, l) => (v(), A("div", Ml, [
|
|
2195
2204
|
R(a.$slots, "label", {}, () => [
|
|
2196
|
-
t.label || t.description ? (v(), A("div",
|
|
2197
|
-
t.label ? (v(), A("div",
|
|
2198
|
-
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)
|
|
2199
2208
|
])) : P("", !0)
|
|
2200
2209
|
], !0),
|
|
2201
|
-
O(
|
|
2210
|
+
O($t, Qe({
|
|
2202
2211
|
ref_key: "searchRef",
|
|
2203
2212
|
ref: d
|
|
2204
2213
|
}, $(H), {
|
|
@@ -2217,11 +2226,11 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2217
2226
|
"search-on-select": !1,
|
|
2218
2227
|
"onUpdate:modelValue": T,
|
|
2219
2228
|
onSearch: ae,
|
|
2220
|
-
onClear:
|
|
2221
|
-
onEnter:
|
|
2222
|
-
onSelect:
|
|
2229
|
+
onClear: J,
|
|
2230
|
+
onEnter: X,
|
|
2231
|
+
onSelect: le,
|
|
2223
2232
|
onError: ne
|
|
2224
|
-
}),
|
|
2233
|
+
}), _e({ _: 2 }, [
|
|
2225
2234
|
a.$slots.prefix ? {
|
|
2226
2235
|
name: "prefix",
|
|
2227
2236
|
fn: h(() => [
|
|
@@ -2238,8 +2247,8 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2238
2247
|
} : void 0,
|
|
2239
2248
|
a.$slots.item ? {
|
|
2240
2249
|
name: "item",
|
|
2241
|
-
fn: h((
|
|
2242
|
-
R(a.$slots, "item", gt(vt(
|
|
2250
|
+
fn: h((L) => [
|
|
2251
|
+
R(a.$slots, "item", gt(vt(L)), void 0, !0)
|
|
2243
2252
|
]),
|
|
2244
2253
|
key: "2"
|
|
2245
2254
|
} : void 0,
|
|
@@ -2268,22 +2277,22 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2268
2277
|
], !0, 0) : P("", !0)
|
|
2269
2278
|
]));
|
|
2270
2279
|
}
|
|
2271
|
-
}),
|
|
2280
|
+
}), Kl = /* @__PURE__ */ Te(Ll, [["__scopeId", "data-v-3a314f64"]]), El = { class: "qy-selection-dialog" }, jl = { class: "qy-selection-dialog__main" }, Nl = {
|
|
2272
2281
|
key: 0,
|
|
2273
2282
|
class: "qy-selection-dialog__selected"
|
|
2274
|
-
},
|
|
2283
|
+
}, Hl = { class: "qy-selection-dialog__selected-tags" }, Zl = {
|
|
2275
2284
|
key: 0,
|
|
2276
2285
|
class: "qy-selection-dialog__selected-actions"
|
|
2277
|
-
},
|
|
2286
|
+
}, Wl = {
|
|
2278
2287
|
key: 1,
|
|
2279
2288
|
class: "qy-selection-dialog__search-row"
|
|
2280
|
-
},
|
|
2289
|
+
}, Gl = {
|
|
2281
2290
|
key: 0,
|
|
2282
2291
|
class: "qy-selection-dialog__toolbar"
|
|
2283
|
-
},
|
|
2292
|
+
}, Jl = {
|
|
2284
2293
|
key: 2,
|
|
2285
2294
|
class: "qy-selection-dialog__pagination"
|
|
2286
|
-
},
|
|
2295
|
+
}, Xl = { class: "qy-selection-dialog__paste-actions" }, Yl = /* @__PURE__ */ qe({
|
|
2287
2296
|
name: "QySelectionDialog",
|
|
2288
2297
|
inheritAttrs: !1,
|
|
2289
2298
|
__name: "index",
|
|
@@ -2323,59 +2332,59 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2323
2332
|
},
|
|
2324
2333
|
emits: ["update:modelValue", "selection-change", "confirm", "submit", "cancel", "close", "append", "loaded"],
|
|
2325
2334
|
setup(t, { expose: D, emit: W }) {
|
|
2326
|
-
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({
|
|
2327
2336
|
category: [],
|
|
2328
2337
|
type: "",
|
|
2329
2338
|
page: 1,
|
|
2330
2339
|
pageSize: 10,
|
|
2331
2340
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
2332
2341
|
...e.queryParams
|
|
2333
|
-
}),
|
|
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(() => ({
|
|
2334
2343
|
...e.typeSelectionProps,
|
|
2335
2344
|
...e.typeSelectProps
|
|
2336
|
-
})), ne = F(() => e.tableProps || {}),
|
|
2345
|
+
})), ne = F(() => e.tableProps || {}), ie = F(
|
|
2337
2346
|
() => e.showSearch || !!H["search-visible"]
|
|
2338
2347
|
), Z = F(() => e.showAppend || e.append), b = F(
|
|
2339
2348
|
() => Z.value || !!d.toolbar || !!d.bar
|
|
2340
|
-
), V = F(() => e.fetchMethod || e.query), a = F(() =>
|
|
2341
|
-
function
|
|
2349
|
+
), V = F(() => e.fetchMethod || e.query), a = F(() => l() ? e.modelValue : e.selected);
|
|
2350
|
+
function l() {
|
|
2342
2351
|
const u = (y == null ? void 0 : y.vnode.props) || {};
|
|
2343
2352
|
return Object.prototype.hasOwnProperty.call(u, "modelValue") || Object.prototype.hasOwnProperty.call(u, "model-value") || Object.prototype.hasOwnProperty.call(u, "onUpdate:modelValue");
|
|
2344
2353
|
}
|
|
2345
2354
|
fe(
|
|
2346
2355
|
[() => e.modelValue, () => e.selected, () => e.open],
|
|
2347
2356
|
() => {
|
|
2348
|
-
e.open && (
|
|
2357
|
+
e.open && (Q.value = Ae(a.value), ee());
|
|
2349
2358
|
},
|
|
2350
2359
|
{ immediate: !0, deep: !0 }
|
|
2351
2360
|
), fe(
|
|
2352
2361
|
[() => e.categoryOptions, () => e.category],
|
|
2353
2362
|
(u) => {
|
|
2354
2363
|
if (Array.isArray(e.category) && e.category.length) {
|
|
2355
|
-
|
|
2364
|
+
_.value = e.category;
|
|
2356
2365
|
return;
|
|
2357
2366
|
}
|
|
2358
|
-
|
|
2367
|
+
_.value = e.categoryOptions || [];
|
|
2359
2368
|
},
|
|
2360
2369
|
{ immediate: !0 }
|
|
2361
2370
|
), fe(j, (u) => {
|
|
2362
2371
|
u || (G.value = "");
|
|
2363
2372
|
});
|
|
2364
|
-
async function
|
|
2365
|
-
|
|
2373
|
+
async function L() {
|
|
2374
|
+
Q.value = Ae(a.value), await te(), await s(), ee();
|
|
2366
2375
|
}
|
|
2367
2376
|
async function te() {
|
|
2368
2377
|
const u = e.categoryFetchMethod || (typeof e.category == "function" ? e.category : null);
|
|
2369
2378
|
if (!u) return;
|
|
2370
2379
|
const c = await u();
|
|
2371
|
-
|
|
2380
|
+
_.value = me(c);
|
|
2372
2381
|
}
|
|
2373
2382
|
async function s() {
|
|
2374
2383
|
if (V.value) {
|
|
2375
2384
|
E.value = !0;
|
|
2376
2385
|
try {
|
|
2377
|
-
const u = await V.value(xe()), c = e.responseFormatter ? await e.responseFormatter(u) : u, { rows: N, total:
|
|
2378
|
-
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;
|
|
2379
2388
|
} finally {
|
|
2380
2389
|
E.value = !1;
|
|
2381
2390
|
}
|
|
@@ -2384,7 +2393,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2384
2393
|
function p() {
|
|
2385
2394
|
return T.page = 1, s();
|
|
2386
2395
|
}
|
|
2387
|
-
function
|
|
2396
|
+
function C() {
|
|
2388
2397
|
return T.page = 1, s();
|
|
2389
2398
|
}
|
|
2390
2399
|
function g() {
|
|
@@ -2400,14 +2409,14 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2400
2409
|
function B() {
|
|
2401
2410
|
n("append");
|
|
2402
2411
|
}
|
|
2403
|
-
function
|
|
2412
|
+
function re(u) {
|
|
2404
2413
|
if (Array.isArray(u))
|
|
2405
2414
|
return { rows: u, total: u.length };
|
|
2406
2415
|
const c = u == null ? void 0 : u.data;
|
|
2407
2416
|
if (Array.isArray(c))
|
|
2408
2417
|
return { rows: c, total: (u == null ? void 0 : u.total) ?? c.length };
|
|
2409
|
-
const N = (u == null ? void 0 : u.records) || (u == null ? void 0 : u.rows) || (c == null ? void 0 : c.records) || [],
|
|
2410
|
-
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 };
|
|
2411
2420
|
}
|
|
2412
2421
|
function me(u) {
|
|
2413
2422
|
const c = (u == null ? void 0 : u.data) ?? u;
|
|
@@ -2415,22 +2424,22 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2415
2424
|
if (typeof e.categoryFormatter == "function")
|
|
2416
2425
|
return e.categoryFormatter(c);
|
|
2417
2426
|
if (Array.isArray(e.categoryFormatter)) {
|
|
2418
|
-
const [N,
|
|
2419
|
-
return c.map((
|
|
2420
|
-
...
|
|
2421
|
-
label:
|
|
2422
|
-
value:
|
|
2423
|
-
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
|
|
2424
2433
|
}));
|
|
2425
2434
|
}
|
|
2426
2435
|
return c;
|
|
2427
2436
|
}
|
|
2428
|
-
function
|
|
2429
|
-
return u.map((
|
|
2430
|
-
...
|
|
2431
|
-
label:
|
|
2432
|
-
value:
|
|
2433
|
-
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
|
|
2434
2443
|
}));
|
|
2435
2444
|
}
|
|
2436
2445
|
function xe() {
|
|
@@ -2445,43 +2454,43 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2445
2454
|
}
|
|
2446
2455
|
function Y(u) {
|
|
2447
2456
|
var c, N;
|
|
2448
|
-
if (
|
|
2449
|
-
if (
|
|
2450
|
-
|
|
2457
|
+
if (U.value !== "none") {
|
|
2458
|
+
if (U.value === "single") {
|
|
2459
|
+
Q.value = [u], (c = f.value) == null || c.setCurrentRow(u), Fe();
|
|
2451
2460
|
return;
|
|
2452
2461
|
}
|
|
2453
2462
|
Se(u) && ((N = f.value) == null || N.toggleRowSelection(u, !$e(u)));
|
|
2454
2463
|
}
|
|
2455
2464
|
}
|
|
2456
|
-
function
|
|
2457
|
-
if (
|
|
2465
|
+
function i(u) {
|
|
2466
|
+
if (U.value !== "multiple") return;
|
|
2458
2467
|
const c = new Set(I.value.map(de)), N = new Set(u.map(de));
|
|
2459
|
-
|
|
2460
|
-
(
|
|
2461
|
-
), u.forEach((
|
|
2462
|
-
$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);
|
|
2463
2472
|
}), Fe();
|
|
2464
2473
|
}
|
|
2465
2474
|
function w(u) {
|
|
2466
|
-
var N,
|
|
2467
|
-
|
|
2468
|
-
(
|
|
2475
|
+
var N, o;
|
|
2476
|
+
Q.value = Q.value.filter(
|
|
2477
|
+
(r) => de(r) !== de(u)
|
|
2469
2478
|
);
|
|
2470
|
-
const c = I.value.find((
|
|
2471
|
-
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();
|
|
2472
2481
|
}
|
|
2473
2482
|
function ee() {
|
|
2474
2483
|
Oe(() => {
|
|
2475
2484
|
var u;
|
|
2476
2485
|
if (f.value) {
|
|
2477
|
-
if (
|
|
2478
|
-
const [c] =
|
|
2479
|
-
(
|
|
2486
|
+
if (U.value === "single") {
|
|
2487
|
+
const [c] = Q.value, N = I.value.find(
|
|
2488
|
+
(o) => c && de(o) === de(c)
|
|
2480
2489
|
);
|
|
2481
2490
|
(u = f.value) == null || u.setCurrentRow(N);
|
|
2482
2491
|
return;
|
|
2483
2492
|
}
|
|
2484
|
-
|
|
2493
|
+
U.value === "multiple" && I.value.forEach((c) => {
|
|
2485
2494
|
var N;
|
|
2486
2495
|
(N = f.value) == null || N.toggleRowSelection(c, $e(c));
|
|
2487
2496
|
});
|
|
@@ -2494,46 +2503,46 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2494
2503
|
return typeof c == "function" ? c(u) !== !1 : !0;
|
|
2495
2504
|
}
|
|
2496
2505
|
function $e(u) {
|
|
2497
|
-
return
|
|
2506
|
+
return Q.value.some((c) => de(c) === de(u));
|
|
2498
2507
|
}
|
|
2499
2508
|
function de(u) {
|
|
2500
|
-
return
|
|
2509
|
+
return Ue(u, ae.value);
|
|
2501
2510
|
}
|
|
2502
2511
|
function De(u) {
|
|
2503
|
-
return
|
|
2512
|
+
return Ue(u, J.value) ?? de(u);
|
|
2504
2513
|
}
|
|
2505
|
-
function
|
|
2514
|
+
function Ue(u, c) {
|
|
2506
2515
|
if (!(!u || !c))
|
|
2507
|
-
return c.split(".").reduce((N,
|
|
2516
|
+
return c.split(".").reduce((N, o) => N == null ? void 0 : N[o], u);
|
|
2508
2517
|
}
|
|
2509
2518
|
function Fe() {
|
|
2510
|
-
const u = Ae(
|
|
2519
|
+
const u = Ae(Q.value);
|
|
2511
2520
|
n("selection-change", u);
|
|
2512
2521
|
}
|
|
2513
2522
|
function je() {
|
|
2514
|
-
const u = Ae(
|
|
2523
|
+
const u = Ae(Q.value);
|
|
2515
2524
|
n("update:modelValue", u), n("confirm", u), n("submit", { selection: u, rows: u, query: { ...T } });
|
|
2516
2525
|
}
|
|
2517
|
-
function
|
|
2518
|
-
|
|
2526
|
+
function Le() {
|
|
2527
|
+
Q.value = Ae(a.value), n("cancel"), n("close");
|
|
2519
2528
|
}
|
|
2520
2529
|
async function Ne() {
|
|
2521
2530
|
var c;
|
|
2522
|
-
const u = JSON.stringify(
|
|
2523
|
-
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("复制成功");
|
|
2524
2533
|
}
|
|
2525
2534
|
function ze() {
|
|
2526
2535
|
try {
|
|
2527
2536
|
const u = JSON.parse(G.value);
|
|
2528
2537
|
if (!Array.isArray(u)) {
|
|
2529
|
-
|
|
2538
|
+
he.error("粘贴内容需要是数组");
|
|
2530
2539
|
return;
|
|
2531
2540
|
}
|
|
2532
2541
|
u.forEach((c) => {
|
|
2533
|
-
$e(c) ||
|
|
2542
|
+
$e(c) || Q.value.push(c);
|
|
2534
2543
|
}), j.value = !1, Fe(), ee();
|
|
2535
2544
|
} catch (u) {
|
|
2536
|
-
|
|
2545
|
+
he.error(`粘贴错误: ${(u == null ? void 0 : u.message) || "内容格式错误"}`);
|
|
2537
2546
|
}
|
|
2538
2547
|
}
|
|
2539
2548
|
function Ae(u = []) {
|
|
@@ -2546,10 +2555,10 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2546
2555
|
resetSearch: g,
|
|
2547
2556
|
getTableRef: () => f.value,
|
|
2548
2557
|
getTableData: () => I.value,
|
|
2549
|
-
getSelection: () => Ae(
|
|
2558
|
+
getSelection: () => Ae(Q.value)
|
|
2550
2559
|
}), (u, c) => {
|
|
2551
|
-
const N =
|
|
2552
|
-
return v(), ce(
|
|
2560
|
+
const N = Oa;
|
|
2561
|
+
return v(), ce(Je, Qe($(H), {
|
|
2553
2562
|
"model-value": t.open,
|
|
2554
2563
|
title: t.title,
|
|
2555
2564
|
width: t.width,
|
|
@@ -2557,60 +2566,60 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2557
2566
|
draggable: "",
|
|
2558
2567
|
"align-center": "",
|
|
2559
2568
|
"append-to-body": "",
|
|
2560
|
-
onOpened:
|
|
2569
|
+
onOpened: L,
|
|
2561
2570
|
onConfirm: je,
|
|
2562
|
-
onCancel:
|
|
2571
|
+
onCancel: Le
|
|
2563
2572
|
}), {
|
|
2564
2573
|
default: h(() => [
|
|
2565
|
-
z("div",
|
|
2574
|
+
z("div", El, [
|
|
2566
2575
|
R(u.$slots, "side", {}, void 0, !0),
|
|
2567
|
-
z("div",
|
|
2568
|
-
t.showSelected ? (v(), A("div",
|
|
2576
|
+
z("div", jl, [
|
|
2577
|
+
t.showSelected ? (v(), A("div", Nl, [
|
|
2569
2578
|
c[12] || (c[12] = z("span", { class: "qy-selection-dialog__selected-label" }, "已选项", -1)),
|
|
2570
|
-
z("div",
|
|
2571
|
-
(v(!0), A(Re, null, et(
|
|
2572
|
-
key: de(
|
|
2579
|
+
z("div", Hl, [
|
|
2580
|
+
(v(!0), A(Re, null, et(Q.value, (o) => (v(), ce(We, {
|
|
2581
|
+
key: de(o),
|
|
2573
2582
|
closable: "",
|
|
2574
2583
|
class: "qy-selection-dialog__selected-tag",
|
|
2575
|
-
onClose: (
|
|
2584
|
+
onClose: (r) => w(o)
|
|
2576
2585
|
}, {
|
|
2577
2586
|
default: h(() => [
|
|
2578
|
-
|
|
2587
|
+
be(pe(De(o)), 1)
|
|
2579
2588
|
]),
|
|
2580
2589
|
_: 2
|
|
2581
2590
|
}, 1032, ["onClose"]))), 128)),
|
|
2582
|
-
|
|
2591
|
+
Q.value.length ? P("", !0) : (v(), ce(We, {
|
|
2583
2592
|
key: 0,
|
|
2584
2593
|
tone: "info"
|
|
2585
2594
|
}, {
|
|
2586
2595
|
default: h(() => [...c[9] || (c[9] = [
|
|
2587
|
-
|
|
2596
|
+
be("无", -1)
|
|
2588
2597
|
])]),
|
|
2589
2598
|
_: 1
|
|
2590
2599
|
}))
|
|
2591
2600
|
]),
|
|
2592
|
-
t.showCopyPaste ? (v(), A("div",
|
|
2601
|
+
t.showCopyPaste ? (v(), A("div", Zl, [
|
|
2593
2602
|
O($(Ve), {
|
|
2594
2603
|
size: "small",
|
|
2595
2604
|
onClick: Ne
|
|
2596
2605
|
}, {
|
|
2597
2606
|
default: h(() => [...c[10] || (c[10] = [
|
|
2598
|
-
|
|
2607
|
+
be("复制", -1)
|
|
2599
2608
|
])]),
|
|
2600
2609
|
_: 1
|
|
2601
2610
|
}),
|
|
2602
2611
|
O($(Ve), {
|
|
2603
2612
|
size: "small",
|
|
2604
|
-
onClick: c[0] || (c[0] = (
|
|
2613
|
+
onClick: c[0] || (c[0] = (o) => j.value = !0)
|
|
2605
2614
|
}, {
|
|
2606
2615
|
default: h(() => [...c[11] || (c[11] = [
|
|
2607
|
-
|
|
2616
|
+
be("粘贴", -1)
|
|
2608
2617
|
])]),
|
|
2609
2618
|
_: 1
|
|
2610
2619
|
})
|
|
2611
2620
|
])) : P("", !0)
|
|
2612
2621
|
])) : P("", !0),
|
|
2613
|
-
|
|
2622
|
+
ie.value ? (v(), A("div", Wl, [
|
|
2614
2623
|
O($(wt), {
|
|
2615
2624
|
class: "qy-selection-dialog__search",
|
|
2616
2625
|
inline: "",
|
|
@@ -2622,16 +2631,16 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2622
2631
|
search: p,
|
|
2623
2632
|
reset: g
|
|
2624
2633
|
}, () => [
|
|
2625
|
-
|
|
2634
|
+
_.value.length ? (v(), ce($(Ie), {
|
|
2626
2635
|
key: 0,
|
|
2627
2636
|
label: "分类"
|
|
2628
2637
|
}, {
|
|
2629
2638
|
default: h(() => [
|
|
2630
2639
|
O(St, {
|
|
2631
2640
|
modelValue: T.category,
|
|
2632
|
-
"onUpdate:modelValue": c[1] || (c[1] = (
|
|
2641
|
+
"onUpdate:modelValue": c[1] || (c[1] = (o) => T.category = o),
|
|
2633
2642
|
class: "qy-selection-dialog__category",
|
|
2634
|
-
options:
|
|
2643
|
+
options: _.value,
|
|
2635
2644
|
clearable: "",
|
|
2636
2645
|
filterable: "",
|
|
2637
2646
|
"check-strictly": "",
|
|
@@ -2641,19 +2650,19 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2641
2650
|
]),
|
|
2642
2651
|
_: 1
|
|
2643
2652
|
})) : P("", !0),
|
|
2644
|
-
|
|
2653
|
+
X.value.length ? (v(), ce($(Ie), {
|
|
2645
2654
|
key: 1,
|
|
2646
2655
|
label: "类型"
|
|
2647
2656
|
}, {
|
|
2648
2657
|
default: h(() => [
|
|
2649
2658
|
O(tt, Qe({
|
|
2650
2659
|
modelValue: T.type,
|
|
2651
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
2660
|
+
"onUpdate:modelValue": c[2] || (c[2] = (o) => T.type = o),
|
|
2652
2661
|
class: "qy-selection-dialog__type",
|
|
2653
|
-
options:
|
|
2662
|
+
options: X.value,
|
|
2654
2663
|
placeholder: "请选择类型",
|
|
2655
2664
|
clearable: ""
|
|
2656
|
-
},
|
|
2665
|
+
}, le.value, { onChange: p }), null, 16, ["modelValue", "options"])
|
|
2657
2666
|
]),
|
|
2658
2667
|
_: 1
|
|
2659
2668
|
})) : P("", !0),
|
|
@@ -2664,7 +2673,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2664
2673
|
default: h(() => [
|
|
2665
2674
|
O($(Me), {
|
|
2666
2675
|
modelValue: T[t.searchKey],
|
|
2667
|
-
"onUpdate:modelValue": c[3] || (c[3] = (
|
|
2676
|
+
"onUpdate:modelValue": c[3] || (c[3] = (o) => T[t.searchKey] = o),
|
|
2668
2677
|
clearable: "",
|
|
2669
2678
|
placeholder: "请输入",
|
|
2670
2679
|
class: "qy-selection-dialog__search-input",
|
|
@@ -2680,13 +2689,13 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2680
2689
|
onClick: p
|
|
2681
2690
|
}, {
|
|
2682
2691
|
default: h(() => [...c[13] || (c[13] = [
|
|
2683
|
-
|
|
2692
|
+
be("查询", -1)
|
|
2684
2693
|
])]),
|
|
2685
2694
|
_: 1
|
|
2686
2695
|
}),
|
|
2687
2696
|
O($(Ve), { onClick: g }, {
|
|
2688
2697
|
default: h(() => [...c[14] || (c[14] = [
|
|
2689
|
-
|
|
2698
|
+
be("重置", -1)
|
|
2690
2699
|
])]),
|
|
2691
2700
|
_: 1
|
|
2692
2701
|
})
|
|
@@ -2697,14 +2706,14 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2697
2706
|
]),
|
|
2698
2707
|
_: 3
|
|
2699
2708
|
}, 8, ["model"]),
|
|
2700
|
-
b.value ? (v(), A("div",
|
|
2709
|
+
b.value ? (v(), A("div", Gl, [
|
|
2701
2710
|
Z.value ? (v(), ce($(Ve), {
|
|
2702
2711
|
key: 0,
|
|
2703
2712
|
type: "primary",
|
|
2704
2713
|
onClick: B
|
|
2705
2714
|
}, {
|
|
2706
2715
|
default: h(() => [...c[15] || (c[15] = [
|
|
2707
|
-
|
|
2716
|
+
be(" 新增 ", -1)
|
|
2708
2717
|
])]),
|
|
2709
2718
|
_: 1
|
|
2710
2719
|
})) : P("", !0),
|
|
@@ -2718,7 +2727,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2718
2727
|
}, void 0, !0)
|
|
2719
2728
|
])) : P("", !0)
|
|
2720
2729
|
])) : P("", !0),
|
|
2721
|
-
Ye((v(), ce($(
|
|
2730
|
+
Ye((v(), ce($(Ga), Qe({
|
|
2722
2731
|
ref_key: "tableRef",
|
|
2723
2732
|
ref: f,
|
|
2724
2733
|
data: I.value,
|
|
@@ -2727,18 +2736,18 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2727
2736
|
"highlight-current-row": "",
|
|
2728
2737
|
"max-height": "550px"
|
|
2729
2738
|
}, ne.value, {
|
|
2730
|
-
onSelectionChange:
|
|
2739
|
+
onSelectionChange: i,
|
|
2731
2740
|
onRowClick: Y
|
|
2732
2741
|
}), {
|
|
2733
2742
|
default: h(() => {
|
|
2734
|
-
var
|
|
2743
|
+
var o;
|
|
2735
2744
|
return [
|
|
2736
|
-
|
|
2745
|
+
U.value === "multiple" ? (v(), ce($(Ja), {
|
|
2737
2746
|
key: 0,
|
|
2738
2747
|
type: "selection",
|
|
2739
2748
|
"reserve-selection": "",
|
|
2740
2749
|
width: "42",
|
|
2741
|
-
selectable: (
|
|
2750
|
+
selectable: (o = ne.value) == null ? void 0 : o.selectable
|
|
2742
2751
|
}, null, 8, ["selectable"])) : P("", !0),
|
|
2743
2752
|
R(u.$slots, "columns", {}, void 0, !0),
|
|
2744
2753
|
R(u.$slots, "cols", {}, void 0, !0)
|
|
@@ -2748,24 +2757,24 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2748
2757
|
}, 16, ["data", "row-key"])), [
|
|
2749
2758
|
[N, E.value]
|
|
2750
2759
|
]),
|
|
2751
|
-
t.showPagination && M.value > 0 ? (v(), A("div",
|
|
2752
|
-
O($(
|
|
2760
|
+
t.showPagination && M.value > 0 ? (v(), A("div", Jl, [
|
|
2761
|
+
O($(Xa), {
|
|
2753
2762
|
"current-page": T.page,
|
|
2754
|
-
"onUpdate:currentPage": c[4] || (c[4] = (
|
|
2763
|
+
"onUpdate:currentPage": c[4] || (c[4] = (o) => T.page = o),
|
|
2755
2764
|
"page-size": T.pageSize,
|
|
2756
|
-
"onUpdate:pageSize": c[5] || (c[5] = (
|
|
2765
|
+
"onUpdate:pageSize": c[5] || (c[5] = (o) => T.pageSize = o),
|
|
2757
2766
|
total: M.value,
|
|
2758
2767
|
"page-sizes": t.pageSizes,
|
|
2759
2768
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
2760
|
-
onSizeChange:
|
|
2769
|
+
onSizeChange: C,
|
|
2761
2770
|
onCurrentChange: s
|
|
2762
2771
|
}, null, 8, ["current-page", "page-size", "total", "page-sizes"])
|
|
2763
2772
|
])) : P("", !0)
|
|
2764
2773
|
])
|
|
2765
2774
|
]),
|
|
2766
|
-
O(
|
|
2775
|
+
O(Je, {
|
|
2767
2776
|
modelValue: j.value,
|
|
2768
|
-
"onUpdate:modelValue": c[8] || (c[8] = (
|
|
2777
|
+
"onUpdate:modelValue": c[8] || (c[8] = (o) => j.value = o),
|
|
2769
2778
|
title: "粘贴数据",
|
|
2770
2779
|
layout: !1,
|
|
2771
2780
|
width: "560px"
|
|
@@ -2773,16 +2782,16 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2773
2782
|
default: h(() => [
|
|
2774
2783
|
O($(Me), {
|
|
2775
2784
|
modelValue: G.value,
|
|
2776
|
-
"onUpdate:modelValue": c[6] || (c[6] = (
|
|
2785
|
+
"onUpdate:modelValue": c[6] || (c[6] = (o) => G.value = o),
|
|
2777
2786
|
type: "textarea",
|
|
2778
2787
|
rows: 8
|
|
2779
2788
|
}, null, 8, ["modelValue"]),
|
|
2780
|
-
z("div",
|
|
2789
|
+
z("div", Xl, [
|
|
2781
2790
|
O($(Ve), {
|
|
2782
|
-
onClick: c[7] || (c[7] = (
|
|
2791
|
+
onClick: c[7] || (c[7] = (o) => j.value = !1)
|
|
2783
2792
|
}, {
|
|
2784
2793
|
default: h(() => [...c[16] || (c[16] = [
|
|
2785
|
-
|
|
2794
|
+
be("取消", -1)
|
|
2786
2795
|
])]),
|
|
2787
2796
|
_: 1
|
|
2788
2797
|
}),
|
|
@@ -2791,7 +2800,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2791
2800
|
onClick: ze
|
|
2792
2801
|
}, {
|
|
2793
2802
|
default: h(() => [...c[17] || (c[17] = [
|
|
2794
|
-
|
|
2803
|
+
be("确认", -1)
|
|
2795
2804
|
])]),
|
|
2796
2805
|
_: 1
|
|
2797
2806
|
})
|
|
@@ -2804,7 +2813,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2804
2813
|
}, 16, ["model-value", "title", "width"]);
|
|
2805
2814
|
};
|
|
2806
2815
|
}
|
|
2807
|
-
}),
|
|
2816
|
+
}), Ct = /* @__PURE__ */ Te(Yl, [["__scopeId", "data-v-31ee3945"]]), en = /* @__PURE__ */ qe({
|
|
2808
2817
|
name: "QyLegacySelectionDialog",
|
|
2809
2818
|
inheritAttrs: !1,
|
|
2810
2819
|
__name: "index",
|
|
@@ -2851,10 +2860,10 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2851
2860
|
dialogOpen: !1,
|
|
2852
2861
|
pasteData: "",
|
|
2853
2862
|
pasteDataDialog: !1
|
|
2854
|
-
}), I = F(() => e.type || []),
|
|
2863
|
+
}), I = F(() => e.type || []), Q = F(() => f.categories), _ = async (s) => {
|
|
2855
2864
|
if (!e.query) return { data: { records: [], total: 0 } };
|
|
2856
|
-
const p = await e.query(
|
|
2857
|
-
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;
|
|
2858
2867
|
};
|
|
2859
2868
|
fe(
|
|
2860
2869
|
() => e.open,
|
|
@@ -2888,7 +2897,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2888
2897
|
), fe(
|
|
2889
2898
|
() => e.select,
|
|
2890
2899
|
async () => {
|
|
2891
|
-
e.select && await
|
|
2900
|
+
e.select && await X(e.select);
|
|
2892
2901
|
},
|
|
2893
2902
|
{ deep: !0 }
|
|
2894
2903
|
), fe(
|
|
@@ -2920,27 +2929,27 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2920
2929
|
function T(s) {
|
|
2921
2930
|
f.selection = te(s), n("submit", f);
|
|
2922
2931
|
}
|
|
2923
|
-
function
|
|
2932
|
+
function U() {
|
|
2924
2933
|
n("close");
|
|
2925
2934
|
}
|
|
2926
2935
|
function ae() {
|
|
2927
2936
|
f.dialogOpen = !0, n("openDialog");
|
|
2928
2937
|
}
|
|
2929
|
-
function
|
|
2938
|
+
function J(s) {
|
|
2930
2939
|
n("changeIndexShow", s);
|
|
2931
2940
|
}
|
|
2932
|
-
async function
|
|
2941
|
+
async function X(s) {
|
|
2933
2942
|
if (!e.query || !e.searchKey || !e.mainKey) return;
|
|
2934
2943
|
const p = await e.query({
|
|
2935
2944
|
...y,
|
|
2936
2945
|
[e.searchKey]: s[e.mainKey],
|
|
2937
2946
|
category: []
|
|
2938
|
-
}),
|
|
2947
|
+
}), C = e.responseFormatter ? await e.responseFormatter(p) : p, [g] = l(C);
|
|
2939
2948
|
g && (e.selection === "multi" ? (f.selection = f.selection.filter(
|
|
2940
2949
|
(B) => B[e.mainKey] !== g[e.mainKey]
|
|
2941
2950
|
), f.selection.push(g)) : f.selection = [g]);
|
|
2942
2951
|
}
|
|
2943
|
-
function
|
|
2952
|
+
function le(s = {}) {
|
|
2944
2953
|
y.page = s.page ?? y.page, y.pageSize = s.pageSize ?? y.pageSize;
|
|
2945
2954
|
const p = {
|
|
2946
2955
|
...y,
|
|
@@ -2954,13 +2963,13 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2954
2963
|
const s = y.category;
|
|
2955
2964
|
if (Array.isArray(s)) return s;
|
|
2956
2965
|
if (!s) return [];
|
|
2957
|
-
const p =
|
|
2966
|
+
const p = ie(f.categories, s);
|
|
2958
2967
|
return p ? Z(p) : [s];
|
|
2959
2968
|
}
|
|
2960
|
-
function
|
|
2961
|
-
for (const
|
|
2962
|
-
if (
|
|
2963
|
-
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);
|
|
2964
2973
|
if (g) return g;
|
|
2965
2974
|
}
|
|
2966
2975
|
}
|
|
@@ -2973,40 +2982,40 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
2973
2982
|
if (typeof e.categoryFormatter == "function")
|
|
2974
2983
|
return e.categoryFormatter(p);
|
|
2975
2984
|
if (Array.isArray(e.categoryFormatter)) {
|
|
2976
|
-
const [
|
|
2977
|
-
return a(V(p, g),
|
|
2985
|
+
const [C, g] = e.categoryFormatter;
|
|
2986
|
+
return a(V(p, g), C, g);
|
|
2978
2987
|
}
|
|
2979
2988
|
return p;
|
|
2980
2989
|
}
|
|
2981
2990
|
function V(s, p) {
|
|
2982
|
-
const
|
|
2983
|
-
return
|
|
2984
|
-
const
|
|
2985
|
-
if (!
|
|
2991
|
+
const C = s.map((B) => ({ ...B })), g = [];
|
|
2992
|
+
return C.forEach((B) => {
|
|
2993
|
+
const re = B.parentCateCode;
|
|
2994
|
+
if (!re) {
|
|
2986
2995
|
g.push(B);
|
|
2987
2996
|
return;
|
|
2988
2997
|
}
|
|
2989
|
-
const me =
|
|
2998
|
+
const me = C.find((we) => we[p] === re);
|
|
2990
2999
|
me ? (me.children || (me.children = [])).push(B) : g.push(B);
|
|
2991
3000
|
}), g;
|
|
2992
3001
|
}
|
|
2993
|
-
function a(s, p,
|
|
3002
|
+
function a(s, p, C) {
|
|
2994
3003
|
return s.map((g) => ({
|
|
2995
3004
|
...g,
|
|
2996
3005
|
label: g[p],
|
|
2997
|
-
value: g[
|
|
2998
|
-
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
|
|
2999
3008
|
}));
|
|
3000
3009
|
}
|
|
3001
|
-
function
|
|
3010
|
+
function l(s) {
|
|
3002
3011
|
if (Array.isArray(s)) return s;
|
|
3003
3012
|
const p = s == null ? void 0 : s.data;
|
|
3004
3013
|
return Array.isArray(p) ? p : (s == null ? void 0 : s.records) || (s == null ? void 0 : s.rows) || (p == null ? void 0 : p.records) || [];
|
|
3005
3014
|
}
|
|
3006
|
-
function
|
|
3015
|
+
function L(s) {
|
|
3007
3016
|
if (Array.isArray(s)) return s.length;
|
|
3008
|
-
const p =
|
|
3009
|
-
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;
|
|
3010
3019
|
}
|
|
3011
3020
|
function te(s = []) {
|
|
3012
3021
|
return s.map((p) => ({ ...p }));
|
|
@@ -3019,23 +3028,23 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3019
3028
|
getTableData: () => f.tableData,
|
|
3020
3029
|
getSelection: () => te(f.selection)
|
|
3021
3030
|
}), (s, p) => (v(), A(Re, null, [
|
|
3022
|
-
O(
|
|
3031
|
+
O(Ct, Qe({
|
|
3023
3032
|
ref_key: "selectionDialogRef",
|
|
3024
3033
|
ref: d
|
|
3025
3034
|
}, $(H), {
|
|
3026
3035
|
modelValue: f.selection,
|
|
3027
|
-
"onUpdate:modelValue": p[3] || (p[3] = (
|
|
3036
|
+
"onUpdate:modelValue": p[3] || (p[3] = (C) => f.selection = C),
|
|
3028
3037
|
open: t.open,
|
|
3029
3038
|
title: t.title,
|
|
3030
3039
|
width: t.width,
|
|
3031
|
-
query:
|
|
3040
|
+
query: _,
|
|
3032
3041
|
"response-formatter": t.responseFormatter,
|
|
3033
3042
|
selection: t.selection,
|
|
3034
3043
|
"row-key": t.mainKey,
|
|
3035
3044
|
"label-key": t.tagName,
|
|
3036
3045
|
"search-key": t.searchKey,
|
|
3037
3046
|
"query-params": {},
|
|
3038
|
-
"category-options":
|
|
3047
|
+
"category-options": Q.value,
|
|
3039
3048
|
"type-options": I.value,
|
|
3040
3049
|
"type-select-props": t.typeSelectionProps,
|
|
3041
3050
|
"table-props": t.tableProps,
|
|
@@ -3043,7 +3052,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3043
3052
|
"show-append": t.append,
|
|
3044
3053
|
onSelectionChange: j,
|
|
3045
3054
|
onConfirm: T,
|
|
3046
|
-
onCancel:
|
|
3055
|
+
onCancel: U,
|
|
3047
3056
|
onAppend: ae,
|
|
3048
3057
|
onLoaded: G
|
|
3049
3058
|
}), {
|
|
@@ -3055,7 +3064,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3055
3064
|
query: y,
|
|
3056
3065
|
getData: M,
|
|
3057
3066
|
search: M,
|
|
3058
|
-
changeIndexShow:
|
|
3067
|
+
changeIndexShow: J
|
|
3059
3068
|
}, void 0, !0)
|
|
3060
3069
|
]),
|
|
3061
3070
|
search: h(() => [
|
|
@@ -3069,9 +3078,9 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3069
3078
|
label: "分类"
|
|
3070
3079
|
}, {
|
|
3071
3080
|
default: h(() => [
|
|
3072
|
-
O($(
|
|
3081
|
+
O($(Ya), {
|
|
3073
3082
|
modelValue: y.category,
|
|
3074
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
3083
|
+
"onUpdate:modelValue": p[0] || (p[0] = (C) => y.category = C),
|
|
3075
3084
|
class: "qy-legacy-selection-dialog__category",
|
|
3076
3085
|
data: f.categories,
|
|
3077
3086
|
clearable: "",
|
|
@@ -3090,14 +3099,14 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3090
3099
|
default: h(() => [
|
|
3091
3100
|
O($(ht), Qe({
|
|
3092
3101
|
modelValue: y.type,
|
|
3093
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
3102
|
+
"onUpdate:modelValue": p[1] || (p[1] = (C) => y.type = C),
|
|
3094
3103
|
clearable: ""
|
|
3095
3104
|
}, t.typeSelectionProps, { onChange: M }), {
|
|
3096
3105
|
default: h(() => [
|
|
3097
|
-
(v(!0), A(Re, null, et(I.value, (
|
|
3098
|
-
key:
|
|
3099
|
-
label:
|
|
3100
|
-
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
|
|
3101
3110
|
}, null, 8, ["label", "value"]))), 128))
|
|
3102
3111
|
]),
|
|
3103
3112
|
_: 1
|
|
@@ -3112,7 +3121,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3112
3121
|
default: h(() => [
|
|
3113
3122
|
O($(Me), {
|
|
3114
3123
|
modelValue: y[t.searchKey],
|
|
3115
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
3124
|
+
"onUpdate:modelValue": p[2] || (p[2] = (C) => y[t.searchKey] = C),
|
|
3116
3125
|
clearable: "",
|
|
3117
3126
|
class: "qy-legacy-selection-dialog__search-input",
|
|
3118
3127
|
onKeydown: Ee(ue(M, ["prevent"]), ["enter"])
|
|
@@ -3127,7 +3136,7 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3127
3136
|
onClick: M
|
|
3128
3137
|
}, {
|
|
3129
3138
|
default: h(() => [...p[4] || (p[4] = [
|
|
3130
|
-
|
|
3139
|
+
be("查询", -1)
|
|
3131
3140
|
])]),
|
|
3132
3141
|
_: 1
|
|
3133
3142
|
})
|
|
@@ -3157,13 +3166,13 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3157
3166
|
}, void 0, !0)
|
|
3158
3167
|
], 64));
|
|
3159
3168
|
}
|
|
3160
|
-
}),
|
|
3169
|
+
}), tn = /* @__PURE__ */ Te(en, [["__scopeId", "data-v-b54ca11b"]]), an = { class: "qy-form-section__heading" }, on = {
|
|
3161
3170
|
key: 0,
|
|
3162
3171
|
class: "qy-form-section__title"
|
|
3163
|
-
},
|
|
3172
|
+
}, ln = {
|
|
3164
3173
|
key: 0,
|
|
3165
3174
|
class: "qy-form-section__description"
|
|
3166
|
-
},
|
|
3175
|
+
}, nn = { class: "qy-form-section__actions" }, rn = /* @__PURE__ */ qe({
|
|
3167
3176
|
name: "QyFormSection",
|
|
3168
3177
|
__name: "index",
|
|
3169
3178
|
props: {
|
|
@@ -3206,15 +3215,15 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3206
3215
|
class: ke(["qy-form-section__header", t.headerClass]),
|
|
3207
3216
|
onClick: d
|
|
3208
3217
|
}, [
|
|
3209
|
-
z("div",
|
|
3218
|
+
z("div", an, [
|
|
3210
3219
|
R(y.$slots, "title", {}, () => [
|
|
3211
|
-
t.title ? (v(), A("div",
|
|
3220
|
+
t.title ? (v(), A("div", on, pe(t.title), 1)) : P("", !0)
|
|
3212
3221
|
], !0),
|
|
3213
3222
|
R(y.$slots, "description", {}, () => [
|
|
3214
|
-
t.description ? (v(), A("div",
|
|
3223
|
+
t.description ? (v(), A("div", ln, pe(t.description), 1)) : P("", !0)
|
|
3215
3224
|
], !0)
|
|
3216
3225
|
]),
|
|
3217
|
-
z("div",
|
|
3226
|
+
z("div", nn, [
|
|
3218
3227
|
R(y.$slots, "actions", {}, void 0, !0),
|
|
3219
3228
|
t.collapsible ? (v(), A("button", {
|
|
3220
3229
|
key: 0,
|
|
@@ -3239,16 +3248,16 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3239
3248
|
])
|
|
3240
3249
|
], 2));
|
|
3241
3250
|
}
|
|
3242
|
-
}),
|
|
3251
|
+
}), sn = /* @__PURE__ */ Te(rn, [["__scopeId", "data-v-8149aa01"]]), un = {
|
|
3243
3252
|
key: 0,
|
|
3244
3253
|
class: "qy-action-bar__left"
|
|
3245
|
-
},
|
|
3254
|
+
}, cn = {
|
|
3246
3255
|
key: 1,
|
|
3247
3256
|
class: "qy-action-bar__center"
|
|
3248
|
-
},
|
|
3257
|
+
}, dn = {
|
|
3249
3258
|
key: 2,
|
|
3250
3259
|
class: "qy-action-bar__right"
|
|
3251
|
-
},
|
|
3260
|
+
}, fn = /* @__PURE__ */ qe({
|
|
3252
3261
|
name: "QyActionBar",
|
|
3253
3262
|
__name: "index",
|
|
3254
3263
|
props: {
|
|
@@ -3278,143 +3287,160 @@ const lo = { class: "qy-remark-image__field" }, oo = {
|
|
|
3278
3287
|
]]),
|
|
3279
3288
|
style: Pe(W.value)
|
|
3280
3289
|
}, [
|
|
3281
|
-
e.$slots.left ? (v(), A("div",
|
|
3290
|
+
e.$slots.left ? (v(), A("div", un, [
|
|
3282
3291
|
R(e.$slots, "left", {}, void 0, !0)
|
|
3283
3292
|
])) : P("", !0),
|
|
3284
|
-
e.$slots.default ? (v(), A("div",
|
|
3293
|
+
e.$slots.default ? (v(), A("div", cn, [
|
|
3285
3294
|
R(e.$slots, "default", {}, void 0, !0)
|
|
3286
3295
|
])) : P("", !0),
|
|
3287
|
-
e.$slots.right ? (v(), A("div",
|
|
3296
|
+
e.$slots.right ? (v(), A("div", dn, [
|
|
3288
3297
|
R(e.$slots, "right", {}, void 0, !0)
|
|
3289
3298
|
])) : P("", !0)
|
|
3290
3299
|
], 6));
|
|
3291
3300
|
}
|
|
3292
|
-
}),
|
|
3293
|
-
|
|
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,
|
|
3294
3303
|
"QyTableColumnSettings"
|
|
3295
|
-
),
|
|
3296
|
-
|
|
3304
|
+
), jt = S(vo, "QyRadioGroup"), Nt = S(zl, "QyRemoteSelect"), Ht = S($t, "QySearchInput"), Zt = S(
|
|
3305
|
+
Kl,
|
|
3297
3306
|
"QyRecordQuoteSearch"
|
|
3298
|
-
),
|
|
3299
|
-
|
|
3307
|
+
), Wt = S(tt, "QySelect"), Gt = S(St, "QyTreeSelect"), Jt = S(Ct, "QySelectionDialog"), Xt = S(
|
|
3308
|
+
tn,
|
|
3300
3309
|
"QyLegacySelectionDialog"
|
|
3301
|
-
),
|
|
3302
|
-
t.component("QyDialog",
|
|
3303
|
-
},
|
|
3304
|
-
install:
|
|
3305
|
-
QyUpload:
|
|
3306
|
-
QyImage:
|
|
3307
|
-
QyImagePreview:
|
|
3308
|
-
openQyImagePreview:
|
|
3309
|
-
QyImageUpload:
|
|
3310
|
-
QyDialog:
|
|
3311
|
-
QyButton:
|
|
3312
|
-
QyDropdown:
|
|
3313
|
-
QyInput:
|
|
3314
|
-
QyInputNumber:
|
|
3315
|
-
QyMoneyInput:
|
|
3316
|
-
QyDatePicker:
|
|
3317
|
-
QyCheckbox:
|
|
3318
|
-
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,
|
|
3319
3328
|
QyRadio: Ut,
|
|
3320
3329
|
QyAutocomplete: Lt,
|
|
3321
3330
|
QyMenuActions: Kt,
|
|
3322
|
-
QyTableColumnSettings:
|
|
3323
|
-
QyRadioGroup:
|
|
3324
|
-
QyRemoteSelect:
|
|
3325
|
-
QySearchInput:
|
|
3326
|
-
QyRecordQuoteSearch:
|
|
3327
|
-
QySelect:
|
|
3328
|
-
QyTreeSelect:
|
|
3329
|
-
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,
|
|
3330
3339
|
QyLegacySelectionDialog: Xt,
|
|
3331
|
-
QyFormSection:
|
|
3332
|
-
QyActionBar:
|
|
3333
|
-
QyFilePicker:
|
|
3334
|
-
QySwitch:
|
|
3335
|
-
QyTag:
|
|
3340
|
+
QyFormSection: Yt,
|
|
3341
|
+
QyActionBar: ea,
|
|
3342
|
+
QyFilePicker: ta,
|
|
3343
|
+
QySwitch: aa,
|
|
3344
|
+
QyTag: oa,
|
|
3336
3345
|
QyBadge: la,
|
|
3337
|
-
QyCascader:
|
|
3338
|
-
QyTooltip:
|
|
3346
|
+
QyCascader: na,
|
|
3347
|
+
QyTooltip: ia,
|
|
3339
3348
|
QyPopover: ra,
|
|
3340
|
-
QySkeleton:
|
|
3341
|
-
QySkeletonItem:
|
|
3342
|
-
QyTabs:
|
|
3343
|
-
QyTabPane:
|
|
3344
|
-
QySteps:
|
|
3345
|
-
QyStep:
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
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
|
|
3360
3378
|
};
|
|
3361
3379
|
export {
|
|
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
|
-
|
|
3401
|
-
|
|
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,
|
|
3402
3428
|
Ot as i,
|
|
3403
|
-
|
|
3429
|
+
_t as j,
|
|
3404
3430
|
ga as k,
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
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
|
|
3420
3446
|
};
|