@web-utils/component 3.0.2 → 3.0.4
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 +14 -14
- package/chat/index.mjs +39 -40
- package/chunk-file-uploader/index.mjs +35 -594
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/FormTemp.d079292b.mjs +139 -0
- package/chunks/{dataformat.816df805.mjs → dataformat.e655611c.mjs} +6 -6
- package/chunks/detail.d6f8e347.mjs +29 -0
- package/chunks/{dic.3b4ba802.mjs → dic.eaac0823.mjs} +40 -40
- package/chunks/{event.4377230d.mjs → event.10295951.mjs} +2 -2
- package/chunks/form-input-mixin.78a567bc.mjs +24 -0
- package/chunks/form-item-mixin.57cb2019.mjs +140 -0
- package/chunks/{index.d91bd77a.mjs → index.57f871af.mjs} +7 -7
- package/chunks/{init.f0a03127.mjs → init.47f219b4.mjs} +2 -2
- package/chunks/input-number-mixin.41a066be.mjs +60 -0
- package/chunks/{util.7844e2c2.mjs → util.ae730cde.mjs} +21 -21
- package/count-up/index.mjs +17 -14
- package/data-box/index.mjs +18 -19
- package/data-display/index.mjs +17 -18
- package/data-icons/index.mjs +16 -17
- package/data-panel/index.mjs +20 -21
- package/data-pay/index.mjs +15 -16
- package/data-progress/index.mjs +19 -20
- package/data-rotate/index.mjs +35 -36
- package/data-table-picker/index.mjs +23 -25
- package/data-tabs/index.mjs +15 -16
- package/dialog-form/index.mjs +24 -28
- package/dynamic-table/index.mjs +34 -35
- package/easy-popup/index.mjs +56 -29
- package/editable-tree/index.mjs +485 -134
- package/element-dialog/index.mjs +127 -37
- package/empty-view/index.mjs +31 -13
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow/index.mjs +40 -105
- package/flow-designer/index.mjs +555 -615
- package/flow-node/index.mjs +47 -15
- package/flow-viewer/index.mjs +78 -167
- package/form-cascader/index.mjs +24 -24
- package/form-checkbox-group/index.mjs +35 -79
- package/form-date-picker/index.mjs +22 -22
- package/form-holder/index.mjs +1 -1
- package/form-input/index.mjs +86 -28
- package/form-input-email/index.mjs +18 -18
- package/form-input-id-card/index.mjs +27 -27
- package/form-input-number/index.mjs +59 -219
- package/form-input-phone-number/index.mjs +27 -27
- package/form-input-tag/index.mjs +38 -160
- package/form-input-time/index.mjs +16 -16
- package/form-item/index.mjs +146 -15
- package/form-item-group/index.mjs +164 -14
- package/form-radio-group/index.mjs +41 -41
- package/form-select/index.mjs +20 -20
- package/form-switch/index.mjs +19 -19
- package/form-textarea/index.mjs +29 -29
- package/form-view/index.mjs +42 -46
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +15 -15
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +2821 -210
- package/fy-date/index.mjs +59 -17
- package/fy-draggable/index.mjs +1 -1
- package/fy-dynamic/index.mjs +208 -64
- package/fy-empty/index.mjs +29 -12
- package/fy-form/index.mjs +743 -178
- package/fy-form-design/index.mjs +1013 -1540
- package/fy-input/index.mjs +105 -17
- package/fy-input-color/index.mjs +67 -16
- package/fy-input-icon/index.mjs +119 -23
- package/fy-input-map/index.mjs +14 -15
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +19 -21
- package/fy-input-tree/index.mjs +3 -3
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +50 -16
- package/fy-select/index.mjs +126 -29
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +51 -15
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +23 -25
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +2 -2
- package/highlight-j-s/index.mjs +29 -19
- package/icon-temp/index.mjs +30 -12
- package/iframe-window/index.mjs +18 -19
- package/image-cropper/index.mjs +22 -23
- package/image-preview/index.mjs +1 -1
- package/input-number/index.mjs +173 -63
- package/license/index.mjs +1 -1
- package/loading-view/index.mjs +33 -15
- package/login/index.mjs +1 -1
- package/nav-bar/index.mjs +31 -15
- package/package.json +1 -1
- package/page/index.mjs +20 -12
- package/page-header/index.mjs +34 -13
- package/page-index-top/index.mjs +53 -100
- package/page-skeleton/index.mjs +35 -18
- package/page-skeleton-new/index.mjs +15 -16
- package/pageable-table/index.mjs +228 -86
- package/pageable-view/index.mjs +1 -1
- package/present-view/index.mjs +71 -75
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +29 -21
- package/search/index.mjs +9 -9
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/split-pane/index.mjs +45 -40
- package/swiper/index.mjs +13 -14
- package/table-view/index.mjs +97 -631
- package/text-ellipsis/index.mjs +1 -1
- package/tinymce-editor/index.mjs +63 -63
- package/toolbar/index.mjs +208 -15
- package/toolbar-button/index.mjs +56 -30
- package/verify/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +118 -49
- package/chunks/CountUp.f1a19f35.mjs +0 -124
- package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +0 -8
- package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +0 -32
- package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +0 -356
- package/chunks/ElementDialog.d8f3105c.mjs +0 -211
- package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +0 -95
- package/chunks/EmptyView.e2430422.mjs +0 -51
- package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +0 -23
- package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +0 -37
- package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +0 -65
- package/chunks/FormItem.2920ac0c.mjs +0 -45
- package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +0 -258
- package/chunks/FormItemGroup.41daddb6.mjs +0 -64
- package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +0 -155
- package/chunks/FyCurd.8acd2983.mjs +0 -548
- package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +0 -2945
- package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +0 -47
- package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +0 -151
- package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +0 -22
- package/chunks/FyForm.0294e494.mjs +0 -439
- package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +0 -737
- package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +0 -93
- package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +0 -56
- package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +0 -158
- package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +0 -39
- package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +0 -102
- package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +0 -41
- package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +0 -15
- package/chunks/IconTemp.42c48e1f.mjs +0 -32
- package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +0 -23
- package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +0 -172
- package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +0 -23
- package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +0 -21
- package/chunks/Page.81f4b8d9.mjs +0 -32
- package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +0 -13
- package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +0 -26
- package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +0 -88
- package/chunks/PageableTable.333cbdc1.mjs +0 -335
- package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +0 -148
- package/chunks/ResizeObserver.60f728f0.mjs +0 -54
- package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +0 -13
- package/chunks/TableColumn.8503272e.mjs +0 -106
- package/chunks/Toolbar.5c539dbb.mjs +0 -24
- package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +0 -275
- package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +0 -31
- package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +0 -74
package/editable-tree/index.mjs
CHANGED
|
@@ -1,38 +1,389 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var b = Object.defineProperty, k = Object.defineProperties;
|
|
2
|
+
var B = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var w = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
4
|
+
var T = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var N = (e, i, t) => i in e ? b(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, h = (e, i) => {
|
|
6
|
+
for (var t in i || (i = {}))
|
|
7
|
+
T.call(i, t) && N(e, t, i[t]);
|
|
8
8
|
if (w)
|
|
9
|
-
for (var
|
|
10
|
-
M.call(
|
|
9
|
+
for (var t of w(i))
|
|
10
|
+
M.call(i, t) && N(e, t, i[t]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var r = (e,
|
|
14
|
-
var
|
|
12
|
+
}, u = (e, i) => k(e, B(i));
|
|
13
|
+
var r = (e, i, t) => new Promise((s, a) => {
|
|
14
|
+
var o = (c) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
a(
|
|
16
|
+
l(t.next(c));
|
|
17
|
+
} catch (m) {
|
|
18
|
+
a(m);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, n = (c) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
a(
|
|
22
|
+
l(t.throw(c));
|
|
23
|
+
} catch (m) {
|
|
24
|
+
a(m);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, l = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(o, n);
|
|
27
|
+
l((t = t.apply(e, i)).next());
|
|
28
28
|
});
|
|
29
|
-
import { hasOwn as
|
|
30
|
-
import { addResizeListener as
|
|
31
|
-
import { cloneDeep as
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
|
|
29
|
+
import { hasOwn as y, isVerticalScrollbarVisible as K, scrollbarWidth as P, computePosition as D, isPlainObject as p, isFunction as C, isUndefined as f, isNotEmpty as L, fastClone as R, delay as E, findTreeChildren as z } from "@web-utils/core";
|
|
30
|
+
import { addResizeListener as g, removeResizeListener as v } from "@web-utils/integrations/resize";
|
|
31
|
+
import { cloneDeep as $ } from "@web-utils/integrations/lodash";
|
|
32
|
+
import { a as S, b as V, c as x } from "../chunks/index.57f871af.mjs";
|
|
33
|
+
import d from "element-ui/lib/button";
|
|
34
|
+
import A from "element-ui/lib/input";
|
|
35
|
+
import I from "element-ui/lib/popconfirm";
|
|
36
|
+
import O from "element-ui/lib/tree";
|
|
37
|
+
import { n as F } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
38
|
+
var j = function() {
|
|
39
|
+
var e = this, i = e.$createElement, t = e._self._c || i;
|
|
40
|
+
return t("div", {
|
|
41
|
+
staticClass: "editable-tree"
|
|
42
|
+
}, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? t(d, {
|
|
43
|
+
staticStyle: {
|
|
44
|
+
position: "absolute",
|
|
45
|
+
top: "4px",
|
|
46
|
+
"z-index": "1"
|
|
47
|
+
},
|
|
48
|
+
style: {
|
|
49
|
+
right: `${e.right}px`
|
|
50
|
+
},
|
|
51
|
+
attrs: {
|
|
52
|
+
type: "primary",
|
|
53
|
+
size: "mini",
|
|
54
|
+
icon: "el-icon-plus",
|
|
55
|
+
circle: "",
|
|
56
|
+
plain: ""
|
|
57
|
+
},
|
|
58
|
+
on: {
|
|
59
|
+
click: function(s) {
|
|
60
|
+
return s.stopPropagation(), e.$emit("add-root-node");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}) : e._e(), t("div", {
|
|
64
|
+
ref: "treeWrapper",
|
|
65
|
+
staticClass: "et-tree-wrapper"
|
|
66
|
+
}, [!e.readonly && e.addRootNodeButtonStyle === "top" ? t("div", {
|
|
67
|
+
staticStyle: {
|
|
68
|
+
"padding-left": "24px"
|
|
69
|
+
}
|
|
70
|
+
}, [t(d, {
|
|
71
|
+
attrs: {
|
|
72
|
+
disabled: e.loading,
|
|
73
|
+
size: "mini",
|
|
74
|
+
type: "text"
|
|
75
|
+
},
|
|
76
|
+
on: {
|
|
77
|
+
click: e.appendRootNode
|
|
78
|
+
}
|
|
79
|
+
}, [t("i", {
|
|
80
|
+
staticClass: "el-icon-lx-add"
|
|
81
|
+
}), e._v(" " + e._s(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`) + " ")])], 1) : e._e(), t(O, e._g(e._b({
|
|
82
|
+
key: e.treeKey,
|
|
83
|
+
ref: "tree",
|
|
84
|
+
staticClass: "flex-item",
|
|
85
|
+
attrs: {
|
|
86
|
+
"default-expanded-keys": e.expandedKeys,
|
|
87
|
+
"expand-on-click-node": !1,
|
|
88
|
+
"highlight-current": "",
|
|
89
|
+
load: e.loadNode,
|
|
90
|
+
data: e.innerTreeData,
|
|
91
|
+
props: e.treeProps,
|
|
92
|
+
lazy: e.lazy,
|
|
93
|
+
"node-key": e.nodeKey
|
|
94
|
+
},
|
|
95
|
+
on: {
|
|
96
|
+
"node-click": e.nodeClick,
|
|
97
|
+
"node-contextmenu": e.showContextMenu,
|
|
98
|
+
"node-expand": e.addExpandKey,
|
|
99
|
+
"node-collapse": e.removeExpandKey
|
|
100
|
+
},
|
|
101
|
+
scopedSlots: e._u([{
|
|
102
|
+
key: "default",
|
|
103
|
+
fn: function(s) {
|
|
104
|
+
var a = s.node, o = s.data;
|
|
105
|
+
return [e._t("default", function() {
|
|
106
|
+
return [o.edit ? [t("span", {
|
|
107
|
+
staticClass: "custom-tree-node flex-row flex-item oh",
|
|
108
|
+
attrs: {
|
|
109
|
+
"data-id": o.id
|
|
110
|
+
}
|
|
111
|
+
}, [e.icon ? t("i", {
|
|
112
|
+
staticClass: "node-icon shrink-0",
|
|
113
|
+
class: o.loading ? "el-icon-loading" : "el-icon-edit-outline"
|
|
114
|
+
}) : e._e(), t(A, {
|
|
115
|
+
ref: "labelTxt",
|
|
116
|
+
staticClass: "node-input flex-item",
|
|
117
|
+
attrs: {
|
|
118
|
+
size: "mini",
|
|
119
|
+
placeholder: e.defaultOptions.inputPlaceholder
|
|
120
|
+
},
|
|
121
|
+
on: {
|
|
122
|
+
blur: function(n) {
|
|
123
|
+
return e.inputBlur(n, a, o);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
nativeOn: {
|
|
127
|
+
keyup: function(n) {
|
|
128
|
+
return function(l) {
|
|
129
|
+
return e.inputKeyup(l, a, o);
|
|
130
|
+
}.apply(null, arguments);
|
|
131
|
+
},
|
|
132
|
+
click: function(n) {
|
|
133
|
+
n.stopPropagation();
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
model: {
|
|
137
|
+
value: e.text,
|
|
138
|
+
callback: function(n) {
|
|
139
|
+
e.text = n;
|
|
140
|
+
},
|
|
141
|
+
expression: "text"
|
|
142
|
+
}
|
|
143
|
+
}), e.confirmButton ? [t(d, {
|
|
144
|
+
directives: [{
|
|
145
|
+
name: "show",
|
|
146
|
+
rawName: "v-show",
|
|
147
|
+
value: !o.loading,
|
|
148
|
+
expression: "!data.loading"
|
|
149
|
+
}],
|
|
150
|
+
staticClass: "shrink-0",
|
|
151
|
+
attrs: {
|
|
152
|
+
size: "mini",
|
|
153
|
+
type: "text"
|
|
154
|
+
},
|
|
155
|
+
on: {
|
|
156
|
+
click: function(n) {
|
|
157
|
+
return n.stopPropagation(), e.onConfirm(a, o);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}, [e._v("确定")]), t(d, {
|
|
161
|
+
directives: [{
|
|
162
|
+
name: "show",
|
|
163
|
+
rawName: "v-show",
|
|
164
|
+
value: !o.loading,
|
|
165
|
+
expression: "!data.loading"
|
|
166
|
+
}],
|
|
167
|
+
staticClass: "shrink-0",
|
|
168
|
+
attrs: {
|
|
169
|
+
size: "mini",
|
|
170
|
+
type: "text"
|
|
171
|
+
},
|
|
172
|
+
on: {
|
|
173
|
+
click: function(n) {
|
|
174
|
+
return n.stopPropagation(), e.onCancel(a, o);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}, [e._v("取消")])] : e._e()], 2)] : [t("span", {
|
|
178
|
+
staticClass: "custom-tree-node",
|
|
179
|
+
attrs: {
|
|
180
|
+
"data-id": o.id
|
|
181
|
+
}
|
|
182
|
+
}, [t("span", {
|
|
183
|
+
staticClass: "node-label flex-row flex-item oh ellipsis-1"
|
|
184
|
+
}, [e.icon ? t("i", {
|
|
185
|
+
staticClass: "node-icon",
|
|
186
|
+
class: o.loading ? "el-icon-loading" : e.icon(o, a)
|
|
187
|
+
}) : e._e(), t("span", {
|
|
188
|
+
staticClass: "flex-item-relative",
|
|
189
|
+
staticStyle: {
|
|
190
|
+
height: "21px"
|
|
191
|
+
}
|
|
192
|
+
}, [t("span", {
|
|
193
|
+
staticClass: "ellipsis-1 absolute-box et-tree-label",
|
|
194
|
+
attrs: {
|
|
195
|
+
title: a.label
|
|
196
|
+
}
|
|
197
|
+
}, [e._t("label", function() {
|
|
198
|
+
return [e._v(e._s(a.label))];
|
|
199
|
+
}, {
|
|
200
|
+
data: o,
|
|
201
|
+
node: a
|
|
202
|
+
})], 2)]), e._t("label-suffix", null, {
|
|
203
|
+
node: a,
|
|
204
|
+
data: o
|
|
205
|
+
})], 2), !e.contextMenu && !e.readonly ? t("span", {
|
|
206
|
+
directives: [{
|
|
207
|
+
name: "show",
|
|
208
|
+
rawName: "v-show",
|
|
209
|
+
value: !o.loading && !e.loading,
|
|
210
|
+
expression: "!data.loading && !loading"
|
|
211
|
+
}],
|
|
212
|
+
staticClass: "handle-actions"
|
|
213
|
+
}, [t(d, {
|
|
214
|
+
attrs: {
|
|
215
|
+
size: "mini",
|
|
216
|
+
type: "text"
|
|
217
|
+
},
|
|
218
|
+
on: {
|
|
219
|
+
click: function(n) {
|
|
220
|
+
return n.stopPropagation(), e.appendChildNode(a, o);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}, [e._v("添加")]), t(d, {
|
|
224
|
+
attrs: {
|
|
225
|
+
size: "mini",
|
|
226
|
+
type: "text"
|
|
227
|
+
},
|
|
228
|
+
on: {
|
|
229
|
+
click: function(n) {
|
|
230
|
+
return n.stopPropagation(), e.editNode(a, o);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}, [e._v("修改")]), t(I, {
|
|
234
|
+
staticClass: "pop-confirm",
|
|
235
|
+
attrs: {
|
|
236
|
+
"icon-color": "red",
|
|
237
|
+
title: "你确定要删除吗?"
|
|
238
|
+
},
|
|
239
|
+
on: {
|
|
240
|
+
confirm: function(n) {
|
|
241
|
+
return e.removeNode(a, o);
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
scopedSlots: e._u([{
|
|
245
|
+
key: "reference",
|
|
246
|
+
fn: function() {
|
|
247
|
+
return [t(d, {
|
|
248
|
+
directives: [{
|
|
249
|
+
name: "show",
|
|
250
|
+
rawName: "v-show",
|
|
251
|
+
value: a.isLeaf,
|
|
252
|
+
expression: "node.isLeaf"
|
|
253
|
+
}],
|
|
254
|
+
staticStyle: {
|
|
255
|
+
"margin-left": "4px"
|
|
256
|
+
},
|
|
257
|
+
attrs: {
|
|
258
|
+
size: "mini",
|
|
259
|
+
type: "text"
|
|
260
|
+
},
|
|
261
|
+
on: {
|
|
262
|
+
click: function(n) {
|
|
263
|
+
n.stopPropagation();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}, [e._v("删除")])];
|
|
267
|
+
},
|
|
268
|
+
proxy: !0
|
|
269
|
+
}], null, !0)
|
|
270
|
+
})], 1) : e._e(), e.contextMenuIcon && e.contextMenu && !e.readonly ? t("span", {
|
|
271
|
+
directives: [{
|
|
272
|
+
name: "show",
|
|
273
|
+
rawName: "v-show",
|
|
274
|
+
value: !o.loading && !e.loading,
|
|
275
|
+
expression: "!data.loading && !loading"
|
|
276
|
+
}],
|
|
277
|
+
staticClass: "handle-actions",
|
|
278
|
+
staticStyle: {
|
|
279
|
+
display: "inline-block"
|
|
280
|
+
}
|
|
281
|
+
}, [t(d, {
|
|
282
|
+
staticStyle: {
|
|
283
|
+
padding: "6px 10px 0"
|
|
284
|
+
},
|
|
285
|
+
attrs: {
|
|
286
|
+
size: "mini",
|
|
287
|
+
type: "text"
|
|
288
|
+
},
|
|
289
|
+
on: {
|
|
290
|
+
click: function(n) {
|
|
291
|
+
return n.stopPropagation(), e.showContextMenu(n, o, a);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}, [e._v(". . .")])], 1) : e._e()])]];
|
|
295
|
+
}, {
|
|
296
|
+
node: a,
|
|
297
|
+
data: o
|
|
298
|
+
})];
|
|
299
|
+
}
|
|
300
|
+
}], null, !0)
|
|
301
|
+
}, "ElTree", e.filterTreeProperties(e.$attrs), !1), e.filterTreeEvents(e.$listeners))), e.contextMenu && !e.readonly ? t("div", {
|
|
302
|
+
directives: [{
|
|
303
|
+
name: "show",
|
|
304
|
+
rawName: "v-show",
|
|
305
|
+
value: e.showMenu,
|
|
306
|
+
expression: "showMenu"
|
|
307
|
+
}],
|
|
308
|
+
ref: "contextMenu",
|
|
309
|
+
staticClass: "menu",
|
|
310
|
+
style: e.position
|
|
311
|
+
}, [t("ul", {
|
|
312
|
+
staticClass: "menu-list"
|
|
313
|
+
}, [e._t("context-menu", function() {
|
|
314
|
+
return [t("li", {
|
|
315
|
+
directives: [{
|
|
316
|
+
name: "show",
|
|
317
|
+
rawName: "v-show",
|
|
318
|
+
value: e.curData.id > -1,
|
|
319
|
+
expression: "curData.id > -1"
|
|
320
|
+
}],
|
|
321
|
+
staticClass: "menu-item",
|
|
322
|
+
on: {
|
|
323
|
+
click: function(s) {
|
|
324
|
+
return e.appendPeerNode(e.curNode, e.curData);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}, [t("i", {
|
|
328
|
+
staticClass: "menu-item-icon el-icon-lx-add",
|
|
329
|
+
staticStyle: {
|
|
330
|
+
color: "#228b22"
|
|
331
|
+
}
|
|
332
|
+
}), e._v(e._s(e.menuLabel.appendPeer) + " ")]), t("li", {
|
|
333
|
+
staticClass: "menu-item",
|
|
334
|
+
on: {
|
|
335
|
+
click: function(s) {
|
|
336
|
+
return e.appendChildNode(e.curNode, e.curData);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}, [t("i", {
|
|
340
|
+
staticClass: "menu-item-icon el-icon-lx-add",
|
|
341
|
+
staticStyle: {
|
|
342
|
+
color: "#228b22"
|
|
343
|
+
}
|
|
344
|
+
}), e._v(e._s(e.menuLabel.appendChild) + " ")]), t("li", {
|
|
345
|
+
directives: [{
|
|
346
|
+
name: "show",
|
|
347
|
+
rawName: "v-show",
|
|
348
|
+
value: e.curData.id > -1,
|
|
349
|
+
expression: "curData.id > -1"
|
|
350
|
+
}],
|
|
351
|
+
staticClass: "menu-item",
|
|
352
|
+
on: {
|
|
353
|
+
click: function(s) {
|
|
354
|
+
return e.editNode(e.curNode, e.curData);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}, [t("i", {
|
|
358
|
+
staticClass: "menu-item-icon el-icon-edit-outline",
|
|
359
|
+
staticStyle: {
|
|
360
|
+
color: "#ffa500"
|
|
361
|
+
}
|
|
362
|
+
}), e._v(e._s(e.menuLabel.editNode) + " ")]), t("li", {
|
|
363
|
+
directives: [{
|
|
364
|
+
name: "show",
|
|
365
|
+
rawName: "v-show",
|
|
366
|
+
value: e.curNode.isLeaf,
|
|
367
|
+
expression: "curNode.isLeaf"
|
|
368
|
+
}],
|
|
369
|
+
staticClass: "menu-item",
|
|
370
|
+
on: {
|
|
371
|
+
click: function(s) {
|
|
372
|
+
return e.removeNodeModal(e.curNode, e.curData);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}, [t("i", {
|
|
376
|
+
staticClass: "menu-item-icon el-icon-delete",
|
|
377
|
+
staticStyle: {
|
|
378
|
+
color: "#f00"
|
|
379
|
+
}
|
|
380
|
+
}), e._v(e._s(e.menuLabel.removeNode) + " ")])];
|
|
381
|
+
}, {
|
|
382
|
+
curNode: e.curNode,
|
|
383
|
+
curData: e.curData
|
|
384
|
+
})], 2)]) : e._e()], 1)], 1);
|
|
385
|
+
}, W = [];
|
|
386
|
+
const q = {
|
|
36
387
|
name: "EditableTree",
|
|
37
388
|
props: {
|
|
38
389
|
label: {
|
|
@@ -48,9 +399,9 @@ const O = {
|
|
|
48
399
|
},
|
|
49
400
|
newNodeBuilder: {
|
|
50
401
|
type: Function,
|
|
51
|
-
default: (e,
|
|
402
|
+
default: (e, i) => ({
|
|
52
403
|
name: e,
|
|
53
|
-
parentId:
|
|
404
|
+
parentId: i.id
|
|
54
405
|
})
|
|
55
406
|
},
|
|
56
407
|
contextMenu: Boolean,
|
|
@@ -91,7 +442,7 @@ const O = {
|
|
|
91
442
|
default: () => ({
|
|
92
443
|
children: "children",
|
|
93
444
|
label: "name",
|
|
94
|
-
isLeaf: (e) =>
|
|
445
|
+
isLeaf: (e) => y(e, "hasChildren") ? !e.hasChildren : y(e, "hasChild") ? !e.hasChild : y(e, "children") && e.children ? e.children.length === 0 : !0
|
|
95
446
|
})
|
|
96
447
|
},
|
|
97
448
|
menuLabel: {
|
|
@@ -165,26 +516,26 @@ const O = {
|
|
|
165
516
|
this.tryFetch();
|
|
166
517
|
},
|
|
167
518
|
mounted() {
|
|
168
|
-
|
|
519
|
+
g(this.$refs.tree.$el, this.resize), g(this.$refs.treeWrapper, this.resize);
|
|
169
520
|
},
|
|
170
521
|
beforeDestroy() {
|
|
171
|
-
|
|
522
|
+
v(this.$refs.tree.$el, this.resize), v(this.$refs.treeWrapper, this.resize);
|
|
172
523
|
},
|
|
173
524
|
methods: {
|
|
174
|
-
filterTreeProperties:
|
|
175
|
-
filterTreeEvents:
|
|
525
|
+
filterTreeProperties: S,
|
|
526
|
+
filterTreeEvents: V,
|
|
176
527
|
addExpandKey(e) {
|
|
177
528
|
this.reserveExpandKey && this.expandedKeys.push(e[this.nodeKey]);
|
|
178
529
|
},
|
|
179
530
|
removeExpandKey(e) {
|
|
180
|
-
this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((
|
|
531
|
+
this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((i) => i !== e[this.nodeKey]));
|
|
181
532
|
},
|
|
182
533
|
resize() {
|
|
183
|
-
|
|
534
|
+
K(this.$refs.treeWrapper) ? this.right = 4 + P : this.right = 4;
|
|
184
535
|
},
|
|
185
|
-
showContextMenu(e,
|
|
536
|
+
showContextMenu(e, i, t) {
|
|
186
537
|
return r(this, null, function* () {
|
|
187
|
-
|
|
538
|
+
i.contextmenu === !1 || i.id === -1 || i.id === 0 || i.edit === !0 || this.contextMenu && (this.curNode = t, this.curData = i, this.showMenu = !0, this.$refs.tree.setCurrentKey(i.id), yield this.$nextTick(), this.position = D(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
|
|
188
539
|
});
|
|
189
540
|
},
|
|
190
541
|
hideContextMenu() {
|
|
@@ -192,39 +543,39 @@ const O = {
|
|
|
192
543
|
},
|
|
193
544
|
tryFetch() {
|
|
194
545
|
return r(this, null, function* () {
|
|
195
|
-
var e,
|
|
546
|
+
var e, i;
|
|
196
547
|
if (this.lazy === !1 && this.fetchApi) {
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
const s =
|
|
200
|
-
s[this.treeProps.children || "children"] =
|
|
201
|
-
} else if (
|
|
202
|
-
const s = this.customRootNode(
|
|
203
|
-
s[this.treeProps.children || "children"] =
|
|
548
|
+
const t = yield this.fetchApi((i = (e = this.rootNode) == null ? void 0 : e.id) != null ? i : -1, {});
|
|
549
|
+
if (p(t.data) && (t.data = [t.data]), t.data = t.data || [], this.empty = t.data.length === 0, p(this.customRootNode)) {
|
|
550
|
+
const s = $(this.customRootNode);
|
|
551
|
+
s[this.treeProps.children || "children"] = t.data, this.treeData = [s];
|
|
552
|
+
} else if (C(this.customRootNode)) {
|
|
553
|
+
const s = this.customRootNode(t.data);
|
|
554
|
+
s[this.treeProps.children || "children"] = t.data, this.treeData = p(s) ? [s] : s;
|
|
204
555
|
} else
|
|
205
|
-
this.treeData =
|
|
556
|
+
this.treeData = t.data;
|
|
206
557
|
}
|
|
207
558
|
});
|
|
208
559
|
},
|
|
209
|
-
loadNode(e,
|
|
560
|
+
loadNode(e, i) {
|
|
210
561
|
return r(this, null, function* () {
|
|
211
|
-
var
|
|
562
|
+
var t, s, a, o;
|
|
212
563
|
if (e.level === 0) {
|
|
213
|
-
const
|
|
214
|
-
if (this.empty =
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
} else if (
|
|
218
|
-
const
|
|
219
|
-
|
|
564
|
+
const n = yield this.fetchApi((s = (t = this.rootNode) == null ? void 0 : t.id) != null ? s : -1, e);
|
|
565
|
+
if (this.empty = n.data.length === 0, p(this.customRootNode)) {
|
|
566
|
+
const l = $(this.customRootNode);
|
|
567
|
+
l[this.treeProps.children || "children"] = n.data, i([l]);
|
|
568
|
+
} else if (C(this.customRootNode)) {
|
|
569
|
+
const l = this.customRootNode(n.data);
|
|
570
|
+
l[this.treeProps.children || "children"] = n.data, this.treeData = p(l) ? [l] : l;
|
|
220
571
|
} else
|
|
221
|
-
|
|
222
|
-
yield this.$nextTick(), this.$emit("root-node-loaded",
|
|
572
|
+
i(n.data);
|
|
573
|
+
yield this.$nextTick(), this.$emit("root-node-loaded", n.data), this.defaultExpandedKeys ? this.expandedKeys = [(a = n == null ? void 0 : n.data[0]) == null ? void 0 : a.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(o = n == null ? void 0 : n.data[0]) == null ? void 0 : o.id]);
|
|
223
574
|
} else {
|
|
224
575
|
if (e.leaf || e.data.isTempNode)
|
|
225
|
-
return
|
|
226
|
-
const
|
|
227
|
-
|
|
576
|
+
return i([]);
|
|
577
|
+
const n = yield this.fetchApi(e.data.id, e);
|
|
578
|
+
i(n.data), yield this.$nextTick(), this.$emit("node-loaded", n.data);
|
|
228
579
|
}
|
|
229
580
|
});
|
|
230
581
|
},
|
|
@@ -240,72 +591,72 @@ const O = {
|
|
|
240
591
|
cancelEdit() {
|
|
241
592
|
this.editData && (f(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
|
|
242
593
|
},
|
|
243
|
-
editNode(e,
|
|
594
|
+
editNode(e, i) {
|
|
244
595
|
return r(this, null, function* () {
|
|
245
|
-
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData =
|
|
246
|
-
inputValue:
|
|
247
|
-
beforeClose: (
|
|
248
|
-
if (
|
|
596
|
+
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = i, this.text = i[this.treeProps.label], f(i.edit) ? this.$set(i, "edit", !0) : i.edit = !0, yield this.$nextTick(), this.$refs.labelTxt.focus()) : yield this.$prompt(`请输入新的${this.label}名:`, u(h({}, this.defaultOptions), {
|
|
597
|
+
inputValue: i[this.treeProps.label],
|
|
598
|
+
beforeClose: (t, s, a) => r(this, null, function* () {
|
|
599
|
+
if (t === "confirm") {
|
|
249
600
|
try {
|
|
250
601
|
s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...", this.text = s.inputValue, yield this.onConfirm(this.curNode, this.curData), a();
|
|
251
|
-
} catch (
|
|
602
|
+
} catch (o) {
|
|
252
603
|
s.confirmButtonText = "确定";
|
|
253
604
|
}
|
|
254
605
|
s.confirmButtonLoading = !1;
|
|
255
606
|
} else
|
|
256
607
|
a();
|
|
257
608
|
})
|
|
258
|
-
})).catch((
|
|
609
|
+
})).catch((t) => t);
|
|
259
610
|
});
|
|
260
611
|
},
|
|
261
612
|
appendRootNode() {
|
|
262
613
|
return r(this, null, function* () {
|
|
263
|
-
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), yield this.scrollIntoView(!0)) : yield this.$prompt(`请输入${this.label}名:`,
|
|
264
|
-
beforeClose: (e,
|
|
614
|
+
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), yield this.scrollIntoView(!0)) : yield this.$prompt(`请输入${this.label}名:`, u(h({}, this.defaultOptions), {
|
|
615
|
+
beforeClose: (e, i, t) => r(this, null, function* () {
|
|
265
616
|
if (e === "confirm") {
|
|
266
617
|
try {
|
|
267
|
-
this.createNewChild(-1),
|
|
268
|
-
const s = yield this.saveApi(this.newNodeBuilder(
|
|
269
|
-
this.newChild[this.treeProps.label] =
|
|
618
|
+
this.createNewChild(-1), i.confirmButtonLoading = !0, i.confirmButtonText = "处理中...";
|
|
619
|
+
const s = yield this.saveApi(this.newNodeBuilder(i.inputValue, { id: -1 }));
|
|
620
|
+
this.newChild[this.treeProps.label] = i.inputValue, this.newChild.edit = !1, x(this.newChild, s.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), yield this.locateView(), t();
|
|
270
621
|
} catch (s) {
|
|
271
|
-
|
|
622
|
+
i.confirmButtonText = "确定";
|
|
272
623
|
}
|
|
273
|
-
|
|
624
|
+
i.confirmButtonLoading = !1;
|
|
274
625
|
} else
|
|
275
|
-
|
|
626
|
+
t();
|
|
276
627
|
})
|
|
277
628
|
})).catch((e) => e);
|
|
278
629
|
});
|
|
279
630
|
},
|
|
280
631
|
appendChildNode(e) {
|
|
281
632
|
this.text = "";
|
|
282
|
-
const
|
|
633
|
+
const i = e.expanded;
|
|
283
634
|
e.expand(() => r(this, null, function* () {
|
|
284
|
-
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(e.data.id), this.$refs.tree.append(this.newChild, e), yield this.scrollIntoView(
|
|
285
|
-
beforeClose: (
|
|
286
|
-
if (
|
|
635
|
+
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(e.data.id), this.$refs.tree.append(this.newChild, e), yield this.scrollIntoView(i)) : yield this.$prompt(`请输入${this.label}名:`, u(h({}, this.defaultOptions), {
|
|
636
|
+
beforeClose: (t, s, a) => r(this, null, function* () {
|
|
637
|
+
if (t === "confirm") {
|
|
287
638
|
try {
|
|
288
639
|
this.createNewChild(e.data.id), s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...";
|
|
289
|
-
const
|
|
290
|
-
this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1,
|
|
291
|
-
} catch (
|
|
640
|
+
const o = yield this.saveApi(this.newNodeBuilder(s.inputValue, e.data));
|
|
641
|
+
this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1, x(this.newChild, o.data), this.$refs.tree.append(this.newChild, e), yield this.locateView(), a();
|
|
642
|
+
} catch (o) {
|
|
292
643
|
s.confirmButtonText = "确定";
|
|
293
644
|
}
|
|
294
645
|
s.confirmButtonLoading = !1;
|
|
295
646
|
} else
|
|
296
647
|
a();
|
|
297
648
|
})
|
|
298
|
-
})).catch((
|
|
649
|
+
})).catch((t) => t);
|
|
299
650
|
}));
|
|
300
651
|
},
|
|
301
|
-
appendChildNodeWithData(e,
|
|
652
|
+
appendChildNodeWithData(e, i, t) {
|
|
302
653
|
this.text = "";
|
|
303
654
|
const s = e.expanded;
|
|
304
655
|
e.expand(() => r(this, null, function* () {
|
|
305
656
|
this.clear(), this.newChild = {
|
|
306
657
|
id: -1,
|
|
307
|
-
parentId:
|
|
308
|
-
[this.treeProps.label]:
|
|
658
|
+
parentId: i,
|
|
659
|
+
[this.treeProps.label]: t,
|
|
309
660
|
edit: !1,
|
|
310
661
|
isTempNode: !0,
|
|
311
662
|
hasChildren: !1
|
|
@@ -335,8 +686,8 @@ const O = {
|
|
|
335
686
|
});
|
|
336
687
|
},
|
|
337
688
|
updateNode(e) {
|
|
338
|
-
const
|
|
339
|
-
|
|
689
|
+
const i = this.$refs.tree.getNode(e);
|
|
690
|
+
i && (i.data = e);
|
|
340
691
|
},
|
|
341
692
|
setCurrentKey(e) {
|
|
342
693
|
this.$refs.tree && this.$refs.tree.setCurrentKey(e);
|
|
@@ -364,59 +715,59 @@ const O = {
|
|
|
364
715
|
closeOnClickModal: !1,
|
|
365
716
|
confirmButtonClass: "el-button--danger",
|
|
366
717
|
cancelButtonClass: "el-button--primary is-plain",
|
|
367
|
-
beforeClose: (
|
|
368
|
-
if (
|
|
718
|
+
beforeClose: (i, t, s) => r(this, null, function* () {
|
|
719
|
+
if (i === "confirm") {
|
|
369
720
|
try {
|
|
370
|
-
|
|
371
|
-
const a = e.parent,
|
|
372
|
-
|
|
721
|
+
t.confirmButtonLoading = !0, t.confirmButtonText = "删除...";
|
|
722
|
+
const a = e.parent, o = yield this.deleteApi(e.data.id);
|
|
723
|
+
o.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", a, e.data), s()) : this.$message.error(o.message);
|
|
373
724
|
} catch (a) {
|
|
374
725
|
}
|
|
375
|
-
|
|
726
|
+
t.confirmButtonText = "确定", t.confirmButtonLoading = !1;
|
|
376
727
|
} else
|
|
377
728
|
s();
|
|
378
729
|
})
|
|
379
730
|
}
|
|
380
|
-
).catch((
|
|
731
|
+
).catch((i) => i);
|
|
381
732
|
});
|
|
382
733
|
},
|
|
383
734
|
removeNode(e) {
|
|
384
735
|
return r(this, null, function* () {
|
|
385
736
|
try {
|
|
386
|
-
const
|
|
737
|
+
const i = e.parent;
|
|
387
738
|
if (this.deleteApi) {
|
|
388
|
-
const
|
|
389
|
-
|
|
739
|
+
const t = yield this.deleteApi(e.data.id);
|
|
740
|
+
t.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", i, e.data)) : this.$message.error(t.message);
|
|
390
741
|
} else
|
|
391
742
|
this.$refs.tree.remove(e);
|
|
392
|
-
} catch (
|
|
743
|
+
} catch (i) {
|
|
393
744
|
}
|
|
394
745
|
});
|
|
395
746
|
},
|
|
396
|
-
onConfirm(e,
|
|
747
|
+
onConfirm(e, i) {
|
|
397
748
|
return r(this, null, function* () {
|
|
398
|
-
if (
|
|
749
|
+
if (i[this.treeProps.label] === this.text || !L(this.text)) {
|
|
399
750
|
this.clear();
|
|
400
751
|
return;
|
|
401
752
|
}
|
|
402
|
-
f(
|
|
753
|
+
f(i.loading) ? this.$set(i, "loading", !0) : i.loading = !0;
|
|
403
754
|
try {
|
|
404
|
-
if (this.loading = !0,
|
|
405
|
-
const
|
|
406
|
-
|
|
755
|
+
if (this.loading = !0, i.id === -1) {
|
|
756
|
+
const t = yield this.saveApi(this.newNodeBuilder(this.text, e.parent.data || { id: -1 })), s = R(i);
|
|
757
|
+
x(i, u(h({}, t.data), { isTempNode: !1 })), this.$emit("node-added", i, s, e), this.registerNode(e);
|
|
407
758
|
} else
|
|
408
|
-
yield this.updateApi(
|
|
409
|
-
|
|
410
|
-
} catch (
|
|
759
|
+
yield this.updateApi(u(h({}, i), { [this.treeProps.label]: this.text }));
|
|
760
|
+
i[this.treeProps.label] = this.text, i.edit = !1, this.$emit("node-updated", i, e), this.text = "";
|
|
761
|
+
} catch (t) {
|
|
411
762
|
}
|
|
412
|
-
|
|
763
|
+
i.loading = !1, this.loading = !1;
|
|
413
764
|
});
|
|
414
765
|
},
|
|
415
|
-
onCancel(e,
|
|
416
|
-
|
|
766
|
+
onCancel(e, i) {
|
|
767
|
+
i.id === -1 ? this.$refs.tree.remove(e) : i.edit = !1, this.text = "";
|
|
417
768
|
},
|
|
418
|
-
nodeClick(e,
|
|
419
|
-
this.hideContextMenu(), (f(e.loading) || !e.loading) && (this.curNode =
|
|
769
|
+
nodeClick(e, i, t) {
|
|
770
|
+
this.hideContextMenu(), (f(e.loading) || !e.loading) && (this.curNode = i, this.curData = e, this.$emit("on-node-click", e, i, t));
|
|
420
771
|
},
|
|
421
772
|
getCurrentNode() {
|
|
422
773
|
return this.$refs.tree.getCurrentNode();
|
|
@@ -430,15 +781,15 @@ const O = {
|
|
|
430
781
|
},
|
|
431
782
|
scrollIntoView(e) {
|
|
432
783
|
return r(this, null, function* () {
|
|
433
|
-
var
|
|
434
|
-
yield this.$nextTick(), e || (yield
|
|
784
|
+
var i, t;
|
|
785
|
+
yield this.$nextTick(), e || (yield E(300)), (t = (i = this.$refs) == null ? void 0 : i.labelTxt) == null || t.focus();
|
|
435
786
|
});
|
|
436
787
|
},
|
|
437
|
-
inputKeyup(e,
|
|
438
|
-
e.keyCode === 13 && this.onConfirm(
|
|
788
|
+
inputKeyup(e, i, t) {
|
|
789
|
+
e.keyCode === 13 && this.onConfirm(i, t), e.keyCode === 27 && this.clear();
|
|
439
790
|
},
|
|
440
|
-
inputBlur(e,
|
|
441
|
-
this.confirmButton || this.onConfirm(
|
|
791
|
+
inputBlur(e, i, t) {
|
|
792
|
+
this.confirmButton || this.onConfirm(i, t);
|
|
442
793
|
},
|
|
443
794
|
getCheckedKeys() {
|
|
444
795
|
return this.$refs.tree.getCheckedKeys();
|
|
@@ -459,9 +810,9 @@ const O = {
|
|
|
459
810
|
return this.$refs.tree.root;
|
|
460
811
|
},
|
|
461
812
|
findTreeNode(e) {
|
|
462
|
-
return
|
|
813
|
+
return z(
|
|
463
814
|
this.$refs.tree.root.childNodes,
|
|
464
|
-
(
|
|
815
|
+
(i) => i.data === e || i.data.id === e,
|
|
465
816
|
"childNodes"
|
|
466
817
|
);
|
|
467
818
|
},
|
|
@@ -474,24 +825,24 @@ const O = {
|
|
|
474
825
|
});
|
|
475
826
|
}
|
|
476
827
|
}
|
|
477
|
-
},
|
|
478
|
-
var
|
|
479
|
-
|
|
480
|
-
_,
|
|
481
|
-
F,
|
|
482
|
-
!1,
|
|
828
|
+
}, _ = {};
|
|
829
|
+
var U = /* @__PURE__ */ F(
|
|
830
|
+
q,
|
|
483
831
|
j,
|
|
832
|
+
W,
|
|
833
|
+
!1,
|
|
834
|
+
H,
|
|
484
835
|
null,
|
|
485
836
|
null,
|
|
486
837
|
null
|
|
487
838
|
);
|
|
488
|
-
function
|
|
489
|
-
for (let
|
|
490
|
-
this[
|
|
839
|
+
function H(e) {
|
|
840
|
+
for (let i in _)
|
|
841
|
+
this[i] = _[i];
|
|
491
842
|
}
|
|
492
|
-
const
|
|
493
|
-
return
|
|
843
|
+
const ne = /* @__PURE__ */ function() {
|
|
844
|
+
return U.exports;
|
|
494
845
|
}();
|
|
495
846
|
export {
|
|
496
|
-
|
|
847
|
+
ne as default
|
|
497
848
|
};
|