@qynpm/ui 1.0.25 → 1.0.27
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 +313 -27
- package/dist/index.cjs +10 -4
- package/dist/index.mjs +69 -42
- 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-input-number/index.cjs +1 -1
- package/dist/qy-input-number/index.mjs +3 -4
- 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-9v7CIwzO.cjs → index-B9RYNZUh.cjs} +1 -1
- package/dist/shared/{index-B7uyWUhS.mjs → index-C7V-LeFg.mjs} +1 -1
- package/dist/shared/{index-Du2IqeCI.mjs → index-CYn7TvRx.mjs} +1 -1
- package/dist/shared/index-CnZNcnTs.cjs +1 -0
- 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-DvQdcj7u.mjs → index-T9Om5Csd.mjs} +1197 -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 +272 -24
- 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-528z_q7d.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-R5B1rjXo.mjs → index-BbDWedqW.mjs} +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-BTPk2zzq.cjs → index-ceTTRCGJ.cjs} +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-BbDWedqW.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,
|
|
@@ -1736,48 +1757,48 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
1736
1757
|
onChange: K,
|
|
1737
1758
|
onClear: te,
|
|
1738
1759
|
onVisibleChange: s,
|
|
1739
|
-
onFocus:
|
|
1740
|
-
onBlur:
|
|
1760
|
+
onFocus: p,
|
|
1761
|
+
onBlur: Q
|
|
1741
1762
|
}), Ue({
|
|
1742
1763
|
default: h(() => [
|
|
1743
|
-
|
|
1764
|
+
m.$slots.default ? R(m.$slots, "default", {}, void 0, void 0, 0) : P("", !0)
|
|
1744
1765
|
]),
|
|
1745
1766
|
_: 2
|
|
1746
1767
|
}, [
|
|
1747
|
-
|
|
1768
|
+
m.$slots.prefix ? {
|
|
1748
1769
|
name: "prefix",
|
|
1749
1770
|
fn: h(() => [
|
|
1750
|
-
|
|
1771
|
+
R(m.$slots, "prefix")
|
|
1751
1772
|
]),
|
|
1752
1773
|
key: "0"
|
|
1753
1774
|
} : void 0,
|
|
1754
|
-
|
|
1775
|
+
m.$slots.empty ? {
|
|
1755
1776
|
name: "empty",
|
|
1756
1777
|
fn: h(() => [
|
|
1757
|
-
|
|
1778
|
+
R(m.$slots, "empty")
|
|
1758
1779
|
]),
|
|
1759
1780
|
key: "1"
|
|
1760
1781
|
} : void 0,
|
|
1761
|
-
|
|
1782
|
+
m.$slots.loading ? {
|
|
1762
1783
|
name: "loading",
|
|
1763
1784
|
fn: h(() => [
|
|
1764
|
-
|
|
1785
|
+
R(m.$slots, "loading")
|
|
1765
1786
|
]),
|
|
1766
1787
|
key: "2"
|
|
1767
1788
|
} : void 0,
|
|
1768
|
-
|
|
1789
|
+
m.$slots.tag ? {
|
|
1769
1790
|
name: "tag",
|
|
1770
|
-
fn: h((
|
|
1771
|
-
|
|
1791
|
+
fn: h((r) => [
|
|
1792
|
+
R(m.$slots, "tag", gt(vt(r)))
|
|
1772
1793
|
]),
|
|
1773
1794
|
key: "3"
|
|
1774
1795
|
} : void 0
|
|
1775
1796
|
]), 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
1797
|
}
|
|
1777
|
-
}),
|
|
1798
|
+
}), vo = { class: "qy-search-input__item" }, ho = ["innerHTML"], bo = {
|
|
1778
1799
|
key: 0,
|
|
1779
1800
|
class: "qy-search-input__item-description"
|
|
1780
|
-
},
|
|
1801
|
+
}, wo = /* @__PURE__ */ qe({
|
|
1781
1802
|
name: "QySearchInput",
|
|
1782
1803
|
inheritAttrs: !1,
|
|
1783
1804
|
__name: "index",
|
|
@@ -1807,129 +1828,129 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
1807
1828
|
fitInputWidth: { type: Boolean, default: !0 }
|
|
1808
1829
|
},
|
|
1809
1830
|
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 =
|
|
1831
|
+
setup(t, { expose: D, emit: W }) {
|
|
1832
|
+
const e = t, n = W, H = Be(), d = q(null), y = q(E(e.modelValue)), f = F(() => E(e.modelValue)), I = F(
|
|
1812
1833
|
() => ["qy-search-input__popper", e.popperClass].filter(Boolean).join(" ")
|
|
1813
|
-
), x = F(() => E(e.modelValue)),
|
|
1834
|
+
), x = F(() => E(e.modelValue)), U = q("");
|
|
1814
1835
|
fe(
|
|
1815
1836
|
() => e.modelValue,
|
|
1816
|
-
(
|
|
1817
|
-
|
|
1837
|
+
(r) => {
|
|
1838
|
+
y.value = E(r);
|
|
1818
1839
|
}
|
|
1819
1840
|
);
|
|
1820
|
-
function E(
|
|
1821
|
-
return
|
|
1841
|
+
function E(r) {
|
|
1842
|
+
return r == null ? "" : String(r);
|
|
1822
1843
|
}
|
|
1823
|
-
function M(
|
|
1824
|
-
return e.removeSpace ?
|
|
1844
|
+
function M(r) {
|
|
1845
|
+
return e.removeSpace ? r.replace(/\s+/g, "") : r;
|
|
1825
1846
|
}
|
|
1826
|
-
function j(
|
|
1827
|
-
return e.trimMode !== w ?
|
|
1847
|
+
function j(r, w) {
|
|
1848
|
+
return e.trimMode !== w ? r : r.trim();
|
|
1828
1849
|
}
|
|
1829
|
-
function G(
|
|
1830
|
-
return M(E(
|
|
1850
|
+
function G(r) {
|
|
1851
|
+
return M(E(r));
|
|
1831
1852
|
}
|
|
1832
|
-
function
|
|
1833
|
-
|
|
1853
|
+
function T(r) {
|
|
1854
|
+
y.value = r, n("update:modelValue", r);
|
|
1834
1855
|
}
|
|
1835
|
-
function
|
|
1856
|
+
function L(r, w = "") {
|
|
1836
1857
|
return {
|
|
1837
|
-
...
|
|
1838
|
-
label:
|
|
1839
|
-
value:
|
|
1840
|
-
description:
|
|
1858
|
+
...r,
|
|
1859
|
+
label: r.label || r.value,
|
|
1860
|
+
value: r.value || r.label,
|
|
1861
|
+
description: r.description || w
|
|
1841
1862
|
};
|
|
1842
1863
|
}
|
|
1843
|
-
function ae(
|
|
1844
|
-
return
|
|
1864
|
+
function ae(r = []) {
|
|
1865
|
+
return r.flatMap((w) => {
|
|
1845
1866
|
if (Array.isArray(w.items)) {
|
|
1846
1867
|
const ee = w;
|
|
1847
|
-
return ee.items.map((Se) =>
|
|
1868
|
+
return ee.items.map((Se) => L(Se, ee.groupLabel));
|
|
1848
1869
|
}
|
|
1849
|
-
return
|
|
1870
|
+
return L(w);
|
|
1850
1871
|
});
|
|
1851
1872
|
}
|
|
1852
|
-
function
|
|
1853
|
-
const w =
|
|
1873
|
+
function X(r) {
|
|
1874
|
+
const w = r.toLowerCase();
|
|
1854
1875
|
return (ee) => [ee.label, ee.value, ee.description].filter(Boolean).some((Se) => String(Se).toLowerCase().includes(w));
|
|
1855
1876
|
}
|
|
1856
|
-
function
|
|
1857
|
-
return
|
|
1877
|
+
function J(r) {
|
|
1878
|
+
return r ? r.length >= e.minLength : e.triggerOnFocus;
|
|
1858
1879
|
}
|
|
1859
|
-
function oe(
|
|
1860
|
-
n("suggestions-change",
|
|
1880
|
+
function oe(r) {
|
|
1881
|
+
n("suggestions-change", r), n("visible-change", r.length > 0);
|
|
1861
1882
|
}
|
|
1862
|
-
async function ne(
|
|
1863
|
-
if (!
|
|
1883
|
+
async function ne(r) {
|
|
1884
|
+
if (!J(r))
|
|
1864
1885
|
return oe([]), [];
|
|
1865
1886
|
if (e.fetchSuggestionsMethod) {
|
|
1866
|
-
const Se = await new Promise((
|
|
1867
|
-
var
|
|
1868
|
-
(
|
|
1869
|
-
|
|
1887
|
+
const Se = await new Promise(($e) => {
|
|
1888
|
+
var de;
|
|
1889
|
+
(de = e.fetchSuggestionsMethod) == null || de.call(e, r, (De) => {
|
|
1890
|
+
$e(ae(De));
|
|
1870
1891
|
});
|
|
1871
1892
|
});
|
|
1872
1893
|
return oe(Se), Se;
|
|
1873
1894
|
}
|
|
1874
1895
|
if (e.fetchSuggestions) {
|
|
1875
|
-
const Se = await e.fetchSuggestions(
|
|
1876
|
-
return oe(
|
|
1896
|
+
const Se = await e.fetchSuggestions(r), $e = ae(Array.isArray(Se) ? Se : []);
|
|
1897
|
+
return oe($e), $e;
|
|
1877
1898
|
}
|
|
1878
|
-
const w = ae(e.suggestions), ee =
|
|
1899
|
+
const w = ae(e.suggestions), ee = r ? w.filter(X(r)) : w;
|
|
1879
1900
|
return oe(ee), ee;
|
|
1880
1901
|
}
|
|
1881
|
-
async function
|
|
1882
|
-
|
|
1902
|
+
async function re(r, w) {
|
|
1903
|
+
U.value = r;
|
|
1883
1904
|
try {
|
|
1884
|
-
const ee = await ne(
|
|
1905
|
+
const ee = await ne(r);
|
|
1885
1906
|
w(ee);
|
|
1886
1907
|
} catch (ee) {
|
|
1887
1908
|
n("error", ee), oe([]), w([]);
|
|
1888
1909
|
}
|
|
1889
1910
|
}
|
|
1890
1911
|
function Z() {
|
|
1891
|
-
var
|
|
1892
|
-
|
|
1912
|
+
var r, w;
|
|
1913
|
+
U.value && ((w = (r = d.value) == null ? void 0 : r.getData) == null || w.call(r, U.value));
|
|
1893
1914
|
}
|
|
1894
|
-
function b(
|
|
1895
|
-
const w = G(
|
|
1896
|
-
|
|
1915
|
+
function b(r) {
|
|
1916
|
+
const w = G(r);
|
|
1917
|
+
T(w);
|
|
1897
1918
|
}
|
|
1898
|
-
function
|
|
1899
|
-
const w = G(
|
|
1900
|
-
|
|
1919
|
+
function V(r) {
|
|
1920
|
+
const w = G(r);
|
|
1921
|
+
y.value = w, n("input", w);
|
|
1901
1922
|
}
|
|
1902
|
-
function a(
|
|
1903
|
-
const w = j(G(
|
|
1904
|
-
w !== E(e.modelValue) &&
|
|
1923
|
+
function a(r) {
|
|
1924
|
+
const w = j(G(r), "change");
|
|
1925
|
+
w !== E(e.modelValue) && T(w), n("change", w);
|
|
1905
1926
|
}
|
|
1906
|
-
function o(
|
|
1907
|
-
n("focus",
|
|
1927
|
+
function o(r) {
|
|
1928
|
+
n("focus", r);
|
|
1908
1929
|
}
|
|
1909
|
-
function K(
|
|
1910
|
-
const w = j(
|
|
1911
|
-
w !== E(e.modelValue) &&
|
|
1930
|
+
function K(r) {
|
|
1931
|
+
const w = j(y.value, "blur");
|
|
1932
|
+
w !== E(e.modelValue) && T(w), n("blur", r), n("visible-change", !1);
|
|
1912
1933
|
}
|
|
1913
1934
|
function te() {
|
|
1914
|
-
|
|
1935
|
+
y.value = "", n("update:modelValue", ""), n("clear"), oe([]);
|
|
1915
1936
|
}
|
|
1916
|
-
function s(
|
|
1917
|
-
n("enter",
|
|
1937
|
+
function s(r) {
|
|
1938
|
+
n("enter", r), e.searchOnEnter && p();
|
|
1918
1939
|
}
|
|
1919
|
-
function
|
|
1940
|
+
function p() {
|
|
1920
1941
|
n("search", E(e.modelValue));
|
|
1921
1942
|
}
|
|
1922
|
-
function
|
|
1923
|
-
n("select",
|
|
1943
|
+
function Q(r) {
|
|
1944
|
+
n("select", r), e.searchOnSelect && n("search", r.value);
|
|
1924
1945
|
}
|
|
1925
|
-
function g(
|
|
1926
|
-
return
|
|
1946
|
+
function g(r) {
|
|
1947
|
+
return r.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1927
1948
|
}
|
|
1928
|
-
function B(
|
|
1929
|
-
return
|
|
1949
|
+
function B(r) {
|
|
1950
|
+
return r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1930
1951
|
}
|
|
1931
|
-
function
|
|
1932
|
-
const w = g(
|
|
1952
|
+
function ie(r) {
|
|
1953
|
+
const w = g(r || "");
|
|
1933
1954
|
if (!e.highlightKeyword || !f.value) return w;
|
|
1934
1955
|
const ee = B(g(f.value));
|
|
1935
1956
|
return ee ? w.replace(
|
|
@@ -1937,109 +1958,109 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
1937
1958
|
'<mark class="qy-search-input__mark">$1</mark>'
|
|
1938
1959
|
) : w;
|
|
1939
1960
|
}
|
|
1940
|
-
function
|
|
1941
|
-
var
|
|
1942
|
-
(w = (
|
|
1961
|
+
function me() {
|
|
1962
|
+
var r, w;
|
|
1963
|
+
(w = (r = d.value) == null ? void 0 : r.focus) == null || w.call(r);
|
|
1943
1964
|
}
|
|
1944
1965
|
function ge() {
|
|
1945
|
-
var
|
|
1946
|
-
(w = (
|
|
1966
|
+
var r, w;
|
|
1967
|
+
(w = (r = d.value) == null ? void 0 : r.blur) == null || w.call(r);
|
|
1947
1968
|
}
|
|
1948
1969
|
function xe() {
|
|
1949
|
-
var
|
|
1950
|
-
(ee = (w = (
|
|
1970
|
+
var r, w, ee;
|
|
1971
|
+
(ee = (w = (r = d.value) == null ? void 0 : r.inputRef) == null ? void 0 : w.select) == null || ee.call(w);
|
|
1951
1972
|
}
|
|
1952
|
-
function
|
|
1953
|
-
var
|
|
1954
|
-
(w = (
|
|
1973
|
+
function m() {
|
|
1974
|
+
var r, w;
|
|
1975
|
+
(w = (r = d.value) == null ? void 0 : r.clear) == null || w.call(r);
|
|
1955
1976
|
}
|
|
1956
1977
|
function Y() {
|
|
1957
|
-
var
|
|
1958
|
-
(w = (
|
|
1978
|
+
var r, w;
|
|
1979
|
+
(w = (r = d.value) == null ? void 0 : r.close) == null || w.call(r);
|
|
1959
1980
|
}
|
|
1960
|
-
return
|
|
1981
|
+
return D({
|
|
1961
1982
|
// 暴露搜索框常用控制方法,供弹窗打开后聚焦或失败后重试建议项。
|
|
1962
|
-
focus:
|
|
1983
|
+
focus: me,
|
|
1963
1984
|
blur: ge,
|
|
1964
1985
|
select: xe,
|
|
1965
|
-
clear:
|
|
1986
|
+
clear: m,
|
|
1966
1987
|
closePanel: Y,
|
|
1967
1988
|
retryFetch: Z
|
|
1968
|
-
}), (
|
|
1989
|
+
}), (r, w) => (v(), A("div", {
|
|
1969
1990
|
class: ke(["qy-search-input", { "is-disabled": t.disabled }])
|
|
1970
1991
|
}, [
|
|
1971
|
-
O(
|
|
1992
|
+
O($(Ua), Qe({
|
|
1972
1993
|
ref_key: "autocompleteRef",
|
|
1973
|
-
ref:
|
|
1974
|
-
},
|
|
1994
|
+
ref: d
|
|
1995
|
+
}, $(H), {
|
|
1975
1996
|
"model-value": x.value,
|
|
1976
1997
|
disabled: t.disabled,
|
|
1977
1998
|
placeholder: t.placeholder,
|
|
1978
1999
|
clearable: t.clearable,
|
|
1979
2000
|
debounce: t.debounce,
|
|
1980
|
-
"fetch-suggestions":
|
|
2001
|
+
"fetch-suggestions": re,
|
|
1981
2002
|
"trigger-on-focus": t.triggerOnFocus,
|
|
1982
2003
|
teleported: t.teleported,
|
|
1983
2004
|
"fit-input-width": t.fitInputWidth,
|
|
1984
|
-
"popper-class":
|
|
2005
|
+
"popper-class": I.value,
|
|
1985
2006
|
"append-to": t.appendTo,
|
|
1986
2007
|
"value-key": "value",
|
|
1987
2008
|
"onUpdate:modelValue": b,
|
|
1988
|
-
onInput:
|
|
2009
|
+
onInput: V,
|
|
1989
2010
|
onChange: a,
|
|
1990
2011
|
onFocus: o,
|
|
1991
2012
|
onBlur: K,
|
|
1992
2013
|
onClear: te,
|
|
1993
|
-
onSelect:
|
|
1994
|
-
onKeydown:
|
|
2014
|
+
onSelect: Q,
|
|
2015
|
+
onKeydown: Ee(s, ["enter"])
|
|
1995
2016
|
}), Ue({
|
|
1996
2017
|
default: h(({ item: ee }) => [
|
|
1997
|
-
|
|
2018
|
+
R(r.$slots, "item", {
|
|
1998
2019
|
item: ee,
|
|
1999
2020
|
keyword: f.value
|
|
2000
2021
|
}, () => [
|
|
2001
|
-
|
|
2002
|
-
|
|
2022
|
+
z("div", vo, [
|
|
2023
|
+
z("div", {
|
|
2003
2024
|
class: "qy-search-input__item-label",
|
|
2004
|
-
innerHTML:
|
|
2005
|
-
}, null, 8,
|
|
2006
|
-
ee.description ? (v(),
|
|
2025
|
+
innerHTML: ie(ee.label || ee.value || "")
|
|
2026
|
+
}, null, 8, ho),
|
|
2027
|
+
ee.description ? (v(), A("div", bo, pe(ee.description), 1)) : P("", !0)
|
|
2007
2028
|
])
|
|
2008
2029
|
], !0)
|
|
2009
2030
|
]),
|
|
2010
2031
|
_: 2
|
|
2011
2032
|
}, [
|
|
2012
|
-
|
|
2033
|
+
r.$slots.prefix ? {
|
|
2013
2034
|
name: "prefix",
|
|
2014
2035
|
fn: h(() => [
|
|
2015
|
-
|
|
2036
|
+
R(r.$slots, "prefix", {}, void 0, !0)
|
|
2016
2037
|
]),
|
|
2017
2038
|
key: "0"
|
|
2018
2039
|
} : void 0,
|
|
2019
|
-
|
|
2040
|
+
r.$slots.suffix ? {
|
|
2020
2041
|
name: "suffix",
|
|
2021
2042
|
fn: h(() => [
|
|
2022
|
-
|
|
2043
|
+
R(r.$slots, "suffix", {}, void 0, !0)
|
|
2023
2044
|
]),
|
|
2024
2045
|
key: "1"
|
|
2025
2046
|
} : void 0,
|
|
2026
|
-
|
|
2047
|
+
r.$slots.prepend ? {
|
|
2027
2048
|
name: "prepend",
|
|
2028
2049
|
fn: h(() => [
|
|
2029
|
-
|
|
2050
|
+
R(r.$slots, "prepend", {}, void 0, !0)
|
|
2030
2051
|
]),
|
|
2031
2052
|
key: "2"
|
|
2032
2053
|
} : void 0,
|
|
2033
|
-
|
|
2054
|
+
r.$slots.append || t.showButton ? {
|
|
2034
2055
|
name: "append",
|
|
2035
2056
|
fn: h(() => [
|
|
2036
|
-
|
|
2057
|
+
r.$slots.append ? R(r.$slots, "append", {}, void 0, !0, 0) : (v(), ce($(Ve), Qe({ key: 1 }, t.buttonProps, {
|
|
2037
2058
|
loading: t.loading,
|
|
2038
2059
|
disabled: t.disabled,
|
|
2039
|
-
onClick:
|
|
2060
|
+
onClick: p
|
|
2040
2061
|
}), {
|
|
2041
2062
|
default: h(() => [
|
|
2042
|
-
we(
|
|
2063
|
+
we(pe(t.buttonText), 1)
|
|
2043
2064
|
]),
|
|
2044
2065
|
_: 1
|
|
2045
2066
|
}, 16, ["loading", "disabled"]))
|
|
@@ -2049,16 +2070,16 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2049
2070
|
]), 1040, ["model-value", "disabled", "placeholder", "clearable", "debounce", "trigger-on-focus", "teleported", "fit-input-width", "popper-class", "append-to"])
|
|
2050
2071
|
], 2));
|
|
2051
2072
|
}
|
|
2052
|
-
}),
|
|
2073
|
+
}), Qt = /* @__PURE__ */ Te(wo, [["__scopeId", "data-v-cd7f5dfc"]]), So = { class: "qy-record-quote-search" }, ko = {
|
|
2053
2074
|
key: 0,
|
|
2054
2075
|
class: "qy-record-quote-search__header"
|
|
2055
|
-
},
|
|
2076
|
+
}, xo = {
|
|
2056
2077
|
key: 0,
|
|
2057
2078
|
class: "qy-record-quote-search__label"
|
|
2058
|
-
},
|
|
2079
|
+
}, Qo = {
|
|
2059
2080
|
key: 1,
|
|
2060
2081
|
class: "qy-record-quote-search__description"
|
|
2061
|
-
},
|
|
2082
|
+
}, $o = /* @__PURE__ */ qe({
|
|
2062
2083
|
name: "QyRecordQuoteSearch",
|
|
2063
2084
|
inheritAttrs: !1,
|
|
2064
2085
|
__name: "index",
|
|
@@ -2086,12 +2107,12 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2086
2107
|
trimMode: { default: "blur" }
|
|
2087
2108
|
},
|
|
2088
2109
|
emits: ["update:modelValue", "search", "clear", "normalize", "enter", "select", "error", "success"],
|
|
2089
|
-
setup(t, { expose:
|
|
2090
|
-
const e = t, n = W, H =
|
|
2110
|
+
setup(t, { expose: D, emit: W }) {
|
|
2111
|
+
const e = t, n = W, H = Be(), d = q(null), y = q(!1), f = F(() => e.statusText || ""), I = F(() => e.loading || y.value);
|
|
2091
2112
|
function x(a) {
|
|
2092
2113
|
return a == null ? "" : String(a);
|
|
2093
2114
|
}
|
|
2094
|
-
function
|
|
2115
|
+
function U(a) {
|
|
2095
2116
|
const o = x(a).trim(), K = E(o), te = K.match(/BJ\d{8}[A-Z0-9]{4}/i);
|
|
2096
2117
|
return te ? te[0] : K;
|
|
2097
2118
|
}
|
|
@@ -2099,7 +2120,7 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2099
2120
|
return x(a).replace(/\s+/g, "").trim().toUpperCase();
|
|
2100
2121
|
}
|
|
2101
2122
|
function M(a) {
|
|
2102
|
-
return e.extractMethod ? e.extractMethod(a) :
|
|
2123
|
+
return e.extractMethod ? e.extractMethod(a) : U(a);
|
|
2103
2124
|
}
|
|
2104
2125
|
function j(a) {
|
|
2105
2126
|
return e.normalizeMethod ? e.normalizeMethod(a) : E(a);
|
|
@@ -2112,76 +2133,76 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2112
2133
|
item: o
|
|
2113
2134
|
};
|
|
2114
2135
|
}
|
|
2115
|
-
function
|
|
2136
|
+
function T(a) {
|
|
2116
2137
|
n("update:modelValue", a);
|
|
2117
2138
|
}
|
|
2118
|
-
async function
|
|
2139
|
+
async function L(a) {
|
|
2119
2140
|
if (n("search", a), !!e.searchMethod) {
|
|
2120
|
-
|
|
2141
|
+
y.value = !0;
|
|
2121
2142
|
try {
|
|
2122
2143
|
const o = await e.searchMethod(a);
|
|
2123
2144
|
n("success", o);
|
|
2124
2145
|
} catch (o) {
|
|
2125
2146
|
n("error", o);
|
|
2126
2147
|
} finally {
|
|
2127
|
-
|
|
2148
|
+
y.value = !1;
|
|
2128
2149
|
}
|
|
2129
2150
|
}
|
|
2130
2151
|
}
|
|
2131
2152
|
function ae(a) {
|
|
2132
2153
|
const o = G(a);
|
|
2133
|
-
o.code !== x(e.modelValue) && n("update:modelValue", o.code),
|
|
2154
|
+
o.code !== x(e.modelValue) && n("update:modelValue", o.code), L(o);
|
|
2134
2155
|
}
|
|
2135
|
-
function
|
|
2156
|
+
function X() {
|
|
2136
2157
|
n("clear");
|
|
2137
2158
|
}
|
|
2138
|
-
function
|
|
2159
|
+
function J(a) {
|
|
2139
2160
|
n("enter", a);
|
|
2140
2161
|
}
|
|
2141
2162
|
function oe(a) {
|
|
2142
2163
|
if (n("select", a), !e.searchOnSelect) return;
|
|
2143
2164
|
const o = G(a.value, a);
|
|
2144
|
-
o.code !== x(e.modelValue) && n("update:modelValue", o.code),
|
|
2165
|
+
o.code !== x(e.modelValue) && n("update:modelValue", o.code), L(o);
|
|
2145
2166
|
}
|
|
2146
2167
|
function ne(a) {
|
|
2147
2168
|
n("error", a);
|
|
2148
2169
|
}
|
|
2149
|
-
function
|
|
2170
|
+
function re() {
|
|
2150
2171
|
var a, o;
|
|
2151
|
-
(o = (a =
|
|
2172
|
+
(o = (a = d.value) == null ? void 0 : a.focus) == null || o.call(a);
|
|
2152
2173
|
}
|
|
2153
2174
|
function Z() {
|
|
2154
2175
|
var a, o;
|
|
2155
|
-
(o = (a =
|
|
2176
|
+
(o = (a = d.value) == null ? void 0 : a.blur) == null || o.call(a);
|
|
2156
2177
|
}
|
|
2157
2178
|
function b() {
|
|
2158
2179
|
var a, o;
|
|
2159
|
-
(o = (a =
|
|
2180
|
+
(o = (a = d.value) == null ? void 0 : a.select) == null || o.call(a);
|
|
2160
2181
|
}
|
|
2161
|
-
function
|
|
2182
|
+
function V() {
|
|
2162
2183
|
var a, o;
|
|
2163
|
-
(o = (a =
|
|
2184
|
+
(o = (a = d.value) == null ? void 0 : a.clear) == null || o.call(a);
|
|
2164
2185
|
}
|
|
2165
|
-
return
|
|
2166
|
-
focus:
|
|
2186
|
+
return D({
|
|
2187
|
+
focus: re,
|
|
2167
2188
|
blur: Z,
|
|
2168
2189
|
select: b,
|
|
2169
|
-
clear:
|
|
2190
|
+
clear: V,
|
|
2170
2191
|
extractQuoteOrderCode: M,
|
|
2171
2192
|
normalizeQuoteOrderCode: j
|
|
2172
|
-
}), (a, o) => (v(),
|
|
2173
|
-
|
|
2174
|
-
t.label || t.description ? (v(),
|
|
2175
|
-
t.label ? (v(),
|
|
2176
|
-
t.description ? (v(),
|
|
2177
|
-
])) :
|
|
2193
|
+
}), (a, o) => (v(), A("div", So, [
|
|
2194
|
+
R(a.$slots, "label", {}, () => [
|
|
2195
|
+
t.label || t.description ? (v(), A("div", ko, [
|
|
2196
|
+
t.label ? (v(), A("div", xo, pe(t.label), 1)) : P("", !0),
|
|
2197
|
+
t.description ? (v(), A("div", Qo, pe(t.description), 1)) : P("", !0)
|
|
2198
|
+
])) : P("", !0)
|
|
2178
2199
|
], !0),
|
|
2179
|
-
O(
|
|
2200
|
+
O(Qt, Qe({
|
|
2180
2201
|
ref_key: "searchRef",
|
|
2181
|
-
ref:
|
|
2182
|
-
},
|
|
2202
|
+
ref: d
|
|
2203
|
+
}, $(H), {
|
|
2183
2204
|
"model-value": t.modelValue,
|
|
2184
|
-
loading:
|
|
2205
|
+
loading: I.value,
|
|
2185
2206
|
disabled: t.disabled,
|
|
2186
2207
|
placeholder: t.placeholder,
|
|
2187
2208
|
"remove-space": !0,
|
|
@@ -2193,75 +2214,75 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2193
2214
|
debounce: t.debounce,
|
|
2194
2215
|
"min-length": t.minLength,
|
|
2195
2216
|
"search-on-select": !1,
|
|
2196
|
-
"onUpdate:modelValue":
|
|
2217
|
+
"onUpdate:modelValue": T,
|
|
2197
2218
|
onSearch: ae,
|
|
2198
|
-
onClear:
|
|
2199
|
-
onEnter:
|
|
2219
|
+
onClear: X,
|
|
2220
|
+
onEnter: J,
|
|
2200
2221
|
onSelect: oe,
|
|
2201
2222
|
onError: ne
|
|
2202
2223
|
}), Ue({ _: 2 }, [
|
|
2203
2224
|
a.$slots.prefix ? {
|
|
2204
2225
|
name: "prefix",
|
|
2205
2226
|
fn: h(() => [
|
|
2206
|
-
|
|
2227
|
+
R(a.$slots, "prefix", {}, void 0, !0)
|
|
2207
2228
|
]),
|
|
2208
2229
|
key: "0"
|
|
2209
2230
|
} : void 0,
|
|
2210
2231
|
a.$slots.suffix ? {
|
|
2211
2232
|
name: "suffix",
|
|
2212
2233
|
fn: h(() => [
|
|
2213
|
-
|
|
2234
|
+
R(a.$slots, "suffix", {}, void 0, !0)
|
|
2214
2235
|
]),
|
|
2215
2236
|
key: "1"
|
|
2216
2237
|
} : void 0,
|
|
2217
2238
|
a.$slots.item ? {
|
|
2218
2239
|
name: "item",
|
|
2219
2240
|
fn: h((K) => [
|
|
2220
|
-
|
|
2241
|
+
R(a.$slots, "item", gt(vt(K)), void 0, !0)
|
|
2221
2242
|
]),
|
|
2222
2243
|
key: "2"
|
|
2223
2244
|
} : void 0,
|
|
2224
2245
|
a.$slots.empty ? {
|
|
2225
2246
|
name: "empty",
|
|
2226
2247
|
fn: h(() => [
|
|
2227
|
-
|
|
2248
|
+
R(a.$slots, "empty", {}, void 0, !0)
|
|
2228
2249
|
]),
|
|
2229
2250
|
key: "3"
|
|
2230
2251
|
} : void 0,
|
|
2231
2252
|
a.$slots.loading ? {
|
|
2232
2253
|
name: "loading",
|
|
2233
2254
|
fn: h(() => [
|
|
2234
|
-
|
|
2255
|
+
R(a.$slots, "loading", {}, void 0, !0)
|
|
2235
2256
|
]),
|
|
2236
2257
|
key: "4"
|
|
2237
2258
|
} : void 0
|
|
2238
2259
|
]), 1040, ["model-value", "loading", "disabled", "placeholder", "trim-mode", "button-text", "suggestions", "fetch-suggestions", "fetch-suggestions-method", "debounce", "min-length"]),
|
|
2239
|
-
t.showStatus && f.value ?
|
|
2260
|
+
t.showStatus && f.value ? R(a.$slots, "status", {
|
|
2240
2261
|
status: t.status,
|
|
2241
2262
|
statusText: f.value
|
|
2242
2263
|
}, () => [
|
|
2243
|
-
|
|
2264
|
+
z("div", {
|
|
2244
2265
|
class: ke(["qy-record-quote-search__status", `is-${t.status}`])
|
|
2245
|
-
},
|
|
2246
|
-
], !0, 0) :
|
|
2266
|
+
}, pe(f.value), 3)
|
|
2267
|
+
], !0, 0) : P("", !0)
|
|
2247
2268
|
]));
|
|
2248
2269
|
}
|
|
2249
|
-
}),
|
|
2270
|
+
}), Co = /* @__PURE__ */ Te($o, [["__scopeId", "data-v-3a314f64"]]), Vo = { class: "qy-selection-dialog" }, qo = { class: "qy-selection-dialog__main" }, Bo = {
|
|
2250
2271
|
key: 0,
|
|
2251
2272
|
class: "qy-selection-dialog__selected"
|
|
2252
|
-
},
|
|
2273
|
+
}, Ao = { class: "qy-selection-dialog__selected-tags" }, Io = {
|
|
2253
2274
|
key: 0,
|
|
2254
2275
|
class: "qy-selection-dialog__selected-actions"
|
|
2255
|
-
},
|
|
2276
|
+
}, To = {
|
|
2256
2277
|
key: 1,
|
|
2257
2278
|
class: "qy-selection-dialog__search-row"
|
|
2258
|
-
},
|
|
2279
|
+
}, zo = {
|
|
2259
2280
|
key: 0,
|
|
2260
2281
|
class: "qy-selection-dialog__toolbar"
|
|
2261
|
-
},
|
|
2282
|
+
}, Ro = {
|
|
2262
2283
|
key: 2,
|
|
2263
2284
|
class: "qy-selection-dialog__pagination"
|
|
2264
|
-
},
|
|
2285
|
+
}, Fo = { class: "qy-selection-dialog__paste-actions" }, Po = /* @__PURE__ */ qe({
|
|
2265
2286
|
name: "QySelectionDialog",
|
|
2266
2287
|
inheritAttrs: !1,
|
|
2267
2288
|
__name: "index",
|
|
@@ -2300,24 +2321,24 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2300
2321
|
pageSizes: { default: () => [10, 20, 50, 100] }
|
|
2301
2322
|
},
|
|
2302
2323
|
emits: ["update:modelValue", "selection-change", "confirm", "submit", "cancel", "close", "append", "loaded"],
|
|
2303
|
-
setup(t, { expose:
|
|
2304
|
-
const e = t, n = W, H =
|
|
2324
|
+
setup(t, { expose: D, emit: W }) {
|
|
2325
|
+
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
2326
|
category: [],
|
|
2306
2327
|
type: "",
|
|
2307
2328
|
page: 1,
|
|
2308
2329
|
pageSize: 10,
|
|
2309
2330
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
2310
2331
|
...e.queryParams
|
|
2311
|
-
}),
|
|
2332
|
+
}), 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
2333
|
...e.typeSelectionProps,
|
|
2313
2334
|
...e.typeSelectProps
|
|
2314
|
-
})), ne = F(() => e.tableProps || {}),
|
|
2335
|
+
})), ne = F(() => e.tableProps || {}), re = F(
|
|
2315
2336
|
() => e.showSearch || !!H["search-visible"]
|
|
2316
2337
|
), Z = F(() => e.showAppend || e.append), b = F(
|
|
2317
|
-
() => Z.value || !!
|
|
2318
|
-
),
|
|
2338
|
+
() => Z.value || !!d.toolbar || !!d.bar
|
|
2339
|
+
), V = F(() => e.fetchMethod || e.query), a = F(() => o() ? e.modelValue : e.selected);
|
|
2319
2340
|
function o() {
|
|
2320
|
-
const u = (
|
|
2341
|
+
const u = (y == null ? void 0 : y.vnode.props) || {};
|
|
2321
2342
|
return Object.prototype.hasOwnProperty.call(u, "modelValue") || Object.prototype.hasOwnProperty.call(u, "model-value") || Object.prototype.hasOwnProperty.call(u, "onUpdate:modelValue");
|
|
2322
2343
|
}
|
|
2323
2344
|
fe(
|
|
@@ -2330,10 +2351,10 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2330
2351
|
[() => e.categoryOptions, () => e.category],
|
|
2331
2352
|
(u) => {
|
|
2332
2353
|
if (Array.isArray(e.category) && e.category.length) {
|
|
2333
|
-
|
|
2354
|
+
U.value = e.category;
|
|
2334
2355
|
return;
|
|
2335
2356
|
}
|
|
2336
|
-
|
|
2357
|
+
U.value = e.categoryOptions || [];
|
|
2337
2358
|
},
|
|
2338
2359
|
{ immediate: !0 }
|
|
2339
2360
|
), fe(j, (u) => {
|
|
@@ -2345,32 +2366,32 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2345
2366
|
async function te() {
|
|
2346
2367
|
const u = e.categoryFetchMethod || (typeof e.category == "function" ? e.category : null);
|
|
2347
2368
|
if (!u) return;
|
|
2348
|
-
const
|
|
2349
|
-
|
|
2369
|
+
const c = await u();
|
|
2370
|
+
U.value = me(c);
|
|
2350
2371
|
}
|
|
2351
2372
|
async function s() {
|
|
2352
|
-
if (
|
|
2373
|
+
if (V.value) {
|
|
2353
2374
|
E.value = !0;
|
|
2354
2375
|
try {
|
|
2355
|
-
const u = await
|
|
2356
|
-
return
|
|
2376
|
+
const u = await V.value(xe()), c = e.responseFormatter ? await e.responseFormatter(u) : u, { rows: N, total: l } = ie(c);
|
|
2377
|
+
return I.value = N, M.value = l, n("loaded", N), ee(), c;
|
|
2357
2378
|
} finally {
|
|
2358
2379
|
E.value = !1;
|
|
2359
2380
|
}
|
|
2360
2381
|
}
|
|
2361
2382
|
}
|
|
2362
|
-
function
|
|
2363
|
-
return
|
|
2383
|
+
function p() {
|
|
2384
|
+
return T.page = 1, s();
|
|
2364
2385
|
}
|
|
2365
|
-
function
|
|
2366
|
-
return
|
|
2386
|
+
function Q() {
|
|
2387
|
+
return T.page = 1, s();
|
|
2367
2388
|
}
|
|
2368
2389
|
function g() {
|
|
2369
|
-
return Object.assign(
|
|
2390
|
+
return Object.assign(T, {
|
|
2370
2391
|
category: [],
|
|
2371
2392
|
type: "",
|
|
2372
2393
|
page: 1,
|
|
2373
|
-
pageSize:
|
|
2394
|
+
pageSize: T.pageSize,
|
|
2374
2395
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
2375
2396
|
...e.queryParams
|
|
2376
2397
|
}), s();
|
|
@@ -2378,156 +2399,156 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2378
2399
|
function B() {
|
|
2379
2400
|
n("append");
|
|
2380
2401
|
}
|
|
2381
|
-
function
|
|
2402
|
+
function ie(u) {
|
|
2382
2403
|
if (Array.isArray(u))
|
|
2383
2404
|
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) || (
|
|
2405
|
+
const c = u == null ? void 0 : u.data;
|
|
2406
|
+
if (Array.isArray(c))
|
|
2407
|
+
return { rows: c, total: (u == null ? void 0 : u.total) ?? c.length };
|
|
2408
|
+
const N = (u == null ? void 0 : u.records) || (u == null ? void 0 : u.rows) || (c == null ? void 0 : c.records) || [], l = (u == null ? void 0 : u.total) ?? (c == null ? void 0 : c.total) ?? N.length;
|
|
2388
2409
|
return { rows: N, total: l };
|
|
2389
2410
|
}
|
|
2390
|
-
function
|
|
2391
|
-
const
|
|
2392
|
-
if (!Array.isArray(
|
|
2411
|
+
function me(u) {
|
|
2412
|
+
const c = (u == null ? void 0 : u.data) ?? u;
|
|
2413
|
+
if (!Array.isArray(c)) return [];
|
|
2393
2414
|
if (typeof e.categoryFormatter == "function")
|
|
2394
|
-
return e.categoryFormatter(
|
|
2415
|
+
return e.categoryFormatter(c);
|
|
2395
2416
|
if (Array.isArray(e.categoryFormatter)) {
|
|
2396
2417
|
const [N, l] = e.categoryFormatter;
|
|
2397
|
-
return
|
|
2398
|
-
...
|
|
2399
|
-
label:
|
|
2400
|
-
value:
|
|
2401
|
-
children: Array.isArray(
|
|
2418
|
+
return c.map((i) => ({
|
|
2419
|
+
...i,
|
|
2420
|
+
label: i[N],
|
|
2421
|
+
value: i[l],
|
|
2422
|
+
children: Array.isArray(i.children) ? ge(i.children, N, l) : i.children
|
|
2402
2423
|
}));
|
|
2403
2424
|
}
|
|
2404
|
-
return
|
|
2425
|
+
return c;
|
|
2405
2426
|
}
|
|
2406
|
-
function ge(u,
|
|
2427
|
+
function ge(u, c, N) {
|
|
2407
2428
|
return u.map((l) => ({
|
|
2408
2429
|
...l,
|
|
2409
|
-
label: l[
|
|
2430
|
+
label: l[c],
|
|
2410
2431
|
value: l[N],
|
|
2411
|
-
children: Array.isArray(l.children) ? ge(l.children,
|
|
2432
|
+
children: Array.isArray(l.children) ? ge(l.children, c, N) : l.children
|
|
2412
2433
|
}));
|
|
2413
2434
|
}
|
|
2414
2435
|
function xe() {
|
|
2415
|
-
const u = { ...e.queryParams, ...
|
|
2416
|
-
return e.searchKey && (u[e.searchKey] = String(u[e.searchKey] || "").trim()), u.category =
|
|
2436
|
+
const u = { ...e.queryParams, ...T };
|
|
2437
|
+
return e.searchKey && (u[e.searchKey] = String(u[e.searchKey] || "").trim()), u.category = m(), u;
|
|
2417
2438
|
}
|
|
2418
|
-
function
|
|
2439
|
+
function m() {
|
|
2419
2440
|
if (Object.prototype.hasOwnProperty.call(e.queryParams, "category"))
|
|
2420
2441
|
return e.queryParams.category;
|
|
2421
|
-
const u =
|
|
2442
|
+
const u = T.category;
|
|
2422
2443
|
return Array.isArray(u) ? u : u ? [u] : [];
|
|
2423
2444
|
}
|
|
2424
2445
|
function Y(u) {
|
|
2425
|
-
var
|
|
2426
|
-
if (
|
|
2427
|
-
if (
|
|
2428
|
-
x.value = [u], (
|
|
2446
|
+
var c, N;
|
|
2447
|
+
if (L.value !== "none") {
|
|
2448
|
+
if (L.value === "single") {
|
|
2449
|
+
x.value = [u], (c = f.value) == null || c.setCurrentRow(u), Fe();
|
|
2429
2450
|
return;
|
|
2430
2451
|
}
|
|
2431
|
-
Se(u) && ((N = f.value) == null || N.toggleRowSelection(u,
|
|
2452
|
+
Se(u) && ((N = f.value) == null || N.toggleRowSelection(u, !$e(u)));
|
|
2432
2453
|
}
|
|
2433
2454
|
}
|
|
2434
|
-
function
|
|
2435
|
-
if (
|
|
2436
|
-
const
|
|
2455
|
+
function r(u) {
|
|
2456
|
+
if (L.value !== "multiple") return;
|
|
2457
|
+
const c = new Set(I.value.map(de)), N = new Set(u.map(de));
|
|
2437
2458
|
x.value = x.value.filter(
|
|
2438
|
-
(l) => !
|
|
2459
|
+
(l) => !c.has(de(l)) || N.has(de(l))
|
|
2439
2460
|
), u.forEach((l) => {
|
|
2440
|
-
|
|
2441
|
-
}),
|
|
2461
|
+
$e(l) || x.value.push(l);
|
|
2462
|
+
}), Fe();
|
|
2442
2463
|
}
|
|
2443
2464
|
function w(u) {
|
|
2444
2465
|
var N, l;
|
|
2445
2466
|
x.value = x.value.filter(
|
|
2446
|
-
(
|
|
2467
|
+
(i) => de(i) !== de(u)
|
|
2447
2468
|
);
|
|
2448
|
-
const
|
|
2449
|
-
|
|
2469
|
+
const c = I.value.find((i) => de(i) === de(u));
|
|
2470
|
+
c && (L.value === "multiple" ? (N = f.value) == null || N.toggleRowSelection(c, !1) : (l = f.value) == null || l.setCurrentRow()), Fe();
|
|
2450
2471
|
}
|
|
2451
2472
|
function ee() {
|
|
2452
|
-
|
|
2473
|
+
Oe(() => {
|
|
2453
2474
|
var u;
|
|
2454
2475
|
if (f.value) {
|
|
2455
|
-
if (
|
|
2456
|
-
const [
|
|
2457
|
-
(l) =>
|
|
2476
|
+
if (L.value === "single") {
|
|
2477
|
+
const [c] = x.value, N = I.value.find(
|
|
2478
|
+
(l) => c && de(l) === de(c)
|
|
2458
2479
|
);
|
|
2459
2480
|
(u = f.value) == null || u.setCurrentRow(N);
|
|
2460
2481
|
return;
|
|
2461
2482
|
}
|
|
2462
|
-
|
|
2483
|
+
L.value === "multiple" && I.value.forEach((c) => {
|
|
2463
2484
|
var N;
|
|
2464
|
-
(N = f.value) == null || N.toggleRowSelection(
|
|
2485
|
+
(N = f.value) == null || N.toggleRowSelection(c, $e(c));
|
|
2465
2486
|
});
|
|
2466
2487
|
}
|
|
2467
2488
|
});
|
|
2468
2489
|
}
|
|
2469
2490
|
function Se(u) {
|
|
2470
2491
|
var N;
|
|
2471
|
-
const
|
|
2472
|
-
return typeof
|
|
2492
|
+
const c = (N = ne.value) == null ? void 0 : N.selectable;
|
|
2493
|
+
return typeof c == "function" ? c(u) !== !1 : !0;
|
|
2473
2494
|
}
|
|
2474
|
-
function
|
|
2475
|
-
return x.value.some((
|
|
2495
|
+
function $e(u) {
|
|
2496
|
+
return x.value.some((c) => de(c) === de(u));
|
|
2476
2497
|
}
|
|
2477
|
-
function
|
|
2478
|
-
return
|
|
2498
|
+
function de(u) {
|
|
2499
|
+
return Le(u, ae.value);
|
|
2479
2500
|
}
|
|
2480
|
-
function
|
|
2481
|
-
return
|
|
2501
|
+
function De(u) {
|
|
2502
|
+
return Le(u, X.value) ?? de(u);
|
|
2482
2503
|
}
|
|
2483
|
-
function
|
|
2484
|
-
if (!(!u || !
|
|
2485
|
-
return
|
|
2504
|
+
function Le(u, c) {
|
|
2505
|
+
if (!(!u || !c))
|
|
2506
|
+
return c.split(".").reduce((N, l) => N == null ? void 0 : N[l], u);
|
|
2486
2507
|
}
|
|
2487
|
-
function
|
|
2508
|
+
function Fe() {
|
|
2488
2509
|
const u = Ae(x.value);
|
|
2489
2510
|
n("selection-change", u);
|
|
2490
2511
|
}
|
|
2491
|
-
function
|
|
2512
|
+
function je() {
|
|
2492
2513
|
const u = Ae(x.value);
|
|
2493
|
-
n("update:modelValue", u), n("confirm", u), n("submit", { selection: u, rows: u, query: { ...
|
|
2514
|
+
n("update:modelValue", u), n("confirm", u), n("submit", { selection: u, rows: u, query: { ...T } });
|
|
2494
2515
|
}
|
|
2495
|
-
function
|
|
2516
|
+
function Ke() {
|
|
2496
2517
|
x.value = Ae(a.value), n("cancel"), n("close");
|
|
2497
2518
|
}
|
|
2498
|
-
async function
|
|
2499
|
-
var
|
|
2519
|
+
async function Ne() {
|
|
2520
|
+
var c;
|
|
2500
2521
|
const u = JSON.stringify(x.value);
|
|
2501
|
-
await ((
|
|
2522
|
+
await ((c = navigator.clipboard) == null ? void 0 : c.writeText(u)), be.success("复制成功");
|
|
2502
2523
|
}
|
|
2503
|
-
function
|
|
2524
|
+
function ze() {
|
|
2504
2525
|
try {
|
|
2505
2526
|
const u = JSON.parse(G.value);
|
|
2506
2527
|
if (!Array.isArray(u)) {
|
|
2507
2528
|
be.error("粘贴内容需要是数组");
|
|
2508
2529
|
return;
|
|
2509
2530
|
}
|
|
2510
|
-
u.forEach((
|
|
2511
|
-
|
|
2512
|
-
}), j.value = !1,
|
|
2531
|
+
u.forEach((c) => {
|
|
2532
|
+
$e(c) || x.value.push(c);
|
|
2533
|
+
}), j.value = !1, Fe(), ee();
|
|
2513
2534
|
} catch (u) {
|
|
2514
2535
|
be.error(`粘贴错误: ${(u == null ? void 0 : u.message) || "内容格式错误"}`);
|
|
2515
2536
|
}
|
|
2516
2537
|
}
|
|
2517
2538
|
function Ae(u = []) {
|
|
2518
|
-
return u.map((
|
|
2539
|
+
return u.map((c) => ({ ...c }));
|
|
2519
2540
|
}
|
|
2520
|
-
return
|
|
2521
|
-
search:
|
|
2541
|
+
return D({
|
|
2542
|
+
search: p,
|
|
2522
2543
|
handleSearch: s,
|
|
2523
|
-
handleQuerySearch:
|
|
2544
|
+
handleQuerySearch: p,
|
|
2524
2545
|
resetSearch: g,
|
|
2525
2546
|
getTableRef: () => f.value,
|
|
2526
|
-
getTableData: () =>
|
|
2547
|
+
getTableData: () => I.value,
|
|
2527
2548
|
getSelection: () => Ae(x.value)
|
|
2528
|
-
}), (u,
|
|
2529
|
-
const N =
|
|
2530
|
-
return v(),
|
|
2549
|
+
}), (u, c) => {
|
|
2550
|
+
const N = Aa;
|
|
2551
|
+
return v(), ce(Xe, Qe($(H), {
|
|
2531
2552
|
"model-value": t.open,
|
|
2532
2553
|
title: t.title,
|
|
2533
2554
|
width: t.width,
|
|
@@ -2536,134 +2557,134 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2536
2557
|
"align-center": "",
|
|
2537
2558
|
"append-to-body": "",
|
|
2538
2559
|
onOpened: K,
|
|
2539
|
-
onConfirm:
|
|
2540
|
-
onCancel:
|
|
2560
|
+
onConfirm: je,
|
|
2561
|
+
onCancel: Ke
|
|
2541
2562
|
}), {
|
|
2542
2563
|
default: h(() => [
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
t.showSelected ? (v(),
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
(v(!0),
|
|
2550
|
-
key:
|
|
2564
|
+
z("div", Vo, [
|
|
2565
|
+
R(u.$slots, "side", {}, void 0, !0),
|
|
2566
|
+
z("div", qo, [
|
|
2567
|
+
t.showSelected ? (v(), A("div", Bo, [
|
|
2568
|
+
c[12] || (c[12] = z("span", { class: "qy-selection-dialog__selected-label" }, "已选项", -1)),
|
|
2569
|
+
z("div", Ao, [
|
|
2570
|
+
(v(!0), A(Re, null, et(x.value, (l) => (v(), ce(We, {
|
|
2571
|
+
key: de(l),
|
|
2551
2572
|
closable: "",
|
|
2552
2573
|
class: "qy-selection-dialog__selected-tag",
|
|
2553
|
-
onClose: (
|
|
2574
|
+
onClose: (i) => w(l)
|
|
2554
2575
|
}, {
|
|
2555
2576
|
default: h(() => [
|
|
2556
|
-
we(
|
|
2577
|
+
we(pe(De(l)), 1)
|
|
2557
2578
|
]),
|
|
2558
2579
|
_: 2
|
|
2559
2580
|
}, 1032, ["onClose"]))), 128)),
|
|
2560
|
-
x.value.length ?
|
|
2581
|
+
x.value.length ? P("", !0) : (v(), ce(We, {
|
|
2561
2582
|
key: 0,
|
|
2562
2583
|
tone: "info"
|
|
2563
2584
|
}, {
|
|
2564
|
-
default: h(() => [...
|
|
2585
|
+
default: h(() => [...c[9] || (c[9] = [
|
|
2565
2586
|
we("无", -1)
|
|
2566
2587
|
])]),
|
|
2567
2588
|
_: 1
|
|
2568
2589
|
}))
|
|
2569
2590
|
]),
|
|
2570
|
-
t.showCopyPaste ? (v(),
|
|
2571
|
-
O(
|
|
2591
|
+
t.showCopyPaste ? (v(), A("div", Io, [
|
|
2592
|
+
O($(Ve), {
|
|
2572
2593
|
size: "small",
|
|
2573
|
-
onClick:
|
|
2594
|
+
onClick: Ne
|
|
2574
2595
|
}, {
|
|
2575
|
-
default: h(() => [...
|
|
2596
|
+
default: h(() => [...c[10] || (c[10] = [
|
|
2576
2597
|
we("复制", -1)
|
|
2577
2598
|
])]),
|
|
2578
2599
|
_: 1
|
|
2579
2600
|
}),
|
|
2580
|
-
O(
|
|
2601
|
+
O($(Ve), {
|
|
2581
2602
|
size: "small",
|
|
2582
|
-
onClick:
|
|
2603
|
+
onClick: c[0] || (c[0] = (l) => j.value = !0)
|
|
2583
2604
|
}, {
|
|
2584
|
-
default: h(() => [...
|
|
2605
|
+
default: h(() => [...c[11] || (c[11] = [
|
|
2585
2606
|
we("粘贴", -1)
|
|
2586
2607
|
])]),
|
|
2587
2608
|
_: 1
|
|
2588
2609
|
})
|
|
2589
|
-
])) :
|
|
2590
|
-
])) :
|
|
2591
|
-
|
|
2592
|
-
O(
|
|
2610
|
+
])) : P("", !0)
|
|
2611
|
+
])) : P("", !0),
|
|
2612
|
+
re.value ? (v(), A("div", To, [
|
|
2613
|
+
O($(wt), {
|
|
2593
2614
|
class: "qy-selection-dialog__search",
|
|
2594
2615
|
inline: "",
|
|
2595
|
-
model:
|
|
2616
|
+
model: T
|
|
2596
2617
|
}, {
|
|
2597
2618
|
default: h(() => [
|
|
2598
|
-
|
|
2599
|
-
query:
|
|
2600
|
-
search:
|
|
2619
|
+
R(u.$slots, "search", {
|
|
2620
|
+
query: T,
|
|
2621
|
+
search: p,
|
|
2601
2622
|
reset: g
|
|
2602
2623
|
}, () => [
|
|
2603
|
-
|
|
2624
|
+
U.value.length ? (v(), ce($(Ie), {
|
|
2604
2625
|
key: 0,
|
|
2605
2626
|
label: "分类"
|
|
2606
2627
|
}, {
|
|
2607
2628
|
default: h(() => [
|
|
2608
2629
|
O(St, {
|
|
2609
|
-
modelValue:
|
|
2610
|
-
"onUpdate:modelValue":
|
|
2630
|
+
modelValue: T.category,
|
|
2631
|
+
"onUpdate:modelValue": c[1] || (c[1] = (l) => T.category = l),
|
|
2611
2632
|
class: "qy-selection-dialog__category",
|
|
2612
|
-
options:
|
|
2633
|
+
options: U.value,
|
|
2613
2634
|
clearable: "",
|
|
2614
2635
|
filterable: "",
|
|
2615
2636
|
"check-strictly": "",
|
|
2616
2637
|
"render-after-expand": !1,
|
|
2617
|
-
onChange:
|
|
2638
|
+
onChange: p
|
|
2618
2639
|
}, null, 8, ["modelValue", "options"])
|
|
2619
2640
|
]),
|
|
2620
2641
|
_: 1
|
|
2621
|
-
})) :
|
|
2622
|
-
|
|
2642
|
+
})) : P("", !0),
|
|
2643
|
+
J.value.length ? (v(), ce($(Ie), {
|
|
2623
2644
|
key: 1,
|
|
2624
2645
|
label: "类型"
|
|
2625
2646
|
}, {
|
|
2626
2647
|
default: h(() => [
|
|
2627
|
-
O(tt,
|
|
2628
|
-
modelValue:
|
|
2629
|
-
"onUpdate:modelValue":
|
|
2648
|
+
O(tt, Qe({
|
|
2649
|
+
modelValue: T.type,
|
|
2650
|
+
"onUpdate:modelValue": c[2] || (c[2] = (l) => T.type = l),
|
|
2630
2651
|
class: "qy-selection-dialog__type",
|
|
2631
|
-
options:
|
|
2652
|
+
options: J.value,
|
|
2632
2653
|
placeholder: "请选择类型",
|
|
2633
2654
|
clearable: ""
|
|
2634
|
-
}, oe.value, { onChange:
|
|
2655
|
+
}, oe.value, { onChange: p }), null, 16, ["modelValue", "options"])
|
|
2635
2656
|
]),
|
|
2636
2657
|
_: 1
|
|
2637
|
-
})) :
|
|
2638
|
-
t.searchKey ? (v(),
|
|
2658
|
+
})) : P("", !0),
|
|
2659
|
+
t.searchKey ? (v(), ce($(Ie), {
|
|
2639
2660
|
key: 2,
|
|
2640
2661
|
label: "搜索"
|
|
2641
2662
|
}, {
|
|
2642
2663
|
default: h(() => [
|
|
2643
|
-
O(
|
|
2644
|
-
modelValue:
|
|
2645
|
-
"onUpdate:modelValue":
|
|
2664
|
+
O($(Me), {
|
|
2665
|
+
modelValue: T[t.searchKey],
|
|
2666
|
+
"onUpdate:modelValue": c[3] || (c[3] = (l) => T[t.searchKey] = l),
|
|
2646
2667
|
clearable: "",
|
|
2647
2668
|
placeholder: "请输入",
|
|
2648
2669
|
class: "qy-selection-dialog__search-input",
|
|
2649
|
-
onKeydown:
|
|
2670
|
+
onKeydown: Ee(ue(p, ["prevent"]), ["enter"])
|
|
2650
2671
|
}, null, 8, ["modelValue", "onKeydown"])
|
|
2651
2672
|
]),
|
|
2652
2673
|
_: 1
|
|
2653
|
-
})) :
|
|
2654
|
-
O(
|
|
2674
|
+
})) : P("", !0),
|
|
2675
|
+
O($(Ie), null, {
|
|
2655
2676
|
default: h(() => [
|
|
2656
|
-
O(
|
|
2677
|
+
O($(Ve), {
|
|
2657
2678
|
type: "primary",
|
|
2658
|
-
onClick:
|
|
2679
|
+
onClick: p
|
|
2659
2680
|
}, {
|
|
2660
|
-
default: h(() => [...
|
|
2681
|
+
default: h(() => [...c[13] || (c[13] = [
|
|
2661
2682
|
we("查询", -1)
|
|
2662
2683
|
])]),
|
|
2663
2684
|
_: 1
|
|
2664
2685
|
}),
|
|
2665
|
-
O(
|
|
2666
|
-
default: h(() => [...
|
|
2686
|
+
O($(Ve), { onClick: g }, {
|
|
2687
|
+
default: h(() => [...c[14] || (c[14] = [
|
|
2667
2688
|
we("重置", -1)
|
|
2668
2689
|
])]),
|
|
2669
2690
|
_: 1
|
|
@@ -2675,100 +2696,100 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2675
2696
|
]),
|
|
2676
2697
|
_: 3
|
|
2677
2698
|
}, 8, ["model"]),
|
|
2678
|
-
b.value ? (v(),
|
|
2679
|
-
Z.value ? (v(),
|
|
2699
|
+
b.value ? (v(), A("div", zo, [
|
|
2700
|
+
Z.value ? (v(), ce($(Ve), {
|
|
2680
2701
|
key: 0,
|
|
2681
2702
|
type: "primary",
|
|
2682
2703
|
onClick: B
|
|
2683
2704
|
}, {
|
|
2684
|
-
default: h(() => [...
|
|
2705
|
+
default: h(() => [...c[15] || (c[15] = [
|
|
2685
2706
|
we(" 新增 ", -1)
|
|
2686
2707
|
])]),
|
|
2687
2708
|
_: 1
|
|
2688
|
-
})) :
|
|
2689
|
-
|
|
2690
|
-
query:
|
|
2691
|
-
search:
|
|
2709
|
+
})) : P("", !0),
|
|
2710
|
+
R(u.$slots, "toolbar", {
|
|
2711
|
+
query: T,
|
|
2712
|
+
search: p
|
|
2692
2713
|
}, void 0, !0),
|
|
2693
|
-
|
|
2694
|
-
query:
|
|
2695
|
-
search:
|
|
2714
|
+
R(u.$slots, "bar", {
|
|
2715
|
+
query: T,
|
|
2716
|
+
search: p
|
|
2696
2717
|
}, void 0, !0)
|
|
2697
|
-
])) :
|
|
2698
|
-
])) :
|
|
2699
|
-
Ye((v(),
|
|
2718
|
+
])) : P("", !0)
|
|
2719
|
+
])) : P("", !0),
|
|
2720
|
+
Ye((v(), ce($(La), Qe({
|
|
2700
2721
|
ref_key: "tableRef",
|
|
2701
2722
|
ref: f,
|
|
2702
|
-
data:
|
|
2723
|
+
data: I.value,
|
|
2703
2724
|
"row-key": ae.value,
|
|
2704
2725
|
border: "",
|
|
2705
2726
|
"highlight-current-row": "",
|
|
2706
2727
|
"max-height": "550px"
|
|
2707
2728
|
}, ne.value, {
|
|
2708
|
-
onSelectionChange:
|
|
2729
|
+
onSelectionChange: r,
|
|
2709
2730
|
onRowClick: Y
|
|
2710
2731
|
}), {
|
|
2711
2732
|
default: h(() => {
|
|
2712
2733
|
var l;
|
|
2713
2734
|
return [
|
|
2714
|
-
|
|
2735
|
+
L.value === "multiple" ? (v(), ce($(Ka), {
|
|
2715
2736
|
key: 0,
|
|
2716
2737
|
type: "selection",
|
|
2717
2738
|
"reserve-selection": "",
|
|
2718
2739
|
width: "42",
|
|
2719
2740
|
selectable: (l = ne.value) == null ? void 0 : l.selectable
|
|
2720
|
-
}, null, 8, ["selectable"])) :
|
|
2721
|
-
|
|
2722
|
-
|
|
2741
|
+
}, null, 8, ["selectable"])) : P("", !0),
|
|
2742
|
+
R(u.$slots, "columns", {}, void 0, !0),
|
|
2743
|
+
R(u.$slots, "cols", {}, void 0, !0)
|
|
2723
2744
|
];
|
|
2724
2745
|
}),
|
|
2725
2746
|
_: 3
|
|
2726
2747
|
}, 16, ["data", "row-key"])), [
|
|
2727
2748
|
[N, E.value]
|
|
2728
2749
|
]),
|
|
2729
|
-
t.showPagination && M.value > 0 ? (v(),
|
|
2730
|
-
O(
|
|
2731
|
-
"current-page":
|
|
2732
|
-
"onUpdate:currentPage":
|
|
2733
|
-
"page-size":
|
|
2734
|
-
"onUpdate:pageSize":
|
|
2750
|
+
t.showPagination && M.value > 0 ? (v(), A("div", Ro, [
|
|
2751
|
+
O($(_a), {
|
|
2752
|
+
"current-page": T.page,
|
|
2753
|
+
"onUpdate:currentPage": c[4] || (c[4] = (l) => T.page = l),
|
|
2754
|
+
"page-size": T.pageSize,
|
|
2755
|
+
"onUpdate:pageSize": c[5] || (c[5] = (l) => T.pageSize = l),
|
|
2735
2756
|
total: M.value,
|
|
2736
2757
|
"page-sizes": t.pageSizes,
|
|
2737
2758
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
2738
|
-
onSizeChange:
|
|
2759
|
+
onSizeChange: Q,
|
|
2739
2760
|
onCurrentChange: s
|
|
2740
2761
|
}, null, 8, ["current-page", "page-size", "total", "page-sizes"])
|
|
2741
|
-
])) :
|
|
2762
|
+
])) : P("", !0)
|
|
2742
2763
|
])
|
|
2743
2764
|
]),
|
|
2744
|
-
O(
|
|
2765
|
+
O(Xe, {
|
|
2745
2766
|
modelValue: j.value,
|
|
2746
|
-
"onUpdate:modelValue":
|
|
2767
|
+
"onUpdate:modelValue": c[8] || (c[8] = (l) => j.value = l),
|
|
2747
2768
|
title: "粘贴数据",
|
|
2748
2769
|
layout: !1,
|
|
2749
2770
|
width: "560px"
|
|
2750
2771
|
}, {
|
|
2751
2772
|
default: h(() => [
|
|
2752
|
-
O(
|
|
2773
|
+
O($(Me), {
|
|
2753
2774
|
modelValue: G.value,
|
|
2754
|
-
"onUpdate:modelValue":
|
|
2775
|
+
"onUpdate:modelValue": c[6] || (c[6] = (l) => G.value = l),
|
|
2755
2776
|
type: "textarea",
|
|
2756
2777
|
rows: 8
|
|
2757
2778
|
}, null, 8, ["modelValue"]),
|
|
2758
|
-
|
|
2759
|
-
O(
|
|
2760
|
-
onClick:
|
|
2779
|
+
z("div", Fo, [
|
|
2780
|
+
O($(Ve), {
|
|
2781
|
+
onClick: c[7] || (c[7] = (l) => j.value = !1)
|
|
2761
2782
|
}, {
|
|
2762
|
-
default: h(() => [...
|
|
2783
|
+
default: h(() => [...c[16] || (c[16] = [
|
|
2763
2784
|
we("取消", -1)
|
|
2764
2785
|
])]),
|
|
2765
2786
|
_: 1
|
|
2766
2787
|
}),
|
|
2767
|
-
O(
|
|
2788
|
+
O($(Ve), {
|
|
2768
2789
|
type: "primary",
|
|
2769
|
-
onClick:
|
|
2790
|
+
onClick: ze
|
|
2770
2791
|
}, {
|
|
2771
|
-
default: h(() => [...
|
|
2792
|
+
default: h(() => [...c[17] || (c[17] = [
|
|
2772
2793
|
we("确认", -1)
|
|
2773
2794
|
])]),
|
|
2774
2795
|
_: 1
|
|
@@ -2782,7 +2803,7 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2782
2803
|
}, 16, ["model-value", "title", "width"]);
|
|
2783
2804
|
};
|
|
2784
2805
|
}
|
|
2785
|
-
}),
|
|
2806
|
+
}), $t = /* @__PURE__ */ Te(Po, [["__scopeId", "data-v-31ee3945"]]), Do = /* @__PURE__ */ qe({
|
|
2786
2807
|
name: "QyLegacySelectionDialog",
|
|
2787
2808
|
inheritAttrs: !1,
|
|
2788
2809
|
__name: "index",
|
|
@@ -2808,8 +2829,8 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2808
2829
|
select: { default: null }
|
|
2809
2830
|
},
|
|
2810
2831
|
emits: ["close", "submit", "openDialog", "changeIndexShow"],
|
|
2811
|
-
setup(t, { expose:
|
|
2812
|
-
const e = t, n = W, H =
|
|
2832
|
+
setup(t, { expose: D, emit: W }) {
|
|
2833
|
+
const e = t, n = W, H = Be(), d = q(null), y = Ze({
|
|
2813
2834
|
category: [],
|
|
2814
2835
|
code: "",
|
|
2815
2836
|
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
@@ -2817,7 +2838,7 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2817
2838
|
pageSize: 10,
|
|
2818
2839
|
type: "",
|
|
2819
2840
|
...e.queryParams
|
|
2820
|
-
}), f =
|
|
2841
|
+
}), f = Ze({
|
|
2821
2842
|
total: 0,
|
|
2822
2843
|
tableData: [],
|
|
2823
2844
|
open: !1,
|
|
@@ -2829,10 +2850,10 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2829
2850
|
dialogOpen: !1,
|
|
2830
2851
|
pasteData: "",
|
|
2831
2852
|
pasteDataDialog: !1
|
|
2832
|
-
}),
|
|
2853
|
+
}), I = F(() => e.type || []), x = F(() => f.categories), U = async (s) => {
|
|
2833
2854
|
if (!e.query) return { data: { records: [], total: 0 } };
|
|
2834
|
-
const
|
|
2835
|
-
return f.total = K(
|
|
2855
|
+
const p = await e.query(oe(s)), Q = e.responseFormatter ? await e.responseFormatter(p) : p;
|
|
2856
|
+
return f.total = K(Q), Q;
|
|
2836
2857
|
};
|
|
2837
2858
|
fe(
|
|
2838
2859
|
() => e.open,
|
|
@@ -2841,7 +2862,7 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2841
2862
|
},
|
|
2842
2863
|
{ immediate: !0 }
|
|
2843
2864
|
), fe(
|
|
2844
|
-
|
|
2865
|
+
I,
|
|
2845
2866
|
(s) => {
|
|
2846
2867
|
f.types = [...s];
|
|
2847
2868
|
},
|
|
@@ -2855,7 +2876,7 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2855
2876
|
), fe(
|
|
2856
2877
|
() => e.queryParams,
|
|
2857
2878
|
() => {
|
|
2858
|
-
Object.assign(
|
|
2879
|
+
Object.assign(y, e.queryParams);
|
|
2859
2880
|
},
|
|
2860
2881
|
{ deep: !0 }
|
|
2861
2882
|
), fe(
|
|
@@ -2866,7 +2887,7 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2866
2887
|
), fe(
|
|
2867
2888
|
() => e.select,
|
|
2868
2889
|
async () => {
|
|
2869
|
-
e.select && await
|
|
2890
|
+
e.select && await J(e.select);
|
|
2870
2891
|
},
|
|
2871
2892
|
{ deep: !0 }
|
|
2872
2893
|
), fe(
|
|
@@ -2886,59 +2907,59 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2886
2907
|
}
|
|
2887
2908
|
async function M() {
|
|
2888
2909
|
var s;
|
|
2889
|
-
return await
|
|
2910
|
+
return await Oe(), (s = d.value) == null ? void 0 : s.handleQuerySearch();
|
|
2890
2911
|
}
|
|
2891
2912
|
function j(s) {
|
|
2892
2913
|
f.selection = te(s);
|
|
2893
2914
|
}
|
|
2894
2915
|
function G(s) {
|
|
2895
|
-
var
|
|
2896
|
-
f.tableData = s, f.tableRef = (
|
|
2916
|
+
var p;
|
|
2917
|
+
f.tableData = s, f.tableRef = (p = d.value) == null ? void 0 : p.getTableRef();
|
|
2897
2918
|
}
|
|
2898
|
-
function
|
|
2919
|
+
function T(s) {
|
|
2899
2920
|
f.selection = te(s), n("submit", f);
|
|
2900
2921
|
}
|
|
2901
|
-
function
|
|
2922
|
+
function L() {
|
|
2902
2923
|
n("close");
|
|
2903
2924
|
}
|
|
2904
2925
|
function ae() {
|
|
2905
2926
|
f.dialogOpen = !0, n("openDialog");
|
|
2906
2927
|
}
|
|
2907
|
-
function
|
|
2928
|
+
function X(s) {
|
|
2908
2929
|
n("changeIndexShow", s);
|
|
2909
2930
|
}
|
|
2910
|
-
async function
|
|
2931
|
+
async function J(s) {
|
|
2911
2932
|
if (!e.query || !e.searchKey || !e.mainKey) return;
|
|
2912
|
-
const
|
|
2913
|
-
...
|
|
2933
|
+
const p = await e.query({
|
|
2934
|
+
...y,
|
|
2914
2935
|
[e.searchKey]: s[e.mainKey],
|
|
2915
2936
|
category: []
|
|
2916
|
-
}),
|
|
2937
|
+
}), Q = e.responseFormatter ? await e.responseFormatter(p) : p, [g] = o(Q);
|
|
2917
2938
|
g && (e.selection === "multi" ? (f.selection = f.selection.filter(
|
|
2918
2939
|
(B) => B[e.mainKey] !== g[e.mainKey]
|
|
2919
2940
|
), f.selection.push(g)) : f.selection = [g]);
|
|
2920
2941
|
}
|
|
2921
2942
|
function oe(s = {}) {
|
|
2922
|
-
|
|
2923
|
-
const
|
|
2924
|
-
...
|
|
2943
|
+
y.page = s.page ?? y.page, y.pageSize = s.pageSize ?? y.pageSize;
|
|
2944
|
+
const p = {
|
|
2945
|
+
...y,
|
|
2925
2946
|
category: ne()
|
|
2926
2947
|
};
|
|
2927
|
-
return e.searchKey && (
|
|
2948
|
+
return e.searchKey && (p[e.searchKey] = String(p[e.searchKey] || "").trim()), p;
|
|
2928
2949
|
}
|
|
2929
2950
|
function ne() {
|
|
2930
2951
|
if (e.queryParams.category)
|
|
2931
2952
|
return e.queryParams.category;
|
|
2932
|
-
const s =
|
|
2953
|
+
const s = y.category;
|
|
2933
2954
|
if (Array.isArray(s)) return s;
|
|
2934
2955
|
if (!s) return [];
|
|
2935
|
-
const
|
|
2936
|
-
return
|
|
2956
|
+
const p = re(f.categories, s);
|
|
2957
|
+
return p ? Z(p) : [s];
|
|
2937
2958
|
}
|
|
2938
|
-
function
|
|
2939
|
-
for (const
|
|
2940
|
-
if (
|
|
2941
|
-
const g =
|
|
2959
|
+
function re(s, p) {
|
|
2960
|
+
for (const Q of s || []) {
|
|
2961
|
+
if (Q.value === p) return Q;
|
|
2962
|
+
const g = re(Q.children || [], p);
|
|
2942
2963
|
if (g) return g;
|
|
2943
2964
|
}
|
|
2944
2965
|
}
|
|
@@ -2946,67 +2967,67 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
2946
2967
|
return [s.value, ...(s.children || []).flatMap(Z)];
|
|
2947
2968
|
}
|
|
2948
2969
|
function b(s) {
|
|
2949
|
-
const
|
|
2950
|
-
if (!Array.isArray(
|
|
2970
|
+
const p = (s == null ? void 0 : s.data) ?? s;
|
|
2971
|
+
if (!Array.isArray(p)) return [];
|
|
2951
2972
|
if (typeof e.categoryFormatter == "function")
|
|
2952
|
-
return e.categoryFormatter(
|
|
2973
|
+
return e.categoryFormatter(p);
|
|
2953
2974
|
if (Array.isArray(e.categoryFormatter)) {
|
|
2954
|
-
const [
|
|
2955
|
-
return a(
|
|
2975
|
+
const [Q, g] = e.categoryFormatter;
|
|
2976
|
+
return a(V(p, g), Q, g);
|
|
2956
2977
|
}
|
|
2957
|
-
return
|
|
2978
|
+
return p;
|
|
2958
2979
|
}
|
|
2959
|
-
function
|
|
2960
|
-
const
|
|
2961
|
-
return
|
|
2962
|
-
const
|
|
2963
|
-
if (!
|
|
2980
|
+
function V(s, p) {
|
|
2981
|
+
const Q = s.map((B) => ({ ...B })), g = [];
|
|
2982
|
+
return Q.forEach((B) => {
|
|
2983
|
+
const ie = B.parentCateCode;
|
|
2984
|
+
if (!ie) {
|
|
2964
2985
|
g.push(B);
|
|
2965
2986
|
return;
|
|
2966
2987
|
}
|
|
2967
|
-
const
|
|
2968
|
-
|
|
2988
|
+
const me = Q.find((ge) => ge[p] === ie);
|
|
2989
|
+
me ? (me.children || (me.children = [])).push(B) : g.push(B);
|
|
2969
2990
|
}), g;
|
|
2970
2991
|
}
|
|
2971
|
-
function a(s,
|
|
2992
|
+
function a(s, p, Q) {
|
|
2972
2993
|
return s.map((g) => ({
|
|
2973
2994
|
...g,
|
|
2974
|
-
label: g[
|
|
2975
|
-
value: g[
|
|
2976
|
-
children: Array.isArray(g.children) ? a(g.children,
|
|
2995
|
+
label: g[p],
|
|
2996
|
+
value: g[Q],
|
|
2997
|
+
children: Array.isArray(g.children) ? a(g.children, p, Q) : g.children
|
|
2977
2998
|
}));
|
|
2978
2999
|
}
|
|
2979
3000
|
function o(s) {
|
|
2980
3001
|
if (Array.isArray(s)) return s;
|
|
2981
|
-
const
|
|
2982
|
-
return Array.isArray(
|
|
3002
|
+
const p = s == null ? void 0 : s.data;
|
|
3003
|
+
return Array.isArray(p) ? p : (s == null ? void 0 : s.records) || (s == null ? void 0 : s.rows) || (p == null ? void 0 : p.records) || [];
|
|
2983
3004
|
}
|
|
2984
3005
|
function K(s) {
|
|
2985
3006
|
if (Array.isArray(s)) return s.length;
|
|
2986
|
-
const
|
|
2987
|
-
return (s == null ? void 0 : s.total) ?? (Array.isArray(
|
|
3007
|
+
const p = o(s), Q = s == null ? void 0 : s.data;
|
|
3008
|
+
return (s == null ? void 0 : s.total) ?? (Array.isArray(Q) ? Q.length : Q == null ? void 0 : Q.total) ?? p.length;
|
|
2988
3009
|
}
|
|
2989
3010
|
function te(s = []) {
|
|
2990
|
-
return s.map((
|
|
3011
|
+
return s.map((p) => ({ ...p }));
|
|
2991
3012
|
}
|
|
2992
|
-
return
|
|
3013
|
+
return D({
|
|
2993
3014
|
search: M,
|
|
2994
3015
|
handleSearch: M,
|
|
2995
3016
|
handleConditionChange: M,
|
|
2996
3017
|
getTableRef: () => f.tableRef,
|
|
2997
3018
|
getTableData: () => f.tableData,
|
|
2998
3019
|
getSelection: () => te(f.selection)
|
|
2999
|
-
}), (s,
|
|
3000
|
-
O(
|
|
3020
|
+
}), (s, p) => (v(), A(Re, null, [
|
|
3021
|
+
O($t, Qe({
|
|
3001
3022
|
ref_key: "selectionDialogRef",
|
|
3002
|
-
ref:
|
|
3003
|
-
},
|
|
3023
|
+
ref: d
|
|
3024
|
+
}, $(H), {
|
|
3004
3025
|
modelValue: f.selection,
|
|
3005
|
-
"onUpdate:modelValue":
|
|
3026
|
+
"onUpdate:modelValue": p[3] || (p[3] = (Q) => f.selection = Q),
|
|
3006
3027
|
open: t.open,
|
|
3007
3028
|
title: t.title,
|
|
3008
3029
|
width: t.width,
|
|
3009
|
-
query:
|
|
3030
|
+
query: U,
|
|
3010
3031
|
"response-formatter": t.responseFormatter,
|
|
3011
3032
|
selection: t.selection,
|
|
3012
3033
|
"row-key": t.mainKey,
|
|
@@ -3014,42 +3035,42 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
3014
3035
|
"search-key": t.searchKey,
|
|
3015
3036
|
"query-params": {},
|
|
3016
3037
|
"category-options": x.value,
|
|
3017
|
-
"type-options":
|
|
3038
|
+
"type-options": I.value,
|
|
3018
3039
|
"type-select-props": t.typeSelectionProps,
|
|
3019
3040
|
"table-props": t.tableProps,
|
|
3020
3041
|
"show-copy-paste": !0,
|
|
3021
3042
|
"show-append": t.append,
|
|
3022
3043
|
onSelectionChange: j,
|
|
3023
|
-
onConfirm:
|
|
3024
|
-
onCancel:
|
|
3044
|
+
onConfirm: T,
|
|
3045
|
+
onCancel: L,
|
|
3025
3046
|
onAppend: ae,
|
|
3026
3047
|
onLoaded: G
|
|
3027
3048
|
}), {
|
|
3028
3049
|
side: h(() => [
|
|
3029
|
-
|
|
3050
|
+
R(s.$slots, "side", {
|
|
3030
3051
|
state: f,
|
|
3031
3052
|
cate: f.categories,
|
|
3032
|
-
form:
|
|
3033
|
-
query:
|
|
3053
|
+
form: y,
|
|
3054
|
+
query: y,
|
|
3034
3055
|
getData: M,
|
|
3035
3056
|
search: M,
|
|
3036
|
-
changeIndexShow:
|
|
3057
|
+
changeIndexShow: X
|
|
3037
3058
|
}, void 0, !0)
|
|
3038
3059
|
]),
|
|
3039
3060
|
search: h(() => [
|
|
3040
|
-
O(
|
|
3061
|
+
O($(wt), {
|
|
3041
3062
|
inline: "",
|
|
3042
|
-
model:
|
|
3063
|
+
model: y
|
|
3043
3064
|
}, {
|
|
3044
3065
|
default: h(() => [
|
|
3045
|
-
f.categories.length ? (v(),
|
|
3066
|
+
f.categories.length ? (v(), ce($(Ie), {
|
|
3046
3067
|
key: 0,
|
|
3047
3068
|
label: "分类"
|
|
3048
3069
|
}, {
|
|
3049
3070
|
default: h(() => [
|
|
3050
|
-
O(
|
|
3051
|
-
modelValue:
|
|
3052
|
-
"onUpdate:modelValue":
|
|
3071
|
+
O($(Ea), {
|
|
3072
|
+
modelValue: y.category,
|
|
3073
|
+
"onUpdate:modelValue": p[0] || (p[0] = (Q) => y.category = Q),
|
|
3053
3074
|
class: "qy-legacy-selection-dialog__category",
|
|
3054
3075
|
data: f.categories,
|
|
3055
3076
|
clearable: "",
|
|
@@ -3060,51 +3081,51 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
3060
3081
|
}, null, 8, ["modelValue", "data"])
|
|
3061
3082
|
]),
|
|
3062
3083
|
_: 1
|
|
3063
|
-
})) :
|
|
3064
|
-
|
|
3084
|
+
})) : P("", !0),
|
|
3085
|
+
I.value.length ? (v(), ce($(Ie), {
|
|
3065
3086
|
key: 1,
|
|
3066
3087
|
label: "类型"
|
|
3067
3088
|
}, {
|
|
3068
3089
|
default: h(() => [
|
|
3069
|
-
O(
|
|
3070
|
-
modelValue:
|
|
3071
|
-
"onUpdate:modelValue":
|
|
3090
|
+
O($(ht), Qe({
|
|
3091
|
+
modelValue: y.type,
|
|
3092
|
+
"onUpdate:modelValue": p[1] || (p[1] = (Q) => y.type = Q),
|
|
3072
3093
|
clearable: ""
|
|
3073
3094
|
}, t.typeSelectionProps, { onChange: M }), {
|
|
3074
3095
|
default: h(() => [
|
|
3075
|
-
(v(!0),
|
|
3076
|
-
key:
|
|
3077
|
-
label:
|
|
3078
|
-
value:
|
|
3096
|
+
(v(!0), A(Re, null, et(I.value, (Q) => (v(), ce($(bt), {
|
|
3097
|
+
key: Q.value,
|
|
3098
|
+
label: Q.label,
|
|
3099
|
+
value: Q.value
|
|
3079
3100
|
}, null, 8, ["label", "value"]))), 128))
|
|
3080
3101
|
]),
|
|
3081
3102
|
_: 1
|
|
3082
3103
|
}, 16, ["modelValue"])
|
|
3083
3104
|
]),
|
|
3084
3105
|
_: 1
|
|
3085
|
-
})) :
|
|
3086
|
-
t.searchKey ? (v(),
|
|
3106
|
+
})) : P("", !0),
|
|
3107
|
+
t.searchKey ? (v(), ce($(Ie), {
|
|
3087
3108
|
key: 2,
|
|
3088
3109
|
label: "搜索"
|
|
3089
3110
|
}, {
|
|
3090
3111
|
default: h(() => [
|
|
3091
|
-
O(
|
|
3092
|
-
modelValue:
|
|
3093
|
-
"onUpdate:modelValue":
|
|
3112
|
+
O($(Me), {
|
|
3113
|
+
modelValue: y[t.searchKey],
|
|
3114
|
+
"onUpdate:modelValue": p[2] || (p[2] = (Q) => y[t.searchKey] = Q),
|
|
3094
3115
|
clearable: "",
|
|
3095
3116
|
class: "qy-legacy-selection-dialog__search-input",
|
|
3096
|
-
onKeydown:
|
|
3117
|
+
onKeydown: Ee(ue(M, ["prevent"]), ["enter"])
|
|
3097
3118
|
}, null, 8, ["modelValue", "onKeydown"])
|
|
3098
3119
|
]),
|
|
3099
3120
|
_: 1
|
|
3100
|
-
})) :
|
|
3101
|
-
O(
|
|
3121
|
+
})) : P("", !0),
|
|
3122
|
+
O($(Ie), null, {
|
|
3102
3123
|
default: h(() => [
|
|
3103
|
-
O(
|
|
3124
|
+
O($(Ve), {
|
|
3104
3125
|
type: "primary",
|
|
3105
3126
|
onClick: M
|
|
3106
3127
|
}, {
|
|
3107
|
-
default: h(() => [...
|
|
3128
|
+
default: h(() => [...p[4] || (p[4] = [
|
|
3108
3129
|
we("查询", -1)
|
|
3109
3130
|
])]),
|
|
3110
3131
|
_: 1
|
|
@@ -3117,31 +3138,31 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
3117
3138
|
}, 8, ["model"])
|
|
3118
3139
|
]),
|
|
3119
3140
|
toolbar: h(() => [
|
|
3120
|
-
|
|
3121
|
-
query:
|
|
3141
|
+
R(s.$slots, "bar", {
|
|
3142
|
+
query: y,
|
|
3122
3143
|
search: M
|
|
3123
3144
|
}, void 0, !0)
|
|
3124
3145
|
]),
|
|
3125
3146
|
columns: h(() => [
|
|
3126
|
-
|
|
3127
|
-
|
|
3147
|
+
R(s.$slots, "cols", {}, void 0, !0),
|
|
3148
|
+
R(s.$slots, "columns", {}, void 0, !0)
|
|
3128
3149
|
]),
|
|
3129
3150
|
_: 3
|
|
3130
3151
|
}, 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
|
-
|
|
3152
|
+
R(s.$slots, "dialog", {
|
|
3132
3153
|
state: f,
|
|
3133
|
-
form:
|
|
3154
|
+
form: y,
|
|
3134
3155
|
getData: M
|
|
3135
3156
|
}, void 0, !0)
|
|
3136
3157
|
], 64));
|
|
3137
3158
|
}
|
|
3138
|
-
}),
|
|
3159
|
+
}), Mo = /* @__PURE__ */ Te(Do, [["__scopeId", "data-v-b54ca11b"]]), Oo = { class: "qy-form-section__heading" }, Uo = {
|
|
3139
3160
|
key: 0,
|
|
3140
3161
|
class: "qy-form-section__title"
|
|
3141
|
-
},
|
|
3162
|
+
}, Lo = {
|
|
3142
3163
|
key: 0,
|
|
3143
3164
|
class: "qy-form-section__description"
|
|
3144
|
-
},
|
|
3165
|
+
}, Ko = { class: "qy-form-section__actions" }, _o = /* @__PURE__ */ qe({
|
|
3145
3166
|
name: "QyFormSection",
|
|
3146
3167
|
__name: "index",
|
|
3147
3168
|
props: {
|
|
@@ -3157,21 +3178,21 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
3157
3178
|
headerClass: { default: "" }
|
|
3158
3179
|
},
|
|
3159
3180
|
emits: ["toggle"],
|
|
3160
|
-
setup(t, { emit:
|
|
3161
|
-
const W = t, e =
|
|
3181
|
+
setup(t, { emit: D }) {
|
|
3182
|
+
const W = t, e = D, n = q(W.defaultExpanded);
|
|
3162
3183
|
fe(
|
|
3163
3184
|
() => W.defaultExpanded,
|
|
3164
|
-
(
|
|
3165
|
-
n.value =
|
|
3185
|
+
(y) => {
|
|
3186
|
+
n.value = y;
|
|
3166
3187
|
}
|
|
3167
3188
|
);
|
|
3168
3189
|
function H() {
|
|
3169
3190
|
W.collapsible && (n.value = !n.value, e("toggle", n.value));
|
|
3170
3191
|
}
|
|
3171
|
-
function
|
|
3192
|
+
function d() {
|
|
3172
3193
|
W.collapsible && H();
|
|
3173
3194
|
}
|
|
3174
|
-
return (
|
|
3195
|
+
return (y, f) => (v(), A("section", {
|
|
3175
3196
|
class: ke(["qy-form-section", [
|
|
3176
3197
|
`is-bg-${t.background}`,
|
|
3177
3198
|
{
|
|
@@ -3180,53 +3201,53 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
3180
3201
|
}
|
|
3181
3202
|
]])
|
|
3182
3203
|
}, [
|
|
3183
|
-
|
|
3204
|
+
z("header", {
|
|
3184
3205
|
class: ke(["qy-form-section__header", t.headerClass]),
|
|
3185
|
-
onClick:
|
|
3206
|
+
onClick: d
|
|
3186
3207
|
}, [
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
t.title ? (v(),
|
|
3208
|
+
z("div", Oo, [
|
|
3209
|
+
R(y.$slots, "title", {}, () => [
|
|
3210
|
+
t.title ? (v(), A("div", Uo, pe(t.title), 1)) : P("", !0)
|
|
3190
3211
|
], !0),
|
|
3191
|
-
|
|
3192
|
-
t.description ? (v(),
|
|
3212
|
+
R(y.$slots, "description", {}, () => [
|
|
3213
|
+
t.description ? (v(), A("div", Lo, pe(t.description), 1)) : P("", !0)
|
|
3193
3214
|
], !0)
|
|
3194
3215
|
]),
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
t.collapsible ? (v(),
|
|
3216
|
+
z("div", Ko, [
|
|
3217
|
+
R(y.$slots, "actions", {}, void 0, !0),
|
|
3218
|
+
t.collapsible ? (v(), A("button", {
|
|
3198
3219
|
key: 0,
|
|
3199
3220
|
type: "button",
|
|
3200
3221
|
class: "qy-form-section__toggle",
|
|
3201
3222
|
onClick: ue(H, ["stop"])
|
|
3202
|
-
},
|
|
3223
|
+
}, pe(n.value ? "收起" : "展开"), 1)) : P("", !0)
|
|
3203
3224
|
])
|
|
3204
3225
|
], 2),
|
|
3205
|
-
Ye(
|
|
3226
|
+
Ye(z("div", {
|
|
3206
3227
|
class: ke(["qy-form-section__body", t.bodyClass])
|
|
3207
3228
|
}, [
|
|
3208
|
-
|
|
3209
|
-
t.tip ? (v(),
|
|
3229
|
+
R(y.$slots, "tip", {}, () => [
|
|
3230
|
+
t.tip ? (v(), A("div", {
|
|
3210
3231
|
key: 0,
|
|
3211
3232
|
class: ke(["qy-form-section__tip", `is-${t.tipType}`])
|
|
3212
|
-
},
|
|
3233
|
+
}, pe(t.tip), 3)) : P("", !0)
|
|
3213
3234
|
], !0),
|
|
3214
|
-
|
|
3235
|
+
R(y.$slots, "default", {}, void 0, !0)
|
|
3215
3236
|
], 2), [
|
|
3216
|
-
[
|
|
3237
|
+
[pt, n.value]
|
|
3217
3238
|
])
|
|
3218
3239
|
], 2));
|
|
3219
3240
|
}
|
|
3220
|
-
}),
|
|
3241
|
+
}), Eo = /* @__PURE__ */ Te(_o, [["__scopeId", "data-v-8149aa01"]]), jo = {
|
|
3221
3242
|
key: 0,
|
|
3222
3243
|
class: "qy-action-bar__left"
|
|
3223
|
-
},
|
|
3244
|
+
}, No = {
|
|
3224
3245
|
key: 1,
|
|
3225
3246
|
class: "qy-action-bar__center"
|
|
3226
|
-
},
|
|
3247
|
+
}, Ho = {
|
|
3227
3248
|
key: 2,
|
|
3228
3249
|
class: "qy-action-bar__right"
|
|
3229
|
-
},
|
|
3250
|
+
}, Zo = /* @__PURE__ */ qe({
|
|
3230
3251
|
name: "QyActionBar",
|
|
3231
3252
|
__name: "index",
|
|
3232
3253
|
props: {
|
|
@@ -3239,12 +3260,12 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
3239
3260
|
background: { default: "#fff" }
|
|
3240
3261
|
},
|
|
3241
3262
|
setup(t) {
|
|
3242
|
-
const
|
|
3263
|
+
const D = t, W = F(() => ({
|
|
3243
3264
|
// offsetBottom 只负责业务偏移,安全区补偿由 CSS padding 处理。
|
|
3244
|
-
bottom: `${
|
|
3245
|
-
background:
|
|
3265
|
+
bottom: `${D.offsetBottom}px`,
|
|
3266
|
+
background: D.background
|
|
3246
3267
|
}));
|
|
3247
|
-
return (e, n) => (v(),
|
|
3268
|
+
return (e, n) => (v(), A("div", {
|
|
3248
3269
|
class: ke(["qy-action-bar", [
|
|
3249
3270
|
`is-justify-${t.justify}`,
|
|
3250
3271
|
{
|
|
@@ -3256,101 +3277,143 @@ const yl = { class: "qy-remark-image__field" }, gl = {
|
|
|
3256
3277
|
]]),
|
|
3257
3278
|
style: Pe(W.value)
|
|
3258
3279
|
}, [
|
|
3259
|
-
e.$slots.left ? (v(),
|
|
3260
|
-
|
|
3261
|
-
])) :
|
|
3262
|
-
e.$slots.default ? (v(),
|
|
3263
|
-
|
|
3264
|
-
])) :
|
|
3265
|
-
e.$slots.right ? (v(),
|
|
3266
|
-
|
|
3267
|
-
])) :
|
|
3280
|
+
e.$slots.left ? (v(), A("div", jo, [
|
|
3281
|
+
R(e.$slots, "left", {}, void 0, !0)
|
|
3282
|
+
])) : P("", !0),
|
|
3283
|
+
e.$slots.default ? (v(), A("div", No, [
|
|
3284
|
+
R(e.$slots, "default", {}, void 0, !0)
|
|
3285
|
+
])) : P("", !0),
|
|
3286
|
+
e.$slots.right ? (v(), A("div", Ho, [
|
|
3287
|
+
R(e.$slots, "right", {}, void 0, !0)
|
|
3288
|
+
])) : P("", !0)
|
|
3268
3289
|
], 6));
|
|
3269
3290
|
}
|
|
3270
|
-
}),
|
|
3271
|
-
|
|
3291
|
+
}), 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(
|
|
3292
|
+
rl,
|
|
3272
3293
|
"QyTableColumnSettings"
|
|
3273
|
-
),
|
|
3274
|
-
|
|
3294
|
+
), Et = C(il, "QyRadioGroup"), jt = C(go, "QyRemoteSelect"), Nt = C(Qt, "QySearchInput"), Ht = C(
|
|
3295
|
+
Co,
|
|
3275
3296
|
"QyRecordQuoteSearch"
|
|
3276
|
-
),
|
|
3277
|
-
|
|
3297
|
+
), Zt = C(tt, "QySelect"), Wt = C(St, "QyTreeSelect"), Gt = C($t, "QySelectionDialog"), Xt = C(
|
|
3298
|
+
Mo,
|
|
3278
3299
|
"QyLegacySelectionDialog"
|
|
3279
|
-
),
|
|
3280
|
-
t.component("QyDialog", At), t.component("QyUpload",
|
|
3281
|
-
},
|
|
3282
|
-
install:
|
|
3283
|
-
QyUpload:
|
|
3284
|
-
QyImage:
|
|
3285
|
-
QyImagePreview:
|
|
3286
|
-
openQyImagePreview:
|
|
3287
|
-
QyImageUpload:
|
|
3300
|
+
), 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) => {
|
|
3301
|
+
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);
|
|
3302
|
+
}, Wn = {
|
|
3303
|
+
install: Go,
|
|
3304
|
+
QyUpload: Ct,
|
|
3305
|
+
QyImage: Vt,
|
|
3306
|
+
QyImagePreview: qt,
|
|
3307
|
+
openQyImagePreview: zl,
|
|
3308
|
+
QyImageUpload: Bt,
|
|
3288
3309
|
QyDialog: At,
|
|
3289
|
-
QyButton:
|
|
3290
|
-
QyDropdown:
|
|
3291
|
-
QyInput:
|
|
3292
|
-
QyInputNumber:
|
|
3310
|
+
QyButton: Tt,
|
|
3311
|
+
QyDropdown: zt,
|
|
3312
|
+
QyInput: Rt,
|
|
3313
|
+
QyInputNumber: Ft,
|
|
3293
3314
|
QyMoneyInput: Pt,
|
|
3294
|
-
QyDatePicker:
|
|
3295
|
-
QyCheckbox:
|
|
3296
|
-
QyCheckboxGroup:
|
|
3315
|
+
QyDatePicker: Dt,
|
|
3316
|
+
QyCheckbox: Mt,
|
|
3317
|
+
QyCheckboxGroup: Ot,
|
|
3297
3318
|
QyRadio: Ut,
|
|
3298
|
-
QyAutocomplete:
|
|
3299
|
-
QyMenuActions:
|
|
3300
|
-
QyTableColumnSettings:
|
|
3301
|
-
QyRadioGroup:
|
|
3302
|
-
QyRemoteSelect:
|
|
3303
|
-
QySearchInput:
|
|
3304
|
-
QyRecordQuoteSearch:
|
|
3305
|
-
QySelect:
|
|
3319
|
+
QyAutocomplete: Lt,
|
|
3320
|
+
QyMenuActions: Kt,
|
|
3321
|
+
QyTableColumnSettings: _t,
|
|
3322
|
+
QyRadioGroup: Et,
|
|
3323
|
+
QyRemoteSelect: jt,
|
|
3324
|
+
QySearchInput: Nt,
|
|
3325
|
+
QyRecordQuoteSearch: Ht,
|
|
3326
|
+
QySelect: Zt,
|
|
3306
3327
|
QyTreeSelect: Wt,
|
|
3307
3328
|
QySelectionDialog: Gt,
|
|
3308
|
-
QyLegacySelectionDialog:
|
|
3309
|
-
QyFormSection:
|
|
3329
|
+
QyLegacySelectionDialog: Xt,
|
|
3330
|
+
QyFormSection: Jt,
|
|
3310
3331
|
QyActionBar: Yt,
|
|
3311
3332
|
QyFilePicker: ea,
|
|
3312
3333
|
QySwitch: ta,
|
|
3313
3334
|
QyTag: aa,
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3335
|
+
QyBadge: la,
|
|
3336
|
+
QyCascader: oa,
|
|
3337
|
+
QyTooltip: na,
|
|
3338
|
+
QyPopover: ra,
|
|
3339
|
+
QySkeleton: ia,
|
|
3340
|
+
QySkeletonItem: sa,
|
|
3341
|
+
QyTabs: ua,
|
|
3342
|
+
QyTabPane: ca,
|
|
3343
|
+
QySteps: da,
|
|
3344
|
+
QyStep: fa,
|
|
3345
|
+
QyDescriptions: ma,
|
|
3346
|
+
QyDescriptionsItem: ya,
|
|
3347
|
+
QyCollapse: pa,
|
|
3348
|
+
QyCollapseItem: ga,
|
|
3349
|
+
QyLink: va,
|
|
3350
|
+
QyDivider: ha,
|
|
3351
|
+
QyEmpty: ba,
|
|
3352
|
+
QyAlert: wa,
|
|
3353
|
+
QyCard: Sa,
|
|
3354
|
+
QyScrollbar: ka,
|
|
3355
|
+
QyProgress: xa,
|
|
3356
|
+
QyAvatar: Qa,
|
|
3357
|
+
QyTree: $a,
|
|
3358
|
+
QyRemarkImage: It
|
|
3317
3359
|
};
|
|
3318
3360
|
export {
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3361
|
+
Ct as $,
|
|
3362
|
+
va as A,
|
|
3363
|
+
Kt as B,
|
|
3364
|
+
Pt as C,
|
|
3365
|
+
ra as D,
|
|
3366
|
+
xa as E,
|
|
3367
|
+
Ut as F,
|
|
3368
|
+
Et as G,
|
|
3369
|
+
Ht as H,
|
|
3370
|
+
It as I,
|
|
3371
|
+
jt as J,
|
|
3372
|
+
ka as K,
|
|
3373
|
+
Nt as L,
|
|
3374
|
+
Zt as M,
|
|
3375
|
+
Gt as N,
|
|
3376
|
+
ia as O,
|
|
3377
|
+
sa as P,
|
|
3329
3378
|
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
|
-
|
|
3379
|
+
fa as R,
|
|
3380
|
+
da as S,
|
|
3381
|
+
ta as T,
|
|
3382
|
+
ca as U,
|
|
3383
|
+
_t as V,
|
|
3384
|
+
ua as W,
|
|
3385
|
+
aa as X,
|
|
3386
|
+
na as Y,
|
|
3387
|
+
$a as Z,
|
|
3388
|
+
Wt as _,
|
|
3389
|
+
wa as a,
|
|
3390
|
+
Wn as a0,
|
|
3391
|
+
ao as a1,
|
|
3392
|
+
st as a2,
|
|
3393
|
+
ut as a3,
|
|
3394
|
+
Lt as b,
|
|
3395
|
+
Qa as c,
|
|
3396
|
+
la as d,
|
|
3397
|
+
Tt as e,
|
|
3398
|
+
Sa as f,
|
|
3399
|
+
oa as g,
|
|
3400
|
+
Mt as h,
|
|
3401
|
+
Ot as i,
|
|
3402
|
+
pa as j,
|
|
3403
|
+
ga as k,
|
|
3404
|
+
Dt as l,
|
|
3405
|
+
ma as m,
|
|
3406
|
+
ya as n,
|
|
3407
|
+
At as o,
|
|
3408
|
+
ha as p,
|
|
3409
|
+
zt as q,
|
|
3410
|
+
ba as r,
|
|
3411
|
+
ea as s,
|
|
3412
|
+
Jt as t,
|
|
3413
|
+
Vt as u,
|
|
3414
|
+
qt as v,
|
|
3415
|
+
Bt as w,
|
|
3416
|
+
Rt as x,
|
|
3417
|
+
Ft as y,
|
|
3418
|
+
Xt as z
|
|
3356
3419
|
};
|