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