@web-utils/form-ui 1.0.0-beta72 → 1.0.0-beta74
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/address-input/index.mjs +1 -1
- package/affix/index.d.ts +0 -2
- package/affix/index.mjs +2 -3
- package/capsule-tab/index.mjs +1 -1
- package/card/index.mjs +15 -16
- package/chunks/-fXBgN9b2.mjs +37 -0
- package/chunks/{-UHCmZBh.mjs → -yfgKY3g.mjs} +1 -1
- package/chunks/{Ciy3EJGG2.mjs → -zgWD713.mjs} +44 -45
- package/chunks/{qFn9SqfB2.mjs → 7_9hAeqb.mjs} +72 -73
- package/chunks/{CidE_6Q52.mjs → 8A7LSgb4.mjs} +26 -27
- package/chunks/B0BOjeph2.mjs +108 -0
- package/chunks/BE4V5Vf5.mjs +133 -0
- package/chunks/{Diidem-9.mjs → BGJjAw5E.mjs} +1 -1
- package/chunks/{BJNI7n9Z.mjs → BH7VEktl.mjs} +19 -19
- package/chunks/{BrJzSp9f.mjs → BI6kCG2j2.mjs} +2 -2
- package/chunks/BctSGDgW2.mjs +29 -0
- package/chunks/BhIWiH5R.mjs +661 -0
- package/chunks/BhzlH7Az.mjs +90 -0
- package/chunks/{DWjZMJ1e2.mjs → Bj0kgDOA.mjs} +132 -133
- package/chunks/{DmEOzzaP2.mjs → BrelfRGo2.mjs} +14 -14
- package/chunks/{X6BItEt1.mjs → BsqIRxSS.mjs} +6 -7
- package/chunks/{Bnm0osro.mjs → Byy1rvPO.mjs} +13 -16
- package/chunks/{iPHgzcZ0.mjs → C6mb7Nru2.mjs} +4 -4
- package/chunks/{Bhkk9TmJ2.mjs → CFoSvMJ-2.mjs} +1 -1
- package/chunks/{Vrr45MGv.mjs → CO3taG7t2.mjs} +1 -1
- package/chunks/{QAHALDuF2.mjs → CWBRpkHy.mjs} +138 -139
- package/chunks/Ccxbv7uz2.mjs +34 -0
- package/chunks/Ce4tNNzg2.mjs +63 -0
- package/chunks/{SEQG09ut.mjs → CelJ2L8A2.mjs} +2 -2
- package/chunks/CjYOitzM2.mjs +31 -0
- package/chunks/Cknuquqx.mjs +32 -0
- package/chunks/ClVh1Lek.mjs +130 -0
- package/chunks/CwyebsNL2.mjs +39 -0
- package/chunks/{CJl5ZiUq2.mjs → D4Pd8rZi.mjs} +28 -30
- package/chunks/D6YM84Pf2.mjs +29 -0
- package/chunks/{DlROUHPJ2.mjs → DTq5QLoT.mjs} +43 -43
- package/chunks/{5oaTzHT-2.mjs → DVMfVn-M.mjs} +14 -13
- package/chunks/DVdQHb_v.mjs +50 -0
- package/chunks/{YS7hFnUB2.mjs → Daa7nl7U.mjs} +19 -19
- package/chunks/{D6TSUCGL.mjs → Dh_BQpvC2.mjs} +2 -2
- package/chunks/DizOY5i8.mjs +69 -0
- package/chunks/{Czi7_tAe.mjs → DjaV6_cg2.mjs} +2 -2
- package/chunks/{CKWgRCN52.mjs → Dm3gQGoV2.mjs} +2 -2
- package/chunks/DqW9QtF3.mjs +68 -0
- package/chunks/{CKbOqPFm2.mjs → DqWJCka8.mjs} +9 -9
- package/chunks/{CIerTjpq2.mjs → DrWUdRj32.mjs} +2 -2
- package/chunks/{BrSZZNRc.mjs → DucSg7Mt.mjs} +70 -72
- package/chunks/Dv7YRB2U2.mjs +25 -0
- package/chunks/DyLQsqWJ.mjs +61 -0
- package/chunks/HsHwYW1a.mjs +99 -0
- package/chunks/KDVLIvaS.mjs +30 -0
- package/chunks/{BHwRv4F0.mjs → Lkg7bYLD2.mjs} +73 -74
- package/chunks/OBTStTaa.mjs +179 -0
- package/chunks/{DSnICEQN.mjs → Opn85Hlx2.mjs} +1 -1
- package/chunks/{C9nRNgwm2.mjs → QTy8g5MS.mjs} +589 -763
- package/chunks/{CsA_9MVv.mjs → YdNYH25C.mjs} +1 -1
- package/chunks/_q6JzJYp.mjs +773 -0
- package/chunks/{BiYsC43_.mjs → gTgPZrgY2.mjs} +119 -120
- package/chunks/{D2FNAA1a.mjs → jsgk7Yse2.mjs} +2 -2
- package/chunks/nL59ZuIk.mjs +58 -0
- package/chunks/{BJuAz5lX2.mjs → sWVkgzQt2.mjs} +2 -2
- package/chunks/{DN2qkQvd.mjs → tjwOOiNr2.mjs} +31 -32
- package/code-mirror-editor/index.mjs +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/index.mjs +1 -1
- package/count-up/index.mjs +1 -1
- package/custom-scrollbar/index.mjs +1 -1
- package/data-box/index.mjs +9 -10
- package/data-card/index.mjs +8 -9
- package/data-card-text/index.mjs +8 -9
- package/data-display/index.mjs +9 -10
- package/data-icons/index.mjs +9 -10
- package/data-imgtext/index.mjs +9 -11
- package/data-operatext/index.mjs +8 -9
- package/data-panel/index.mjs +9 -10
- package/data-pay/index.mjs +10 -12
- package/data-price/index.mjs +8 -9
- package/data-progress/index.mjs +10 -11
- package/data-rotate/index.mjs +9 -10
- package/data-table-picker/index.mjs +11 -12
- package/data-tabs/index.mjs +9 -10
- package/dict-render/index.mjs +1 -1
- package/e-charts/index.mjs +2 -2
- package/easy-popup/index.mjs +1 -1
- package/editable-progress/index.mjs +8 -8
- package/editable-tree/index.mjs +595 -2
- package/editable-tree/style.css +1 -1
- package/element-dialog/index.mjs +1 -1
- package/element-dialog/style.css +1 -1
- package/element-resize-observer/index.mjs +1 -1
- package/flex-box/index.mjs +1 -1
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flex-scroller/index.mjs +1 -1
- package/flow-designer/index.mjs +1 -1
- package/flow-designer/style.css +1 -1
- package/flow-viewer/index.mjs +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +1 -1
- package/form-checkbox-group/style.css +1 -1
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +1 -1
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/form-tree-select/index.mjs +1 -1
- package/form-tree-select-multiple/index.mjs +1 -1
- package/form-view/index.mjs +3 -3
- package/guide-steps/index.mjs +77 -2
- package/guide-steps/style.css +1 -1
- package/helper/dictionary.mjs +1 -1
- package/helper/input.mjs +1 -1
- package/highlight-j-s/index.mjs +1 -1
- package/iframe-window/index.mjs +1 -1
- package/image-cropper/index.mjs +12 -11
- package/image-preview/index.d.ts +1 -153
- package/image-preview/index.mjs +201 -2
- package/image-preview/style.css +1 -1
- package/image-viewer/index.mjs +1 -1
- package/index.css +1 -1
- package/index.mjs +101 -101
- package/input-number-range/index.mjs +7 -7
- package/keyboard/index.mjs +1 -1
- package/loading-view/index.mjs +1 -1
- package/name-avatar/index.mjs +1 -1
- package/nav-bar/index.mjs +3 -4
- package/package.json +5 -1
- package/page-index/index.mjs +14 -14
- package/page-index-top/index.mjs +12 -12
- package/pageable-table/index.mjs +1 -1
- package/pageable-table/style.css +1 -1
- package/photo-swipe/index.mjs +1 -1
- package/props/col.mjs +1 -1
- package/props/form-item.mjs +1 -1
- package/sign-panel/index.mjs +1 -1
- package/skeleton-panel/index.mjs +3 -3
- package/split-pane/index.mjs +1 -1
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/swiper/index.mjs +2 -2
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +109 -110
- package/table-view/style.css +1 -1
- package/tag-render/index.mjs +21 -23
- package/text-ellipsis/index.d.ts +1 -1
- package/text-ellipsis/index.mjs +1 -1
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/vue-tags-input/index.mjs +1 -1
- package/vue-tree-select/index.mjs +1 -1
- package/vue-video-player/index.d.ts +1 -1
- package/vue-video-player/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +47 -50
- package/year-calendar/index.mjs +1 -1
- package/year-calendar/style.css +1 -1
- package/chunks/49634Q2N2.mjs +0 -936
- package/chunks/77cFhiAz.mjs +0 -13
- package/chunks/7JVbVOff2.mjs +0 -46
- package/chunks/B1ATN2my.mjs +0 -26
- package/chunks/B7O8aGqC2.mjs +0 -58
- package/chunks/BBPczt0U.mjs +0 -4
- package/chunks/BCwAowl1.mjs +0 -589
- package/chunks/BDVLN2ly.mjs +0 -105
- package/chunks/BEIlrURf.mjs +0 -251
- package/chunks/BEysX5TF2.mjs +0 -1038
- package/chunks/BHVyaqk0.mjs +0 -736
- package/chunks/BIj6pa8Z.mjs +0 -15
- package/chunks/BMWg0Wyj.mjs +0 -223
- package/chunks/BOsml5YC.mjs +0 -69
- package/chunks/BPwFiWYl2.mjs +0 -226
- package/chunks/BVIHqL6g.mjs +0 -17
- package/chunks/BVSQ6DfJ.mjs +0 -17
- package/chunks/BWqFKbFT.mjs +0 -1
- package/chunks/B__5L22p2.mjs +0 -346
- package/chunks/Bcpewc6H.mjs +0 -1279
- package/chunks/Bdeug17L.mjs +0 -42
- package/chunks/BffxPn8a.mjs +0 -34
- package/chunks/BgKQXQO_.mjs +0 -3093
- package/chunks/Bgw_3soo.mjs +0 -35
- package/chunks/BjCfQFUL.mjs +0 -54
- package/chunks/BjWs-r2V.mjs +0 -25
- package/chunks/BlB1fEo92.mjs +0 -8
- package/chunks/BmP9lQmT.mjs +0 -1
- package/chunks/BrYtAPbN2.mjs +0 -161
- package/chunks/BsKwchVA.mjs +0 -14
- package/chunks/Bxo1Of95.mjs +0 -479
- package/chunks/BzFYbCpR.mjs +0 -25
- package/chunks/C6puxasG.mjs +0 -34
- package/chunks/C7l9aZGE.mjs +0 -577
- package/chunks/CDRNaOEg2.mjs +0 -274
- package/chunks/CG7AYiWy.mjs +0 -1
- package/chunks/CLzc_j7_.mjs +0 -234
- package/chunks/CQSTyCVP.mjs +0 -6
- package/chunks/CQxz8uUc.mjs +0 -454
- package/chunks/CU8bKuD12.mjs +0 -237
- package/chunks/CUF58PQ6.mjs +0 -1
- package/chunks/CUMFv5zJ2.mjs +0 -136
- package/chunks/C_eGir-J.mjs +0 -17
- package/chunks/Cb6Zx6UC.mjs +0 -29
- package/chunks/Cb_S4x_i2.mjs +0 -1098
- package/chunks/CbgD7y-5.mjs +0 -5
- package/chunks/CbsGuLZz2.mjs +0 -105
- package/chunks/CcT5SsZk.mjs +0 -48
- package/chunks/CcnjxILx.mjs +0 -1
- package/chunks/ChkCT6Mm.mjs +0 -4
- package/chunks/CiFlMt6Z.mjs +0 -41
- package/chunks/CiOqOUkG.mjs +0 -1
- package/chunks/CkXf_DVJ2.mjs +0 -1
- package/chunks/CnCSm3LY2.mjs +0 -4
- package/chunks/CnqWFDqp2.mjs +0 -244
- package/chunks/Cq0oEWRi2.mjs +0 -384
- package/chunks/CtBIjjQc2.mjs +0 -58
- package/chunks/Ctd3_wOH2.mjs +0 -6
- package/chunks/CuoYjthQ.mjs +0 -643
- package/chunks/CwhXr2Qc.mjs +0 -1
- package/chunks/D-hj62se2.mjs +0 -525
- package/chunks/D3VpXXqv.mjs +0 -1331
- package/chunks/D3Xixh5v.mjs +0 -5
- package/chunks/D4oNQiIK.mjs +0 -461
- package/chunks/D7O9ov79.mjs +0 -447
- package/chunks/D8fid28s2.mjs +0 -42
- package/chunks/DJdhVUFO2.mjs +0 -2435
- package/chunks/DJo_1CEK2.mjs +0 -61
- package/chunks/DMBx2EQl.mjs +0 -107
- package/chunks/DOCwznnS.mjs +0 -62
- package/chunks/DStwh2ne.mjs +0 -281
- package/chunks/D_5z5Xeq2.mjs +0 -37
- package/chunks/Df9VO_Wn2.mjs +0 -2
- package/chunks/Dg9Q-Tbi2.mjs +0 -299
- package/chunks/Diyl8upM.mjs +0 -277
- package/chunks/DjIPzCCR.mjs +0 -2
- package/chunks/DnBzQ-xh.mjs +0 -4
- package/chunks/Dp195RgF.mjs +0 -2
- package/chunks/Dqu1Etz62.mjs +0 -52
- package/chunks/DrKq_frR.mjs +0 -98
- package/chunks/DrXfCf172.mjs +0 -440
- package/chunks/DsZznbt2.mjs +0 -208
- package/chunks/Dsd58O0g.mjs +0 -25
- package/chunks/DssopN-n2.mjs +0 -97
- package/chunks/Dtq1xYk8.mjs +0 -47
- package/chunks/FeuisuNY2.mjs +0 -88
- package/chunks/GEtlriHC.mjs +0 -188
- package/chunks/GsvG1yFW.mjs +0 -1919
- package/chunks/IheQdJ0z.mjs +0 -267
- package/chunks/KGmxNbpi.mjs +0 -21
- package/chunks/PNyFONog2.mjs +0 -69
- package/chunks/T70m4caR.mjs +0 -1095
- package/chunks/ZBsqmcIN2.mjs +0 -622
- package/chunks/akEzJ4kG.mjs +0 -18
- package/chunks/fX1GD0G5.mjs +0 -70
- package/chunks/gh52LMTG.mjs +0 -12
- package/chunks/hgAOQY9a.mjs +0 -406
- package/chunks/iu5J8EF_.mjs +0 -197
- package/chunks/lGc5ksPb.mjs +0 -279
- package/chunks/pZQfJv282.mjs +0 -4
- package/chunks/qrHhuZXg.mjs +0 -465
- package/chunks/r8gDbwly.mjs +0 -1
- package/chunks/vpwjmKdg2.mjs +0 -32
- package/css/style.css +0 -1
- package/css/style10.css +0 -1
- package/css/style11.css +0 -1
- package/css/style12.css +0 -1
- package/css/style13.css +0 -1
- package/css/style14.css +0 -1
- package/css/style15.css +0 -1
- package/css/style16.css +0 -1
- package/css/style17.css +0 -1
- package/css/style18.css +0 -1
- package/css/style19.css +0 -1
- package/css/style2.css +0 -1
- package/css/style20.css +0 -1
- package/css/style21.css +0 -1
- package/css/style22.css +0 -1
- package/css/style23.css +0 -1
- package/css/style24.css +0 -1
- package/css/style25.css +0 -1
- package/css/style26.css +0 -1
- package/css/style27.css +0 -1
- package/css/style28.css +0 -1
- package/css/style29.css +0 -1
- package/css/style3.css +0 -1
- package/css/style4.css +0 -1
- package/css/style5.css +0 -1
- package/css/style6.css +0 -1
- package/css/style7.css +0 -1
- package/css/style8.css +0 -1
- package/css/style9.css +0 -1
- package/form-date-picker/style.css +0 -1
- package/form-image/style.css +0 -1
- package/form-input-time/style.css +0 -1
- package/form-radio-group/style.css +0 -1
- package/form-rate/style.css +0 -1
- package/form-time-select/style.css +0 -1
- /package/chunks/{CZnBtJW02.mjs → BBvIPqcc.mjs} +0 -0
- /package/chunks/{iIozz7ce.mjs → BoCxKwBf.mjs} +0 -0
- /package/chunks/{BxRjXAwz.mjs → CE67pCwD.mjs} +0 -0
- /package/chunks/{DWhGFQkb2.mjs → CQeEP_Tl.mjs} +0 -0
- /package/chunks/{BQ0e8kIi.mjs → CaczibeD.mjs} +0 -0
- /package/chunks/{B_80qPvY.mjs → DZCryyFG.mjs} +0 -0
- /package/chunks/{q5iCsXNv.mjs → Dq63V0CC.mjs} +0 -0
- /package/chunks/{CRjUGi_-.mjs → OEBJ-trG.mjs} +0 -0
- /package/chunks/{GYddfy8T.mjs → fjtZc9Rq2.mjs} +0 -0
package/editable-tree/index.mjs
CHANGED
|
@@ -1,2 +1,595 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { m as e, t } from "../chunks/ClVh1Lek.mjs";
|
|
2
|
+
import { t as n } from "../chunks/CaczibeD.mjs";
|
|
3
|
+
import { t as r } from "../chunks/BH7VEktl.mjs";
|
|
4
|
+
import { allProps as i, predicate as a } from "../props/tree.mjs";
|
|
5
|
+
import { ElInput as o, ElMessageBox as s, ElPopconfirm as c, ElTree as l } from "element-plus/es";
|
|
6
|
+
import "element-plus/es/components/base/style/css";
|
|
7
|
+
import "element-plus/es/components/input/style/css";
|
|
8
|
+
import { Fragment as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, mergeProps as _, normalizeClass as v, normalizeStyle as y, openBlock as b, renderSlot as x, toDisplayString as S, toHandlers as C, vShow as w, withCtx as T, withDirectives as E, withModifiers as D } from "vue";
|
|
9
|
+
import { computePosition as O, delay as k, fastClone as A, findTreeChildren as j, isFunction as M, isNotEmpty as N, isPlainObject as P, isUndefined as F, isVerticalScrollbarVisible as I, patch as L, scrollbarWidth as R } from "@web-utils/core";
|
|
10
|
+
import "element-plus/es/components/message-box/style/css";
|
|
11
|
+
import { cloneDeep as z } from "@web-utils/integrations/lodash";
|
|
12
|
+
import "element-plus/es/components/tree/style/css";
|
|
13
|
+
import "element-plus/es/components/popconfirm/style/css";
|
|
14
|
+
import { addResizeListener as B, removeResizeListener as V } from "@web-utils/integrations/resize";
|
|
15
|
+
//#region src/components/form/EditableTree.vue
|
|
16
|
+
var H = {
|
|
17
|
+
name: "EditableTree",
|
|
18
|
+
props: { ...i },
|
|
19
|
+
emits: {
|
|
20
|
+
"remove-new-node": null,
|
|
21
|
+
"node-loaded": null,
|
|
22
|
+
"root-node-loaded": null,
|
|
23
|
+
"node-deleted": null,
|
|
24
|
+
"node-updated": null,
|
|
25
|
+
"node-added": null,
|
|
26
|
+
"on-node-click": null,
|
|
27
|
+
"add-root-node": null,
|
|
28
|
+
"create-new-node": null
|
|
29
|
+
},
|
|
30
|
+
data() {
|
|
31
|
+
return {
|
|
32
|
+
loading: !1,
|
|
33
|
+
showMenu: !1,
|
|
34
|
+
empty: !0,
|
|
35
|
+
expandedKeys: this.lazy ? [] : this.defaultExpandedKeys,
|
|
36
|
+
treeData: [],
|
|
37
|
+
curNode: {},
|
|
38
|
+
curData: {},
|
|
39
|
+
position: {},
|
|
40
|
+
text: "",
|
|
41
|
+
right: 4,
|
|
42
|
+
treeKey: Date.now()
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
defaultOptions() {
|
|
47
|
+
return {
|
|
48
|
+
confirmButtonText: "确定",
|
|
49
|
+
cancelButtonText: "取消",
|
|
50
|
+
closeOnClickModal: !1,
|
|
51
|
+
modal: !0,
|
|
52
|
+
inputErrorMessage: `${this.label}名不能为空!`,
|
|
53
|
+
inputPlaceholder: `请输入${this.label}名...`,
|
|
54
|
+
inputValidator: (e) => e != null && e.trim().length > 0
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
innerTreeData() {
|
|
58
|
+
var e;
|
|
59
|
+
return (e = this.$attrs.data) != null && e.length ? this.$attrs.data : this.treeData;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
watch: { defaultExpandedKeys: {
|
|
63
|
+
immediate: !0,
|
|
64
|
+
handler(e) {
|
|
65
|
+
this.expandedKeys = [...e];
|
|
66
|
+
}
|
|
67
|
+
} },
|
|
68
|
+
setup(t) {
|
|
69
|
+
let { autoBindProps: n, listeners: r } = e(t, {
|
|
70
|
+
predicate: a,
|
|
71
|
+
removeOn: !0
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
autoBindProps: n,
|
|
75
|
+
listeners: r
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
created() {
|
|
79
|
+
this.tryFetch();
|
|
80
|
+
},
|
|
81
|
+
mounted() {
|
|
82
|
+
B(this.$refs.tree.$el, this.resize), B(this.$refs.treeWrapper, this.resize);
|
|
83
|
+
},
|
|
84
|
+
beforeUnmount() {
|
|
85
|
+
V(this.$refs.tree.$el, this.resize), V(this.$refs.treeWrapper, this.resize);
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
addExpandKey(e) {
|
|
89
|
+
this.reserveExpandKey && this.expandedKeys.push(e[this.nodeKey]);
|
|
90
|
+
},
|
|
91
|
+
removeExpandKey(e) {
|
|
92
|
+
this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((t) => t !== e[this.nodeKey]));
|
|
93
|
+
},
|
|
94
|
+
resize() {
|
|
95
|
+
I(this.$refs.treeWrapper) ? this.right = 4 + R : this.right = 4;
|
|
96
|
+
},
|
|
97
|
+
async showContextMenu(e, t, n) {
|
|
98
|
+
t.contextmenu === !1 || t.id === -1 || t.id === 0 || t.edit === !0 || this.readonly || this.contextMenu && (this.curNode = n, this.curData = t, this.showMenu = !0, this.$refs.tree.setCurrentKey(t.id), await this.$nextTick(), this.position = O(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
|
|
99
|
+
},
|
|
100
|
+
hideContextMenu() {
|
|
101
|
+
this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
|
|
102
|
+
},
|
|
103
|
+
async tryFetch() {
|
|
104
|
+
if (this.lazy === !1 && this.fetchApi) {
|
|
105
|
+
var e;
|
|
106
|
+
let r;
|
|
107
|
+
try {
|
|
108
|
+
var t;
|
|
109
|
+
r = await this.fetchApi(((t = this.rootNode) == null ? void 0 : t.id) ?? -1, {});
|
|
110
|
+
} catch {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
let i = r.data.data;
|
|
114
|
+
P(i) && (i = [i]), i = i || [];
|
|
115
|
+
let a = [];
|
|
116
|
+
if (this.empty = i.length === 0, P(this.customRootNode)) {
|
|
117
|
+
let e = z(this.customRootNode);
|
|
118
|
+
e[this.treeProps.children || "children"] = i, a = [e];
|
|
119
|
+
} else if (M(this.customRootNode)) {
|
|
120
|
+
let e = this.customRootNode(i);
|
|
121
|
+
e[this.treeProps.children || "children"] = i, a = P(e) ? [e] : e;
|
|
122
|
+
} else a = i;
|
|
123
|
+
if ((e = this.defaultExpandedKeys) != null && e.length) this.expandedKeys = [...this.defaultExpandedKeys];
|
|
124
|
+
else if (this.expandFirstNode) {
|
|
125
|
+
var n;
|
|
126
|
+
this.expandedKeys = [(n = a[0]) == null ? void 0 : n.id];
|
|
127
|
+
}
|
|
128
|
+
this.treeData = a, await this.$nextTick(), this.$emit("node-loaded", a);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
async loadNode(e, t) {
|
|
132
|
+
if (e.level === 0) {
|
|
133
|
+
var n, r;
|
|
134
|
+
let o = (await this.fetchApi(((n = this.rootNode) == null ? void 0 : n.id) ?? -1, e)).data.data;
|
|
135
|
+
if (this.empty = o.length === 0, P(this.customRootNode)) {
|
|
136
|
+
let e = z(this.customRootNode);
|
|
137
|
+
e[this.treeProps.children || "children"] = o, o = [e], t(o);
|
|
138
|
+
} else if (M(this.customRootNode)) {
|
|
139
|
+
let e = this.customRootNode(o);
|
|
140
|
+
e[this.treeProps.children || "children"] = o, o = P(e) ? [e] : e;
|
|
141
|
+
} else t(o);
|
|
142
|
+
if (await this.$nextTick(), this.$emit("root-node-loaded", o), (r = this.defaultExpandedKeys) != null && r.length) {
|
|
143
|
+
var i;
|
|
144
|
+
this.expandedKeys = [(i = o[0]) == null ? void 0 : i.id, ...this.defaultExpandedKeys];
|
|
145
|
+
} else if (this.expandFirstNode) {
|
|
146
|
+
var a;
|
|
147
|
+
this.expandedKeys = [(a = o[0]) == null ? void 0 : a.id];
|
|
148
|
+
}
|
|
149
|
+
} else {
|
|
150
|
+
if (e.leaf || e.data.isTempNode) return t([]);
|
|
151
|
+
let n = (await this.fetchApi(e.data.id, e)).data.data;
|
|
152
|
+
t(n), await this.$nextTick(), this.$emit("node-loaded", n);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
clear() {
|
|
156
|
+
this.cancelEdit(), this.removeNewNode();
|
|
157
|
+
},
|
|
158
|
+
clearChecked() {
|
|
159
|
+
this.$refs.tree.setCheckedKeys([]);
|
|
160
|
+
},
|
|
161
|
+
removeNewNode() {
|
|
162
|
+
this.newChild && this.newChild.id === -1 && (this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
|
|
163
|
+
},
|
|
164
|
+
cancelEdit() {
|
|
165
|
+
this.editData && (F(this.editData.edit) ? this.editData.edit = !0 : this.editData.edit = !1);
|
|
166
|
+
},
|
|
167
|
+
async editNode(e, t) {
|
|
168
|
+
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = t, this.text = t[this.treeProps.label], F(t.edit), t.edit = !0, await this.$nextTick(), this.$refs.labelTxt.focus()) : await s.prompt(`请输入新的${this.label}名:`, {
|
|
169
|
+
...this.defaultOptions,
|
|
170
|
+
inputValue: t[this.treeProps.label],
|
|
171
|
+
beforeClose: async (e, t, n) => {
|
|
172
|
+
if (e === "confirm") {
|
|
173
|
+
try {
|
|
174
|
+
t.confirmButtonLoading = !0, t.confirmButtonText = "处理中...", this.text = t.inputValue, await this.onConfirm(this.curNode, this.curData), n();
|
|
175
|
+
} catch {
|
|
176
|
+
t.confirmButtonText = "确定";
|
|
177
|
+
}
|
|
178
|
+
t.confirmButtonLoading = !1;
|
|
179
|
+
} else n();
|
|
180
|
+
}
|
|
181
|
+
}).catch((e) => e);
|
|
182
|
+
},
|
|
183
|
+
async appendRootNode() {
|
|
184
|
+
this.text = "", !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(void 0), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.scrollIntoView(!0)) : await s.prompt(`请输入${this.label}名:`, {
|
|
185
|
+
...this.defaultOptions,
|
|
186
|
+
beforeClose: async (e, n, r) => {
|
|
187
|
+
if (e === "confirm") {
|
|
188
|
+
try {
|
|
189
|
+
this.createNewChild(-1), n.confirmButtonLoading = !0, n.confirmButtonText = "处理中...";
|
|
190
|
+
let e = await this.saveApi(this.newNodeBuilder(n.inputValue, { id: -1 }));
|
|
191
|
+
this.newChild[this.treeProps.label] = n.inputValue, this.newChild.edit = !1, t(this.newChild, e.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.locateView(), r();
|
|
192
|
+
} catch {
|
|
193
|
+
n.confirmButtonText = "确定";
|
|
194
|
+
}
|
|
195
|
+
n.confirmButtonLoading = !1;
|
|
196
|
+
} else r();
|
|
197
|
+
}
|
|
198
|
+
}).catch((e) => e);
|
|
199
|
+
},
|
|
200
|
+
appendChildNode(e) {
|
|
201
|
+
this.text = "";
|
|
202
|
+
let n = e.expanded;
|
|
203
|
+
e.expand(async () => {
|
|
204
|
+
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(e.data.id), this.$refs.tree.append(this.newChild, e), await this.scrollIntoView(n)) : await s.prompt(`请输入${this.label}名:`, {
|
|
205
|
+
...this.defaultOptions,
|
|
206
|
+
beforeClose: async (n, r, i) => {
|
|
207
|
+
if (n === "confirm") {
|
|
208
|
+
try {
|
|
209
|
+
this.createNewChild(e.data.id), r.confirmButtonLoading = !0, r.confirmButtonText = "处理中...";
|
|
210
|
+
let n = await this.saveApi(this.newNodeBuilder(r.inputValue, e.data));
|
|
211
|
+
this.newChild[this.treeProps.label] = r.inputValue, this.newChild.edit = !1, t(this.newChild, n.data), this.$refs.tree.append(this.newChild, e), await this.locateView(), i();
|
|
212
|
+
} catch {
|
|
213
|
+
r.confirmButtonText = "确定";
|
|
214
|
+
}
|
|
215
|
+
r.confirmButtonLoading = !1;
|
|
216
|
+
} else i();
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
},
|
|
221
|
+
appendChildNodeWithData(e, t, n) {
|
|
222
|
+
this.text = "";
|
|
223
|
+
let r = e.expanded;
|
|
224
|
+
e.expand(async () => {
|
|
225
|
+
this.clear(), this.newChild = {
|
|
226
|
+
id: -1,
|
|
227
|
+
parentId: t,
|
|
228
|
+
[this.treeProps.label]: n,
|
|
229
|
+
edit: !1,
|
|
230
|
+
isTempNode: !0,
|
|
231
|
+
hasChildren: !1
|
|
232
|
+
}, this.$refs.tree.append(this.newChild, e), await this.scrollIntoView(r);
|
|
233
|
+
});
|
|
234
|
+
},
|
|
235
|
+
appendPeerNode(e) {
|
|
236
|
+
e.parent && e.parent.level !== 0 ? this.appendChildNode(e.parent) : this.appendRootNode();
|
|
237
|
+
},
|
|
238
|
+
async addRootNode(e) {
|
|
239
|
+
this.$refs.tree.remove(e), await this.$nextTick(), this.$refs.tree.root.insertChild({ data: e }, void 0, !0);
|
|
240
|
+
},
|
|
241
|
+
async addChildNode(e) {
|
|
242
|
+
this.curNode && this.curNode.level !== 0 ? this.curNode.expand(async () => {
|
|
243
|
+
this.$refs.tree.remove(e), await this.$nextTick(), this.$refs.tree.append(e, this.curNode);
|
|
244
|
+
}) : await this.addRootNode(e);
|
|
245
|
+
},
|
|
246
|
+
async addPeerNode(e) {
|
|
247
|
+
this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(async () => {
|
|
248
|
+
this.$refs.tree.remove(e), await this.$nextTick(), this.$refs.tree.append(e, this.curNode.parent);
|
|
249
|
+
}) : await this.addRootNode(e);
|
|
250
|
+
},
|
|
251
|
+
updateNode(e) {
|
|
252
|
+
let t = this.$refs.tree.getNode(e);
|
|
253
|
+
t && L(t.data, e, !0);
|
|
254
|
+
},
|
|
255
|
+
setCurrentKey(e) {
|
|
256
|
+
var t;
|
|
257
|
+
(t = this.$refs.tree) == null || t.setCurrentKey(e);
|
|
258
|
+
},
|
|
259
|
+
createNewChild(e) {
|
|
260
|
+
this.newChild = {
|
|
261
|
+
id: -1,
|
|
262
|
+
parentId: e,
|
|
263
|
+
[this.treeProps.label]: "",
|
|
264
|
+
edit: !0,
|
|
265
|
+
isTempNode: !0,
|
|
266
|
+
hasChildren: !1
|
|
267
|
+
}, this.$emit("create-new-node", this.newChild);
|
|
268
|
+
},
|
|
269
|
+
async removeNodeModal(e) {
|
|
270
|
+
await this.$confirm(`你确定要删除${this.label}[<span class="break-word" style="color: orange">${e.data[this.treeProps.label]}</span>]吗?`, "系统提示", {
|
|
271
|
+
type: "warning",
|
|
272
|
+
modal: !0,
|
|
273
|
+
dangerouslyUseHTMLString: !0,
|
|
274
|
+
iconClass: "el-icon-question",
|
|
275
|
+
closeOnClickModal: !1,
|
|
276
|
+
confirmButtonClass: "el-button--danger",
|
|
277
|
+
cancelButtonClass: "el-button--primary is-plain",
|
|
278
|
+
beforeClose: async (t, n, r) => {
|
|
279
|
+
if (t === "confirm") {
|
|
280
|
+
try {
|
|
281
|
+
n.confirmButtonLoading = !0, n.confirmButtonText = "删除...";
|
|
282
|
+
let t = e.parent, i = await this.deleteApi(e.data.id);
|
|
283
|
+
i.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", t, e.data), r()) : this.$message.error(i.message);
|
|
284
|
+
} catch {}
|
|
285
|
+
n.confirmButtonText = "确定", n.confirmButtonLoading = !1;
|
|
286
|
+
} else r();
|
|
287
|
+
}
|
|
288
|
+
}).catch((e) => e);
|
|
289
|
+
},
|
|
290
|
+
async removeNode(e) {
|
|
291
|
+
try {
|
|
292
|
+
let t = e.parent;
|
|
293
|
+
if (this.deleteApi) {
|
|
294
|
+
let n = await this.deleteApi(e.data.id);
|
|
295
|
+
n.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", t, e.data)) : this.$message.error(n.message);
|
|
296
|
+
} else this.$refs.tree.remove(e);
|
|
297
|
+
} catch {}
|
|
298
|
+
},
|
|
299
|
+
async onConfirm(e, n) {
|
|
300
|
+
if (n[this.treeProps.label] === this.text || !N(this.text)) {
|
|
301
|
+
this.clear();
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
F(n.loading), n.loading = !0;
|
|
305
|
+
try {
|
|
306
|
+
if (this.loading = !0, n.id === -1) {
|
|
307
|
+
let r = await this.saveApi(this.newNodeBuilder(this.text, e.parent.data || { id: -1 })), i = A(n);
|
|
308
|
+
t(n, {
|
|
309
|
+
...r.data,
|
|
310
|
+
isTempNode: !1
|
|
311
|
+
}), this.$emit("node-added", n, i, e), this.registerNode(e);
|
|
312
|
+
} else await this.updateApi({
|
|
313
|
+
...n,
|
|
314
|
+
[this.treeProps.label]: this.text
|
|
315
|
+
});
|
|
316
|
+
n[this.treeProps.label] = this.text, n.edit = !1, this.$emit("node-updated", n, e), this.text = "";
|
|
317
|
+
} catch {}
|
|
318
|
+
n.loading = !1, this.loading = !1;
|
|
319
|
+
},
|
|
320
|
+
onCancel(e, t) {
|
|
321
|
+
t.id === -1 ? this.$refs.tree.remove(e) : t.edit = !1, this.text = "";
|
|
322
|
+
},
|
|
323
|
+
nodeClick(e, t, n) {
|
|
324
|
+
this.hideContextMenu(), (F(e.loading) || !e.loading) && (this.curNode = t, this.curData = e, this.$emit("on-node-click", e, t, n));
|
|
325
|
+
},
|
|
326
|
+
getCurrentNode() {
|
|
327
|
+
return this.$refs.tree.getCurrentNode();
|
|
328
|
+
},
|
|
329
|
+
async locateView() {
|
|
330
|
+
await this.$nextTick();
|
|
331
|
+
let e = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
|
|
332
|
+
e && e.scrollIntoView();
|
|
333
|
+
},
|
|
334
|
+
async scrollIntoView(e) {
|
|
335
|
+
var t;
|
|
336
|
+
await this.$nextTick(), e || await k(300), (t = this.$refs) == null || (t = t.labelTxt) == null || t.focus();
|
|
337
|
+
},
|
|
338
|
+
inputKeyup(e, t, n) {
|
|
339
|
+
e.keyCode === 13 && this.onConfirm(t, n), e.keyCode === 27 && this.clear();
|
|
340
|
+
},
|
|
341
|
+
inputBlur(e, t, n) {
|
|
342
|
+
this.confirmButton || this.onConfirm(t, n);
|
|
343
|
+
},
|
|
344
|
+
getCheckedKeys() {
|
|
345
|
+
return this.$refs.tree.getCheckedKeys();
|
|
346
|
+
},
|
|
347
|
+
setCheckedKeys(e) {
|
|
348
|
+
this.$refs.tree.setCheckedKeys(e);
|
|
349
|
+
},
|
|
350
|
+
getCheckedNodes() {
|
|
351
|
+
return this.$refs.tree.getCheckedNodes();
|
|
352
|
+
},
|
|
353
|
+
setCheckedNodes(e) {
|
|
354
|
+
this.$refs.tree.setCheckedNodes(e);
|
|
355
|
+
},
|
|
356
|
+
getNode(e) {
|
|
357
|
+
return this.$refs.tree.getNode(e);
|
|
358
|
+
},
|
|
359
|
+
getRootNode() {
|
|
360
|
+
return this.$refs.tree.root;
|
|
361
|
+
},
|
|
362
|
+
findTreeNode(e) {
|
|
363
|
+
return j(this.$refs.tree.root.childNodes, (t) => t.data === e || t.data.id === e, "childNodes");
|
|
364
|
+
},
|
|
365
|
+
registerNode(e) {
|
|
366
|
+
e.store.registerNode(e), delete e.store.nodesMap[-1];
|
|
367
|
+
},
|
|
368
|
+
async reloadTree() {
|
|
369
|
+
this.lazy ? this.treeKey = Date.now() : await this.tryFetch();
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}, U = { class: "editable-tree" }, W = {
|
|
373
|
+
ref: "treeWrapper",
|
|
374
|
+
class: "et-tree-wrapper"
|
|
375
|
+
}, G = {
|
|
376
|
+
key: 0,
|
|
377
|
+
style: { "padding-left": "24px" }
|
|
378
|
+
}, K = ["data-id"], q = {
|
|
379
|
+
class: "node-label flex-row flex-item ellipsis-1",
|
|
380
|
+
style: { overflow: "hidden" }
|
|
381
|
+
}, J = {
|
|
382
|
+
class: "flex-item-relative",
|
|
383
|
+
style: { height: "21px" }
|
|
384
|
+
}, Y = ["title"], X = {
|
|
385
|
+
key: 0,
|
|
386
|
+
class: "handle-actions"
|
|
387
|
+
}, Z = {
|
|
388
|
+
key: 1,
|
|
389
|
+
class: "handle-actions",
|
|
390
|
+
style: { display: "inline-block" }
|
|
391
|
+
}, Q = ["data-id"], $ = { class: "menu-list" };
|
|
392
|
+
function ee(e, t, n, i, a, s) {
|
|
393
|
+
let O = r, k = c, A = o, j = l;
|
|
394
|
+
return b(), p("div", U, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? (b(), d(O, {
|
|
395
|
+
key: 0,
|
|
396
|
+
type: "primary",
|
|
397
|
+
style: y([{
|
|
398
|
+
position: "absolute",
|
|
399
|
+
top: "4px",
|
|
400
|
+
"z-index": "1"
|
|
401
|
+
}, { right: `${a.right}px` }]),
|
|
402
|
+
icon: "el-icon-plus",
|
|
403
|
+
circle: "",
|
|
404
|
+
plain: "",
|
|
405
|
+
onClick: t[0] || (t[0] = D((t) => e.$emit("add-root-node"), ["stop"]))
|
|
406
|
+
}, null, 8, ["style"])) : f("v-if", !0), m("div", W, [
|
|
407
|
+
!e.readonly && e.addRootNodeButtonStyle === "top" ? (b(), p("div", G, [g(O, {
|
|
408
|
+
disabled: a.loading,
|
|
409
|
+
type: "text",
|
|
410
|
+
onClick: s.appendRootNode
|
|
411
|
+
}, {
|
|
412
|
+
default: T(() => [t[8] || (t[8] = m("i", { class: "el-icon-lx-add" }, null, -1)), h(" " + S(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`), 1)]),
|
|
413
|
+
_: 1
|
|
414
|
+
}, 8, ["disabled", "onClick"])])) : f("v-if", !0),
|
|
415
|
+
(b(), d(j, _(i.autoBindProps, {
|
|
416
|
+
key: a.treeKey,
|
|
417
|
+
ref: "tree",
|
|
418
|
+
"default-expand-all": e.defaultExpandAll,
|
|
419
|
+
class: "flex-item",
|
|
420
|
+
"default-expanded-keys": a.expandedKeys,
|
|
421
|
+
"expand-on-click-node": !1,
|
|
422
|
+
"highlight-current": "",
|
|
423
|
+
load: s.loadNode,
|
|
424
|
+
data: s.innerTreeData,
|
|
425
|
+
props: e.treeProps,
|
|
426
|
+
lazy: e.lazy,
|
|
427
|
+
"node-key": e.nodeKey
|
|
428
|
+
}, C(i.listeners), {
|
|
429
|
+
onNodeClick: s.nodeClick,
|
|
430
|
+
onNodeContextmenu: s.showContextMenu,
|
|
431
|
+
onNodeExpand: s.addExpandKey,
|
|
432
|
+
onNodeCollapse: s.removeExpandKey
|
|
433
|
+
}), {
|
|
434
|
+
default: T(({ node: n, data: r }) => [x(e.$slots, "default", {
|
|
435
|
+
node: n,
|
|
436
|
+
data: r
|
|
437
|
+
}, () => [f("非编辑模式"), r.edit ? (b(), p(u, { key: 1 }, [f("编辑模式"), m("span", {
|
|
438
|
+
"data-id": r.id,
|
|
439
|
+
class: "custom-tree-node flex-row flex-item",
|
|
440
|
+
style: { overflow: "hidden" }
|
|
441
|
+
}, [
|
|
442
|
+
e.icon ? (b(), p("i", {
|
|
443
|
+
key: 0,
|
|
444
|
+
class: v([r.loading ? "el-icon-loading" : "el-icon-edit-outline", "node-icon flex-not-shrink"])
|
|
445
|
+
}, null, 2)) : f("v-if", !0),
|
|
446
|
+
g(A, {
|
|
447
|
+
ref: "labelTxt",
|
|
448
|
+
modelValue: a.text,
|
|
449
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => a.text = e),
|
|
450
|
+
class: "node-input flex-item",
|
|
451
|
+
placeholder: s.defaultOptions.inputPlaceholder,
|
|
452
|
+
onKeyup: (e) => s.inputKeyup(e, n, r),
|
|
453
|
+
onBlur: (e) => s.inputBlur(e, n, r),
|
|
454
|
+
onClick: t[3] || (t[3] = D(() => {}, ["stop"]))
|
|
455
|
+
}, null, 8, [
|
|
456
|
+
"modelValue",
|
|
457
|
+
"placeholder",
|
|
458
|
+
"onKeyup",
|
|
459
|
+
"onBlur"
|
|
460
|
+
]),
|
|
461
|
+
e.confirmButton ? (b(), p(u, { key: 1 }, [E(g(O, {
|
|
462
|
+
class: "flex-not-shrink",
|
|
463
|
+
type: "text",
|
|
464
|
+
onClick: D((e) => s.onConfirm(n, r), ["stop"])
|
|
465
|
+
}, {
|
|
466
|
+
default: T(() => [...t[13] || (t[13] = [h(" 确定 ", -1)])]),
|
|
467
|
+
_: 1
|
|
468
|
+
}, 8, ["onClick"]), [[w, !r.loading]]), E(g(O, {
|
|
469
|
+
class: "flex-not-shrink",
|
|
470
|
+
type: "text",
|
|
471
|
+
onClick: D((e) => s.onCancel(n, r), ["stop"])
|
|
472
|
+
}, {
|
|
473
|
+
default: T(() => [...t[14] || (t[14] = [h(" 取消 ", -1)])]),
|
|
474
|
+
_: 1
|
|
475
|
+
}, 8, ["onClick"]), [[w, !r.loading]])], 64)) : f("v-if", !0)
|
|
476
|
+
], 8, Q)], 64)) : (b(), p("span", {
|
|
477
|
+
key: 0,
|
|
478
|
+
"data-id": r.id,
|
|
479
|
+
class: "custom-tree-node"
|
|
480
|
+
}, [
|
|
481
|
+
m("span", q, [
|
|
482
|
+
e.icon ? (b(), p("i", {
|
|
483
|
+
key: 0,
|
|
484
|
+
class: v([r.loading ? "el-icon-loading" : e.icon(r, n), "node-icon"])
|
|
485
|
+
}, null, 2)) : f("v-if", !0),
|
|
486
|
+
m("span", J, [m("span", {
|
|
487
|
+
class: "ellipsis-1 absolute-box et-tree-label",
|
|
488
|
+
title: n.label
|
|
489
|
+
}, [x(e.$slots, "label", {
|
|
490
|
+
data: r,
|
|
491
|
+
node: n
|
|
492
|
+
}, () => [h(S(n.label), 1)])], 8, Y)]),
|
|
493
|
+
x(e.$slots, "label-suffix", {
|
|
494
|
+
node: n,
|
|
495
|
+
data: r
|
|
496
|
+
})
|
|
497
|
+
]),
|
|
498
|
+
!e.contextMenu && !e.readonly ? E((b(), p("span", X, [
|
|
499
|
+
g(O, {
|
|
500
|
+
type: "text",
|
|
501
|
+
onClick: D((e) => s.appendChildNode(n, r), ["stop"])
|
|
502
|
+
}, {
|
|
503
|
+
default: T(() => [...t[9] || (t[9] = [h("添加", -1)])]),
|
|
504
|
+
_: 1
|
|
505
|
+
}, 8, ["onClick"]),
|
|
506
|
+
g(O, {
|
|
507
|
+
type: "text",
|
|
508
|
+
onClick: D((e) => s.editNode(n, r), ["stop"])
|
|
509
|
+
}, {
|
|
510
|
+
default: T(() => [...t[10] || (t[10] = [h("修改", -1)])]),
|
|
511
|
+
_: 1
|
|
512
|
+
}, 8, ["onClick"]),
|
|
513
|
+
g(k, {
|
|
514
|
+
class: "pop-confirm",
|
|
515
|
+
"icon-color": "red",
|
|
516
|
+
title: "你确定要删除吗?",
|
|
517
|
+
onConfirm: (e) => s.removeNode(n, r)
|
|
518
|
+
}, {
|
|
519
|
+
reference: T(() => [E(g(O, {
|
|
520
|
+
style: { "margin-left": "4px" },
|
|
521
|
+
type: "text",
|
|
522
|
+
onClick: t[1] || (t[1] = D(() => {}, ["stop"]))
|
|
523
|
+
}, {
|
|
524
|
+
default: T(() => [...t[11] || (t[11] = [h(" 删除 ", -1)])]),
|
|
525
|
+
_: 1
|
|
526
|
+
}, 512), [[w, n.isLeaf]])]),
|
|
527
|
+
_: 2
|
|
528
|
+
}, 1032, ["onConfirm"])
|
|
529
|
+
], 512)), [[w, !r.loading && !a.loading]]) : f("v-if", !0),
|
|
530
|
+
e.contextMenuIcon && e.contextMenu && !e.readonly ? E((b(), p("span", Z, [g(O, {
|
|
531
|
+
style: { padding: "6px 10px 0" },
|
|
532
|
+
type: "text",
|
|
533
|
+
onClick: D((e) => s.showContextMenu(e, r, n), ["stop"])
|
|
534
|
+
}, {
|
|
535
|
+
default: T(() => [...t[12] || (t[12] = [h(" . . . ", -1)])]),
|
|
536
|
+
_: 1
|
|
537
|
+
}, 8, ["onClick"])], 512)), [[w, !r.loading && !a.loading]]) : f("v-if", !0)
|
|
538
|
+
], 8, K))])]),
|
|
539
|
+
_: 3
|
|
540
|
+
}, 16, [
|
|
541
|
+
"default-expand-all",
|
|
542
|
+
"default-expanded-keys",
|
|
543
|
+
"load",
|
|
544
|
+
"data",
|
|
545
|
+
"props",
|
|
546
|
+
"lazy",
|
|
547
|
+
"node-key",
|
|
548
|
+
"onNodeClick",
|
|
549
|
+
"onNodeContextmenu",
|
|
550
|
+
"onNodeExpand",
|
|
551
|
+
"onNodeCollapse"
|
|
552
|
+
])),
|
|
553
|
+
e.contextMenu && !e.readonly ? E((b(), p("div", {
|
|
554
|
+
key: 1,
|
|
555
|
+
ref: "contextMenu",
|
|
556
|
+
style: y(a.position),
|
|
557
|
+
class: "menu"
|
|
558
|
+
}, [m("ul", $, [x(e.$slots, "context-menu", {
|
|
559
|
+
curNode: a.curNode,
|
|
560
|
+
curData: a.curData
|
|
561
|
+
}, () => [
|
|
562
|
+
E(m("li", {
|
|
563
|
+
class: "menu-item",
|
|
564
|
+
onClick: t[4] || (t[4] = (e) => s.appendPeerNode(a.curNode, a.curData))
|
|
565
|
+
}, [t[15] || (t[15] = m("i", {
|
|
566
|
+
class: "menu-item-icon el-icon-lx-add",
|
|
567
|
+
style: { color: "#228b22" }
|
|
568
|
+
}, null, -1)), h(" " + S(e.menuLabel.appendPeer), 1)], 512), [[w, a.curData.id > -1]]),
|
|
569
|
+
m("li", {
|
|
570
|
+
class: "menu-item",
|
|
571
|
+
onClick: t[5] || (t[5] = (e) => s.appendChildNode(a.curNode, a.curData))
|
|
572
|
+
}, [t[16] || (t[16] = m("i", {
|
|
573
|
+
class: "menu-item-icon el-icon-lx-add",
|
|
574
|
+
style: { color: "#228b22" }
|
|
575
|
+
}, null, -1)), h(" " + S(e.menuLabel.appendChild), 1)]),
|
|
576
|
+
E(m("li", {
|
|
577
|
+
class: "menu-item",
|
|
578
|
+
onClick: t[6] || (t[6] = (e) => s.editNode(a.curNode, a.curData))
|
|
579
|
+
}, [t[17] || (t[17] = m("i", {
|
|
580
|
+
class: "menu-item-icon el-icon-edit-outline",
|
|
581
|
+
style: { color: "#ffa500" }
|
|
582
|
+
}, null, -1)), h(" " + S(e.menuLabel.editNode), 1)], 512), [[w, a.curData.id > -1]]),
|
|
583
|
+
E(m("li", {
|
|
584
|
+
class: "menu-item",
|
|
585
|
+
onClick: t[7] || (t[7] = (e) => s.removeNodeModal(a.curNode, a.curData))
|
|
586
|
+
}, [t[18] || (t[18] = m("i", {
|
|
587
|
+
class: "menu-item-icon el-icon-delete",
|
|
588
|
+
style: { color: "#f00" }
|
|
589
|
+
}, null, -1)), h(" " + S(e.menuLabel.removeNode), 1)], 512), [[w, a.curNode.isLeaf]])
|
|
590
|
+
])])], 4)), [[w, a.showMenu]]) : f("v-if", !0)
|
|
591
|
+
], 512)]);
|
|
592
|
+
}
|
|
593
|
+
var te = /* @__PURE__ */ n(H, [["render", ee]]);
|
|
594
|
+
//#endregion
|
|
595
|
+
export { te as default };
|
package/editable-tree/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.editable-tree{position:relative}.editable-tree.et-tree-label-overflow-visible .et-tree-label{position:static}.et-tree-wrapper{text-align:left;flex-direction:column;width:100%;display:flex;overflow:auto}.et-tree-wrapper .el-tree{width:100%;display:table;overflow:visible}.et-tree-wrapper .el-button+.el-button{margin-left:8px!important}.et-tree-wrapper .el-input__inner{padding:0 4px}.et-tree-wrapper .custom-tree-node{align-items:center;width:100%;padding-right:8px;font-size:14px;display:flex}.et-tree-wrapper .custom-tree-node:hover .handle-actions{display:block}.et-tree-wrapper .custom-tree-node .handle-actions{align-self:flex-end;display:none}.et-tree-wrapper .custom-tree-node .node-icon{margin-top:2px;margin-right:4px}.et-tree-wrapper .node-label{align-items:center}.et-tree-wrapper .node-input{min-width:140px;margin-right:10px}.et-tree-wrapper .menu{z-index:3;background:#fff;border-radius:4px;padding:0;position:fixed;box-shadow:0 5px 10px #bebebe}.et-tree-wrapper .menu-item{color:#242f42;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;padding:8px 20px 8px 8px;font:11px/100% tahoma,arial,sans-serif;display:block}.et-tree-wrapper .menu .menu-item:hover{color:#66b1ff;background-color:#ecf5ff}.et-tree-wrapper .menu-item-icon{margin-right:4px;font-size:1.3em;font-weight:700}
|
package/element-dialog/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/OBTStTaa.mjs";
|
|
2
2
|
export { e as default };
|
package/element-dialog/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--
|
|
1
|
+
:root{--dialog-header-background-color:#025cde}.element-dialog.el-dialog{border-radius:4px 4px 0 0;flex-direction:column;padding:0;display:flex}.element-dialog.el-dialog .dialog-title{min-height:20px}.element-dialog.el-dialog .el-dialog__header{color:#fff;background-color:var(--dialog-header-background-color);border-radius:4px 4px 0 0;justify-content:center;align-items:center;padding:6px 10px;line-height:normal;display:flex;position:relative}.element-dialog.el-dialog .dialog-header-buttons{display:flex;position:absolute;top:50%;right:10px;transform:translateY(-50%)}.element-dialog.el-dialog .dialog-header-button{cursor:pointer;padding:2px;font-size:14px}.element-dialog.el-dialog .dialog-header-button+.dialog-header-button{margin-left:10px}.element-dialog.el-dialog .dialog-header-button:hover{background-color:#0000004d;border-radius:2px}.element-dialog.el-dialog .dialog-header-button.el-icon-close:hover{background-color:#e34e55;border-radius:2px}.element-dialog.el-dialog .el-dialog__body{height:var(--dialog-body-height);flex:auto;min-height:40vh;padding:10px}.element-dialog.el-dialog .el-dialog__body.no-padding{padding:0}.element-dialog.el-dialog .el-dialog__footer{border-top:1px solid #dddee3;padding:10px}
|
package/flex-box/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/OEBJ-trG.mjs";
|
|
2
2
|
export { e as default };
|
package/flex-column/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/-
|
|
1
|
+
import { t as e } from "../chunks/-yfgKY3g.mjs";
|
|
2
2
|
export { e as default };
|
package/flex-item/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/DZCryyFG.mjs";
|
|
2
2
|
export { e as default };
|
package/flex-row/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/YdNYH25C.mjs";
|
|
2
2
|
export { e as default };
|
package/flex-scroller/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/CaczibeD.mjs";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, normalizeClass as r, openBlock as i, renderSlot as a } from "vue";
|
|
3
3
|
//#region src/components/flex-scroller/FlexScroller.vue
|
|
4
4
|
var o = {
|
package/flow-designer/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/QTy8g5MS.mjs";
|
|
2
2
|
export { e as default };
|