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