@lingshugroup/web-plus 1.0.2 → 1.0.3

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.
Files changed (35) hide show
  1. package/README.md +1 -13
  2. package/lib/index.css +1 -1
  3. package/lib/index.css.br +0 -0
  4. package/lib/index.css.gz +0 -0
  5. package/lib/packages/ls-components/components/dialog/Index.vue/index.cjs +1 -1
  6. package/lib/packages/ls-components/components/dialog/Index.vue/index.js +1 -1
  7. package/lib/packages/ls-components/components/dialog/Index.vue/index2.cjs +1 -1
  8. package/lib/packages/ls-components/components/dialog/Index.vue/index2.js +46 -42
  9. package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.br +0 -0
  10. package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.gz +0 -0
  11. package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
  12. package/lib/packages/ls-components/components/form/Form.vue/index.js +3 -3
  13. package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
  14. package/lib/packages/ls-components/components/form/Form.vue/index2.js +151 -143
  15. package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
  16. package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
  17. package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
  18. package/lib/packages/ls-components/components/form/FormItem.vue/index.js +1 -1
  19. package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
  20. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +112 -116
  21. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
  22. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
  23. package/lib/packages/ls-components/components/table/Table.vue/index.cjs +1 -1
  24. package/lib/packages/ls-components/components/table/Table.vue/index.js +2 -2
  25. package/lib/packages/ls-components/components/table/Table.vue/index2.cjs +1 -1
  26. package/lib/packages/ls-components/components/table/Table.vue/index2.js +129 -118
  27. package/lib/packages/ls-components/components/table/Table.vue/index2.js.br +0 -0
  28. package/lib/packages/ls-components/components/table/Table.vue/index2.js.gz +0 -0
  29. package/lib/packages/ls-components/components/tree/Index.vue/index.cjs +1 -1
  30. package/lib/packages/ls-components/components/tree/Index.vue/index.js +2 -2
  31. package/lib/packages/ls-components/components/tree/Index.vue/index2.cjs +1 -1
  32. package/lib/packages/ls-components/components/tree/Index.vue/index2.js +112 -100
  33. package/lib/packages/ls-components/components/tree/Index.vue/index2.js.br +0 -0
  34. package/lib/packages/ls-components/components/tree/Index.vue/index2.js.gz +0 -0
  35. package/package.json +1 -1
@@ -1,152 +1,164 @@
1
- var W = Object.defineProperty;
2
- var a = (h, p) => W(h, "name", { value: p, configurable: !0 });
1
+ var $ = Object.defineProperty;
2
+ var i = (p, h) => $(p, "name", { value: h, configurable: !0 });
3
3
  /* empty css */
4
+ /* empty css */
4
5
  /* empty css */
5
6
  /* empty css */
6
- import { defineComponent as A, ref as u, computed as $, watch as z, nextTick as k, openBlock as b, createElementBlock as L, normalizeClass as x, unref as d, createBlock as O, isRef as U, withCtx as S, createTextVNode as j, createCommentVNode as F, createVNode as G, mergeProps as J, createElementVNode as E, toDisplayString as M } from "vue";
7
+ import { defineComponent as A, ref as f, computed as L, watch as O, nextTick as x, openBlock as S, createBlock as _, unref as d, withCtx as C, createElementVNode as y, normalizeClass as E, isRef as U, createTextVNode as j, createCommentVNode as F, createVNode as G, mergeProps as J, toDisplayString as M } from "vue";
7
8
  import { useNamespace as Q } from "../../_hooks/useNamespace/index.js";
8
9
  import { lsTreeProps as X, emitNames as Y } from "../types/index.js";
9
10
  import { excutePowerTree as Z } from "../../_utils/power/index.js";
10
- import ee from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
11
- import { ElCheckbox as te } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/checkbox/index/index.js";
12
- import { ElTree as le } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/tree/index/index.js";
13
- const ne = A({
11
+ import ee from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/dist/locale/zh-cn/index.js";
12
+ import te from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
13
+ import { ElCheckbox as le } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/checkbox/index/index.js";
14
+ import { ElTree as ne } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/tree/index/index.js";
15
+ import { ElConfigProvider as oe } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/config-provider/index/index.js";
16
+ const ie = A({
14
17
  name: "LSTree"
15
- }), me = /* @__PURE__ */ A({
16
- ...ne,
18
+ }), Ne = /* @__PURE__ */ A({
19
+ ...ie,
17
20
  props: X,
18
21
  emits: Y,
19
- setup(h, { expose: p, emit: _ }) {
20
- const C = _, i = h, y = Q("tree"), P = y.b(), T = y.b("box"), w = u({
22
+ setup(p, { expose: h, emit: P }) {
23
+ const v = P, r = p, g = Q("tree"), T = g.b(), w = g.b("box"), K = f({
21
24
  showCheckbox: !0,
22
25
  defaultExpandAll: !0,
23
26
  nodeKey: "id",
24
27
  checkStrictly: !1,
25
28
  defaultCheckedKeys: []
26
- }), r = u(), s = u(!1), c = u(!1), m = u([]), K = $(() => i.height ? {
27
- maxHeight: i.height
29
+ }), a = f(), s = f(!1), c = f(!1), m = f([]), V = L(() => r.height ? {
30
+ maxHeight: r.height
28
31
  } : {});
29
- z(
30
- () => i.data,
32
+ O(
33
+ () => r.data,
31
34
  async (e) => {
32
- e && e.length > 0 && (s.value = !1, c.value = !1, m.value = V(), B(), await k(), r.value.filter(), v(), I());
35
+ e && e.length > 0 && (s.value = !1, c.value = !1, m.value = B(), q(), await x(), a.value.filter(), k(), I());
33
36
  },
34
37
  {
35
38
  immediate: !0,
36
39
  deep: !0
37
40
  }
38
41
  );
39
- function V() {
40
- return i.data.reduce((e, t) => (e.push(t.id), t.children && e.push(...g(t.children)), e), []);
42
+ function B() {
43
+ return r.data.reduce((e, t) => (e.push(t.id), t.children && e.push(...N(t.children)), e), []);
41
44
  }
42
- a(V, "getAllNodeKeys");
43
- function g(e) {
44
- return e.reduce((t, n) => (t.push(n.id), n.children && t.push(...g(n.children)), t), []);
45
+ i(B, "getAllNodeKeys");
46
+ function N(e) {
47
+ return e.reduce((t, l) => (t.push(l.id), l.children && t.push(...N(l.children)), t), []);
45
48
  }
46
- a(g, "getAllChildKeys");
47
- async function B() {
48
- var t, n;
49
- await k();
49
+ i(N, "getAllChildKeys");
50
+ async function q() {
51
+ var t, l;
52
+ await x();
50
53
  const e = document.getElementsByClassName("hide-child-node");
51
54
  for (let o = 0; o < e.length; o++) {
52
- const l = e[o].parentNode;
53
- l.style.opacity = 0, l.style.width = 0, l.style.height = 0, (n = (t = l == null ? void 0 : l.parentNode) == null ? void 0 : t.parentNode) != null && n.previousElementSibling && (l.parentNode.parentNode.previousElementSibling.querySelector(".el-icon").style.opacity = 0, l.parentNode.parentNode.previousElementSibling.querySelector(".el-icon").style.visibility = "hidden");
55
+ const n = e[o].parentNode;
56
+ n.style.opacity = 0, n.style.width = 0, n.style.height = 0, (l = (t = n == null ? void 0 : n.parentNode) == null ? void 0 : t.parentNode) != null && l.previousElementSibling && (n.parentNode.parentNode.previousElementSibling.querySelector(".el-icon").style.opacity = 0, n.parentNode.parentNode.previousElementSibling.querySelector(".el-icon").style.visibility = "hidden");
54
57
  }
55
58
  }
56
- a(B, "updateHideStyle");
57
- function q() {
58
- c.value = !1, r.value && r.value.setCheckedKeys(s.value ? m.value : []);
59
+ i(q, "updateHideStyle");
60
+ function R() {
61
+ c.value = !1, a.value && a.value.setCheckedKeys(s.value ? m.value : []);
59
62
  }
60
- a(q, "handleCheckAllChange");
61
- function R(e, t) {
62
- const { permission: n } = t || {};
63
- if (n != null && n.startsWith(i.hideNodePrefix))
63
+ i(R, "handleCheckAllChange");
64
+ function z(e, t) {
65
+ const { permission: l } = t || {};
66
+ if (l != null && l.startsWith(r.hideNodePrefix))
64
67
  return !1;
65
68
  if (!e) return !0;
66
- const { label: o } = i.dataProps || {};
69
+ const { label: o } = r.dataProps || {};
67
70
  return o ? t[o].indexOf(e) !== -1 : !0;
68
71
  }
69
- a(R, "filterNode");
72
+ i(z, "filterNode");
70
73
  function D(e, t) {
71
- r.value.setCheckedNodes(Z(i.data, e, t)), C("handleCheck", e, t);
74
+ a.value.setCheckedNodes(Z(r.data, e, t)), v("handleCheck", e, t);
72
75
  }
73
- a(D, "handleCheck");
76
+ i(D, "handleCheck");
74
77
  function H(e, t) {
75
- v(), C("handleChekChange", e, t);
78
+ k(), v("handleChekChange", e, t);
76
79
  }
77
- a(H, "handleChekChange");
78
- function v() {
79
- const e = r.value.getCheckedNodes(!1, !0);
80
+ i(H, "handleChekChange");
81
+ function k() {
82
+ const e = a.value.getCheckedNodes(!1, !0);
80
83
  let t = [];
81
- e.forEach((n) => {
82
- const { id: o, parentId: l } = n;
83
- t.push(o || l);
84
+ e.forEach((l) => {
85
+ const { id: o, parentId: n } = l;
86
+ t.push(o || n);
84
87
  }), t.length > 0 ? t.length === m.value.length ? (s.value = !0, c.value = !1) : (s.value = !1, c.value = !0) : (s.value = !1, c.value = !1);
85
88
  }
86
- a(v, "updateAllCheckStatus");
89
+ i(k, "updateAllCheckStatus");
87
90
  function I() {
88
91
  var e, t;
89
- if (i.direction == "h") {
90
- const n = (t = (e = r.value) == null ? void 0 : e.el$) == null ? void 0 : t.getElementsByClassName("el-tree-node");
91
- for (let o = 0; o < n.length; o++) {
92
- const l = n[o];
93
- if (l) {
94
- const f = l.querySelector(".el-tree-node__content .el-icon");
95
- f && getComputedStyle(f).visibility === "hidden" && (l.style.display = "inline-block", l.style.verticalAlign = "middle");
92
+ if (r.direction == "h") {
93
+ const l = (t = (e = a.value) == null ? void 0 : e.el$) == null ? void 0 : t.getElementsByClassName("el-tree-node");
94
+ for (let o = 0; o < l.length; o++) {
95
+ const n = l[o];
96
+ if (n) {
97
+ const u = n.querySelector(".el-tree-node__content .el-icon");
98
+ u && getComputedStyle(u).visibility === "hidden" && (n.style.display = "inline-block", n.style.verticalAlign = "middle");
96
99
  }
97
100
  }
98
101
  }
99
102
  }
100
- return a(I, "updateStyle"), p({
101
- lsTreeRef: r
103
+ return i(I, "updateStyle"), h({
104
+ lsTreeRef: a
102
105
  }), (e, t) => {
103
- const n = te, o = le;
104
- return b(), L("div", {
105
- class: x(d(P))
106
- }, [
107
- e.isCheckAll ? (b(), O(n, {
108
- key: 0,
109
- modelValue: d(s),
110
- "onUpdate:modelValue": t[0] || (t[0] = (l) => U(s) ? s.value = l : null),
111
- indeterminate: d(c),
112
- onChange: q
113
- }, {
114
- default: S(() => [
115
- j(" 全选 ")
116
- ]),
117
- _: 1
118
- }, 8, ["modelValue", "indeterminate"])) : F("", !0),
119
- G(o, J({
120
- ref_key: "lsTreeRef",
121
- ref: r,
122
- class: [d(T), !e.isExpand && "expand-disabled"],
123
- style: d(K)
124
- }, d(ee)(d(w), e.$attrs), {
125
- data: e.data,
126
- props: e.dataProps,
127
- "expand-on-click-node": e.isExpand,
128
- "filter-node-method": R,
129
- onCheck: D,
130
- onCheckChange: H
131
- }), {
132
- default: S(({ node: l, data: f }) => {
133
- var N;
134
- return [
135
- E("span", {
136
- class: x(["custom-tree-node", {
137
- "hide-child-node": e.hideNodePrefix && ((N = f.permission) == null ? void 0 : N.startsWith(e.hideNodePrefix))
138
- }])
139
- }, [
140
- E("span", null, M(l.label), 1)
141
- ], 2)
142
- ];
143
- }),
144
- _: 1
145
- }, 16, ["class", "style", "data", "props", "expand-on-click-node"])
146
- ], 2);
106
+ const l = le, o = ne, n = oe;
107
+ return S(), _(n, {
108
+ locale: d(ee),
109
+ "value-on-clear": void 0,
110
+ "empty-values": [void 0, null]
111
+ }, {
112
+ default: C(() => [
113
+ y("div", {
114
+ class: E(d(T))
115
+ }, [
116
+ e.isCheckAll ? (S(), _(l, {
117
+ key: 0,
118
+ modelValue: d(s),
119
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => U(s) ? s.value = u : null),
120
+ indeterminate: d(c),
121
+ onChange: R
122
+ }, {
123
+ default: C(() => [
124
+ j(" 全选 ")
125
+ ]),
126
+ _: 1
127
+ }, 8, ["modelValue", "indeterminate"])) : F("", !0),
128
+ G(o, J({
129
+ ref_key: "lsTreeRef",
130
+ ref: a,
131
+ class: [d(w), !e.isExpand && "expand-disabled"],
132
+ style: d(V)
133
+ }, d(te)(d(K), e.$attrs), {
134
+ data: e.data,
135
+ props: e.dataProps,
136
+ "expand-on-click-node": e.isExpand,
137
+ "filter-node-method": z,
138
+ onCheck: D,
139
+ onCheckChange: H
140
+ }), {
141
+ default: C(({ node: u, data: W }) => {
142
+ var b;
143
+ return [
144
+ y("span", {
145
+ class: E(["custom-tree-node", {
146
+ "hide-child-node": e.hideNodePrefix && ((b = W.permission) == null ? void 0 : b.startsWith(e.hideNodePrefix))
147
+ }])
148
+ }, [
149
+ y("span", null, M(u.label), 1)
150
+ ], 2)
151
+ ];
152
+ }),
153
+ _: 1
154
+ }, 16, ["class", "style", "data", "props", "expand-on-click-node"])
155
+ ], 2)
156
+ ]),
157
+ _: 1
158
+ }, 8, ["locale"]);
147
159
  };
148
160
  }
149
161
  });
150
162
  export {
151
- me as default
163
+ Ne as default
152
164
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingshugroup/web-plus",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "零数科技前端UI组件库(Vue3)",
5
5
  "type": "module",
6
6
  "main": "./lib/index/index.cjs",