@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.
- package/README.md +1 -13
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js +46 -42
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.js +3 -3
- package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.js +151 -143
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index.js +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +112 -116
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/table/Table.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index.js +2 -2
- package/lib/packages/ls-components/components/table/Table.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index2.js +129 -118
- package/lib/packages/ls-components/components/table/Table.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/table/Table.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/tree/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/tree/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/tree/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js +112 -100
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,152 +1,164 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
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
|
|
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/
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
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
|
-
}),
|
|
16
|
-
...
|
|
18
|
+
}), Ne = /* @__PURE__ */ A({
|
|
19
|
+
...ie,
|
|
17
20
|
props: X,
|
|
18
21
|
emits: Y,
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
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
|
-
}),
|
|
27
|
-
maxHeight:
|
|
29
|
+
}), a = f(), s = f(!1), c = f(!1), m = f([]), V = L(() => r.height ? {
|
|
30
|
+
maxHeight: r.height
|
|
28
31
|
} : {});
|
|
29
|
-
|
|
30
|
-
() =>
|
|
32
|
+
O(
|
|
33
|
+
() => r.data,
|
|
31
34
|
async (e) => {
|
|
32
|
-
e && e.length > 0 && (s.value = !1, c.value = !1, m.value =
|
|
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
|
|
40
|
-
return
|
|
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
|
-
|
|
43
|
-
function
|
|
44
|
-
return e.reduce((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
|
-
|
|
47
|
-
async function
|
|
48
|
-
var t,
|
|
49
|
-
await
|
|
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
|
|
53
|
-
|
|
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
|
-
|
|
57
|
-
function
|
|
58
|
-
c.value = !1,
|
|
59
|
+
i(q, "updateHideStyle");
|
|
60
|
+
function R() {
|
|
61
|
+
c.value = !1, a.value && a.value.setCheckedKeys(s.value ? m.value : []);
|
|
59
62
|
}
|
|
60
|
-
|
|
61
|
-
function
|
|
62
|
-
const { permission:
|
|
63
|
-
if (
|
|
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 } =
|
|
69
|
+
const { label: o } = r.dataProps || {};
|
|
67
70
|
return o ? t[o].indexOf(e) !== -1 : !0;
|
|
68
71
|
}
|
|
69
|
-
|
|
72
|
+
i(z, "filterNode");
|
|
70
73
|
function D(e, t) {
|
|
71
|
-
|
|
74
|
+
a.value.setCheckedNodes(Z(r.data, e, t)), v("handleCheck", e, t);
|
|
72
75
|
}
|
|
73
|
-
|
|
76
|
+
i(D, "handleCheck");
|
|
74
77
|
function H(e, t) {
|
|
75
|
-
|
|
78
|
+
k(), v("handleChekChange", e, t);
|
|
76
79
|
}
|
|
77
|
-
|
|
78
|
-
function
|
|
79
|
-
const e =
|
|
80
|
+
i(H, "handleChekChange");
|
|
81
|
+
function k() {
|
|
82
|
+
const e = a.value.getCheckedNodes(!1, !0);
|
|
80
83
|
let t = [];
|
|
81
|
-
e.forEach((
|
|
82
|
-
const { id: o, parentId:
|
|
83
|
-
t.push(o ||
|
|
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
|
-
|
|
89
|
+
i(k, "updateAllCheckStatus");
|
|
87
90
|
function I() {
|
|
88
91
|
var e, t;
|
|
89
|
-
if (
|
|
90
|
-
const
|
|
91
|
-
for (let o = 0; o <
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
|
|
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
|
|
101
|
-
lsTreeRef:
|
|
103
|
+
return i(I, "updateStyle"), h({
|
|
104
|
+
lsTreeRef: a
|
|
102
105
|
}), (e, t) => {
|
|
103
|
-
const
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
163
|
+
Ne as default
|
|
152
164
|
};
|
|
Binary file
|
|
Binary file
|