@web-utils/component 2.9.2 → 2.9.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/fy-input-tree/index.mjs +19 -17
- package/index.mjs +349 -342
- package/monaco-editor/index.mjs +2 -1
- package/package.json +1 -1
- package/vue-qr-code/index.mjs +83 -0
- package/vue-tree-select/index.mjs +2883 -0
- package/vue-tree-select/style.css +5 -0
- package/web-types.json +632 -1
package/fy-input-tree/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as u, e as h } from "../chunks/event.67cfd4fb.mjs";
|
|
2
|
-
import { isBlank as
|
|
2
|
+
import { isBlank as n } from "@web-utils/core";
|
|
3
3
|
import { n as p } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
4
4
|
var f = function() {
|
|
5
5
|
var e = this, t = e.$createElement, l = e._self._c || t;
|
|
@@ -25,7 +25,7 @@ var f = function() {
|
|
|
25
25
|
clear: e.handleClear
|
|
26
26
|
}
|
|
27
27
|
}, [e.filter ? l("div", {
|
|
28
|
-
staticClass: "avue-
|
|
28
|
+
staticClass: "avue-input-tree__filter"
|
|
29
29
|
}, [l("ElInput", {
|
|
30
30
|
attrs: {
|
|
31
31
|
size: "mini",
|
|
@@ -44,7 +44,7 @@ var f = function() {
|
|
|
44
44
|
}
|
|
45
45
|
}, [l("ElTree", {
|
|
46
46
|
ref: "tree",
|
|
47
|
-
staticClass: "avue-
|
|
47
|
+
staticClass: "avue-input-tree__select",
|
|
48
48
|
attrs: {
|
|
49
49
|
data: e.dicList,
|
|
50
50
|
lazy: e.lazy,
|
|
@@ -74,18 +74,20 @@ var f = function() {
|
|
|
74
74
|
fn: function(i) {
|
|
75
75
|
var s = i.data;
|
|
76
76
|
return [l("div", {
|
|
77
|
-
staticClass: "avue-
|
|
78
|
-
}, [e
|
|
77
|
+
staticClass: "avue-input-tree__item"
|
|
78
|
+
}, [e._t("default", function() {
|
|
79
|
+
return [l("span", {
|
|
80
|
+
class: {
|
|
81
|
+
"avue--disabled": s[e.disabledKey]
|
|
82
|
+
}
|
|
83
|
+
}, [e._v(e._s(s[e.labelKey]))]), s[e.descKey] ? l("span", {
|
|
84
|
+
staticClass: "avue-input-tree__desc"
|
|
85
|
+
}, [e._v(e._s(s[e.descKey]))]) : e._e()];
|
|
86
|
+
}, {
|
|
79
87
|
label: e.labelKey,
|
|
80
88
|
value: e.valueKey,
|
|
81
89
|
item: s
|
|
82
|
-
})
|
|
83
|
-
class: {
|
|
84
|
-
"avue--disabled": s[e.disabledKey]
|
|
85
|
-
}
|
|
86
|
-
}, [e._v(e._s(s[e.labelKey]))]), s[e.descKey] ? l("span", {
|
|
87
|
-
staticClass: "avue-input__desc"
|
|
88
|
-
}, [e._v(e._s(s[e.descKey]))]) : e._e()]], 2)];
|
|
90
|
+
})], 2)];
|
|
89
91
|
}
|
|
90
92
|
}], null, !0)
|
|
91
93
|
})], 1)], 1);
|
|
@@ -197,8 +199,8 @@ const m = {
|
|
|
197
199
|
},
|
|
198
200
|
handleTreeLoad(e, t) {
|
|
199
201
|
const l = (i) => {
|
|
200
|
-
const s = (
|
|
201
|
-
|
|
202
|
+
const s = (r, o, c) => {
|
|
203
|
+
r.forEach((a) => {
|
|
202
204
|
a[this.valueKey] === o ? a[this.childrenKey] = c : a[this.childrenKey] && s(a[this.childrenKey]);
|
|
203
205
|
});
|
|
204
206
|
};
|
|
@@ -210,7 +212,7 @@ const m = {
|
|
|
210
212
|
return e ? t[this.labelKey].toLowerCase().indexOf(e.toLowerCase()) !== -1 : !0;
|
|
211
213
|
},
|
|
212
214
|
checkChange(e, t, l, i) {
|
|
213
|
-
this.text.splice(0, this.text.length), this.$refs.tree.getCheckedNodes(this.leafOnly, !1).forEach((
|
|
215
|
+
this.text.splice(0, this.text.length), this.$refs.tree.getCheckedNodes(this.leafOnly, !1).forEach((r) => this.text.push(r[this.valueKey])), typeof this.checked == "function" && this.checked(e, t, l, i);
|
|
214
216
|
},
|
|
215
217
|
getHalfList() {
|
|
216
218
|
let e = this.$refs.tree.getCheckedNodes(!1, !0);
|
|
@@ -234,11 +236,11 @@ const m = {
|
|
|
234
236
|
disabledParentNode(e, t) {
|
|
235
237
|
e.forEach((l) => {
|
|
236
238
|
const i = l[this.childrenKey];
|
|
237
|
-
|
|
239
|
+
n(i) || (t || (l.disabled = !0), this.disabledParentNode(i, t));
|
|
238
240
|
});
|
|
239
241
|
},
|
|
240
242
|
handleNodeClick(e, t, l) {
|
|
241
|
-
e.disabled || (typeof this.nodeClick == "function" && this.nodeClick(e, t, l), !this.multiple && (
|
|
243
|
+
e.disabled || (typeof this.nodeClick == "function" && this.nodeClick(e, t, l), !this.multiple && (n(e[this.childrenKey]) && !this.multiple || this.parent) && (this.text = e[this.valueKey], this.$refs.main.blur()));
|
|
242
244
|
}
|
|
243
245
|
}
|
|
244
246
|
}, d = {};
|