@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.
@@ -1,5 +1,5 @@
1
1
  import { p as u, e as h } from "../chunks/event.67cfd4fb.mjs";
2
- import { isBlank as r } from "@web-utils/core";
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-input__filter"
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-input__select",
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-input__item"
78
- }, [e.$scopedSlots.default ? e._t("default", null, {
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
- }) : [l("span", {
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 = (n, o, c) => {
201
- n.forEach((a) => {
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((n) => this.text.push(n[this.valueKey])), typeof this.checked == "function" && this.checked(e, t, l, i);
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
- r(i) || (t || (l.disabled = !0), this.disabledParentNode(i, t));
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 && (r(e[this.childrenKey]) && !this.multiple || this.parent) && (this.text = e[this.valueKey], this.$refs.main.blur()));
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 = {};