@lingshugroup/web-plus 1.0.10 → 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/form/Form.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.js +2 -2
- package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.js +74 -70
- 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/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 -117
- 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
package/lib/index.css.br
CHANGED
|
Binary file
|
package/lib/index.css.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */r=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */r=t.default(e.default,[["__scopeId","data-v-b12d1f9a"]]);exports.default=r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b12d1f9a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var N=Object.defineProperty;var a=(
|
|
1
|
+
"use strict";var N=Object.defineProperty;var a=(f,m)=>N(f,"name",{value:m,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),C=,/* empty css */V=,/* empty css */L=,/* empty css */c=,/* empty css */T=,/* empty css */I=,/* empty css */D=,/* empty css */O=,/* empty css */h=,/* empty css */M=,/* empty css */z={class:"ls-form"},A=e.defineComponent({name:"LSForm"}),U=e.defineComponent({...A,props:V.lsFormProps,emits:["submit","reset","update:form-data","onChange"],setup(f,{expose:m,emit:B}){const q=f,k=B,l=e.useAttrs(),S=e.computed(()=>l&&l.hasOwnProperty("inline")?typeof l.inline=="boolean"&&l.inline===!1?{}:l&&l["label-position"]==="top"?{class:"form-item-buttons "}:{}:l&&l["label-position"]==="top"?{"label-position":"top"}:{label:" "}),s=e.ref(),y=["label","input","textarea","number","radio","checkbox","select","date","datetimerange","cascader","multipleCascader","switch","inputRange","inputNumberRange","slot","itemSlot"];let n=e.reactive({});function $(o){o&&(o.resetFields(),k("reset",n))}a($,"resetForm");async function b(o){o&&await o.validate((t,u)=>{t?k("submit",n):console.warn("error submit!",u)})}a(b,"submitForm");function F(){return new Promise((o,t)=>{if(!s.value)return o(!1);s.value.validate((u,p)=>{u?o(n):(console.warn("error submit!",p),t(p))})})}a(F,"validate");function d(o,t){T.default(n,o,t)}a(d,"updateFormData"),e.watch(()=>q.formData,o=>{n=o||{}},{deep:!0,immediate:!0});function g(o,t){k("onChange",o,t)}return a(g,"onChange"),m({FormRef:s,validate:F,submitForm:b}),(o,t)=>{const u=I.ElCol,p=D.ElRow,w=O.ElButton,E=h.ElFormItem,P=h.ElForm,R=M.ElConfigProvider;return e.openBlock(),e.createElementBlock("div",z,[e.createVNode(R,{locale:e.unref(L.default),"value-on-clear":void 0,"empty-values":[void 0,null]},{default:e.withCtx(()=>[e.createVNode(P,e.mergeProps({ref_key:"FormRef",ref:s,"label-position":"left","require-asterisk-position":"right","label-width":o.labelWidth,"hide-required-asterisk":!!o.read},o.$attrs,{model:e.unref(n),disabled:o.loading||o.disabled,class:[o.read&&o.hasDefReadStyle?"show-label":""]}),{default:e.withCtx(()=>[o.column>1?(e.openBlock(),e.createBlock(p,{key:0,gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formItems,r=>(e.openBlock(),e.createBlock(u,{key:r.prop,span:r.isRow?24:24/o.column},{default:e.withCtx(()=>[r.type==="slot"?e.renderSlot(o.$slots,r.prop,{key:0,slotRow:{...r}},void 0,!0):y.includes(r.type)?(e.openBlock(),e.createBlock(C.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(c.default)(e.unref(n),r.prop),colon:o.colon,read:o.read,"label-empty":o.labelEmpty,ref_for:!0},r,{"onUpdate:value":d,onOnChange:g}),e.createSlots({_:2},[e.renderList(o.$slots,(_,i)=>({name:i,fn:e.withCtx(v=>[e.renderSlot(o.$slots,i,e.mergeProps({ref_for:!0},v),void 0,!0)])}))]),1040,["value","colon","read","label-empty"])):e.renderSlot(o.$slots,r.type,{key:2,slotRow:{...r},value:e.unref(c.default)(e.unref(n),r.prop),updateFormData:d},void 0,!0)]),_:2},1032,["span"]))),128))]),_:3})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o.formItems,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.prop},[r.type==="slot"?e.renderSlot(o.$slots,r.prop,{key:0,slotRow:{...r}},void 0,!0):y.includes(r.type)?(e.openBlock(),e.createBlock(C.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(c.default)(e.unref(n),r.prop),colon:o.colon,read:o.read,"label-empty":o.labelEmpty,ref_for:!0},r,{"onUpdate:value":d,onOnChange:g}),e.createSlots({_:2},[e.renderList(o.$slots,(_,i)=>({name:i,fn:e.withCtx(v=>[e.renderSlot(o.$slots,i,e.mergeProps({ref_for:!0},v),void 0,!0)])}))]),1040,["value","colon","read","label-empty"])):e.renderSlot(o.$slots,r.type,{key:2,slotRow:{...r},value:e.unref(c.default)(e.unref(n),r.prop),updateFormData:d},void 0,!0)],64))),128)),e.renderSlot(o.$slots,"default",{},void 0,!0),o.showButtons?(e.openBlock(),e.createBlock(E,e.mergeProps({key:2},e.unref(S),{class:o.buttonsClass}),{default:e.withCtx(()=>[e.createVNode(w,{type:"primary",class:e.normalizeClass(o.confirmClassName),loading:o.loading&&o.showBtnLoading,onClick:t[0]||(t[0]=r=>b(s.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.confirmText),1)]),_:1},8,["class","loading"]),o.showReset?(e.openBlock(),e.createBlock(w,{key:0,onClick:t[1]||(t[1]=r=>$(s.value))},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})):e.createCommentVNode("",!0)]),_:1},16,["class"])):e.createCommentVNode("",!0)]),_:3},16,["label-width","hide-required-asterisk","model","disabled","class"])]),_:3},8,["locale"])])}}});exports.default=U;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var Y = Object.defineProperty;
|
|
2
|
-
var p = (
|
|
2
|
+
var p = (w, h) => Y(w, "name", { value: h, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
@@ -7,15 +7,15 @@ var p = (k, g) => Y(k, "name", { value: g, configurable: !0 });
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
|
-
import { defineComponent as T, useAttrs as j, computed as G, ref as H, reactive as J, watch as K, openBlock as
|
|
11
|
-
import
|
|
10
|
+
import { defineComponent as T, useAttrs as j, computed as G, ref as H, reactive as J, watch as K, openBlock as n, createElementBlock as b, createVNode as R, unref as t, withCtx as s, mergeProps as m, createBlock as d, Fragment as $, renderList as k, renderSlot as i, createSlots as P, normalizeClass as Q, createTextVNode as I, toDisplayString as X, createCommentVNode as D } from "vue";
|
|
11
|
+
import L from "../FormItem.vue/index.js";
|
|
12
12
|
import { lsFormProps as Z } from "../types/index.js";
|
|
13
13
|
import x 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";
|
|
14
|
-
import
|
|
14
|
+
import g from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get/index.js";
|
|
15
15
|
import ee from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set/index.js";
|
|
16
16
|
import { ElCol 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/col/index/index.js";
|
|
17
|
-
import { ElRow as
|
|
18
|
-
import { ElButton as
|
|
17
|
+
import { ElRow as re } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/row/index/index.js";
|
|
18
|
+
import { ElButton 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/button/index/index.js";
|
|
19
19
|
import { ElFormItem as le, ElForm 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/form/index/index.js";
|
|
20
20
|
import { ElConfigProvider as se } 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";
|
|
21
21
|
const ae = { class: "ls-form" }, ie = T({
|
|
@@ -24,14 +24,14 @@ const ae = { class: "ls-form" }, ie = T({
|
|
|
24
24
|
...ie,
|
|
25
25
|
props: Z,
|
|
26
26
|
emits: ["submit", "reset", "update:form-data", "onChange"],
|
|
27
|
-
setup(
|
|
28
|
-
const N =
|
|
27
|
+
setup(w, { expose: h, emit: q }) {
|
|
28
|
+
const N = w, C = q, a = j(), O = G(() => a && a.hasOwnProperty("inline") ? typeof a.inline == "boolean" && a.inline === !1 ? {} : a && a["label-position"] === "top" ? {
|
|
29
29
|
class: "form-item-buttons "
|
|
30
|
-
} : {} :
|
|
30
|
+
} : {} : a && a["label-position"] === "top" ? {
|
|
31
31
|
"label-position": "top"
|
|
32
32
|
} : {
|
|
33
33
|
label: " "
|
|
34
|
-
}), u = H(),
|
|
34
|
+
}), u = H(), _ = [
|
|
35
35
|
"label",
|
|
36
36
|
"input",
|
|
37
37
|
"textarea",
|
|
@@ -49,56 +49,56 @@ const ae = { class: "ls-form" }, ie = T({
|
|
|
49
49
|
"slot",
|
|
50
50
|
"itemSlot"
|
|
51
51
|
];
|
|
52
|
-
let
|
|
52
|
+
let l = J({});
|
|
53
53
|
function V(e) {
|
|
54
|
-
e && (e.resetFields(),
|
|
54
|
+
e && (e.resetFields(), C("reset", l));
|
|
55
55
|
}
|
|
56
56
|
p(V, "resetForm");
|
|
57
|
-
async function
|
|
58
|
-
e && await e.validate((
|
|
59
|
-
|
|
57
|
+
async function E(e) {
|
|
58
|
+
e && await e.validate((r, f) => {
|
|
59
|
+
r ? C("submit", l) : console.warn("error submit!", f);
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
p(
|
|
62
|
+
p(E, "submitForm");
|
|
63
63
|
function z() {
|
|
64
|
-
return new Promise((e,
|
|
64
|
+
return new Promise((e, r) => {
|
|
65
65
|
if (!u.value) return e(!1);
|
|
66
66
|
u.value.validate((f, y) => {
|
|
67
|
-
f ? e(
|
|
67
|
+
f ? e(l) : (console.warn("error submit!", y), r(y));
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
p(z, "validate");
|
|
72
|
-
function
|
|
73
|
-
ee(
|
|
72
|
+
function v(e, r) {
|
|
73
|
+
ee(l, e, r);
|
|
74
74
|
}
|
|
75
|
-
p(
|
|
75
|
+
p(v, "updateFormData"), K(
|
|
76
76
|
() => N.formData,
|
|
77
77
|
(e) => {
|
|
78
|
-
|
|
78
|
+
l = e || {};
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
deep: !0,
|
|
82
82
|
immediate: !0
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
|
-
function
|
|
86
|
-
|
|
85
|
+
function S(e, r) {
|
|
86
|
+
C("onChange", e, r);
|
|
87
87
|
}
|
|
88
|
-
return p(
|
|
88
|
+
return p(S, "onChange"), h({
|
|
89
89
|
FormRef: u,
|
|
90
90
|
validate: z,
|
|
91
|
-
submitForm:
|
|
92
|
-
}), (e,
|
|
93
|
-
const f = oe, y =
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
locale:
|
|
91
|
+
submitForm: E
|
|
92
|
+
}), (e, r) => {
|
|
93
|
+
const f = oe, y = re, B = te, A = le, U = ne, M = se;
|
|
94
|
+
return n(), b("div", ae, [
|
|
95
|
+
R(M, {
|
|
96
|
+
locale: t(x),
|
|
97
97
|
"value-on-clear": void 0,
|
|
98
98
|
"empty-values": [void 0, null]
|
|
99
99
|
}, {
|
|
100
|
-
default:
|
|
101
|
-
|
|
100
|
+
default: s(() => [
|
|
101
|
+
R(U, m({
|
|
102
102
|
ref_key: "FormRef",
|
|
103
103
|
ref: u,
|
|
104
104
|
"label-position": "left",
|
|
@@ -106,106 +106,110 @@ const ae = { class: "ls-form" }, ie = T({
|
|
|
106
106
|
"label-width": e.labelWidth,
|
|
107
107
|
"hide-required-asterisk": !!e.read
|
|
108
108
|
}, e.$attrs, {
|
|
109
|
-
model:
|
|
109
|
+
model: t(l),
|
|
110
110
|
disabled: e.loading || e.disabled,
|
|
111
111
|
class: [e.read && e.hasDefReadStyle ? "show-label" : ""]
|
|
112
112
|
}), {
|
|
113
|
-
default:
|
|
114
|
-
e.column > 1 ? (
|
|
113
|
+
default: s(() => [
|
|
114
|
+
e.column > 1 ? (n(), d(y, {
|
|
115
115
|
key: 0,
|
|
116
116
|
gutter: 10
|
|
117
117
|
}, {
|
|
118
|
-
default:
|
|
119
|
-
(
|
|
118
|
+
default: s(() => [
|
|
119
|
+
(n(!0), b($, null, k(e.formItems, (o) => (n(), d(f, {
|
|
120
120
|
key: o.prop,
|
|
121
121
|
span: o.isRow ? 24 : 24 / e.column
|
|
122
122
|
}, {
|
|
123
|
-
default:
|
|
123
|
+
default: s(() => [
|
|
124
124
|
o.type === "slot" ? i(e.$slots, o.prop, {
|
|
125
125
|
key: 0,
|
|
126
126
|
slotRow: { ...o }
|
|
127
|
-
}, void 0, !0) :
|
|
127
|
+
}, void 0, !0) : _.includes(o.type) ? (n(), d(L, m({
|
|
128
128
|
key: 1,
|
|
129
129
|
"is-value": !0,
|
|
130
|
-
value:
|
|
130
|
+
value: t(g)(t(l), o.prop),
|
|
131
131
|
colon: e.colon,
|
|
132
132
|
read: e.read,
|
|
133
133
|
"label-empty": e.labelEmpty,
|
|
134
134
|
ref_for: !0
|
|
135
135
|
}, o, {
|
|
136
|
-
"onUpdate:value":
|
|
137
|
-
onOnChange:
|
|
138
|
-
}),
|
|
139
|
-
|
|
136
|
+
"onUpdate:value": v,
|
|
137
|
+
onOnChange: S
|
|
138
|
+
}), P({ _: 2 }, [
|
|
139
|
+
k(e.$slots, (W, c) => ({
|
|
140
140
|
name: c,
|
|
141
|
-
fn:
|
|
142
|
-
i(e.$slots, c, m({ ref_for: !0 },
|
|
141
|
+
fn: s((F) => [
|
|
142
|
+
i(e.$slots, c, m({ ref_for: !0 }, F), void 0, !0)
|
|
143
143
|
])
|
|
144
144
|
}))
|
|
145
145
|
]), 1040, ["value", "colon", "read", "label-empty"])) : i(e.$slots, o.type, {
|
|
146
146
|
key: 2,
|
|
147
|
-
slotRow: { ...o }
|
|
147
|
+
slotRow: { ...o },
|
|
148
|
+
value: t(g)(t(l), o.prop),
|
|
149
|
+
updateFormData: v
|
|
148
150
|
}, void 0, !0)
|
|
149
151
|
]),
|
|
150
152
|
_: 2
|
|
151
153
|
}, 1032, ["span"]))), 128))
|
|
152
154
|
]),
|
|
153
155
|
_: 3
|
|
154
|
-
})) : (
|
|
156
|
+
})) : (n(!0), b($, { key: 1 }, k(e.formItems, (o) => (n(), b($, {
|
|
155
157
|
key: o.prop
|
|
156
158
|
}, [
|
|
157
159
|
o.type === "slot" ? i(e.$slots, o.prop, {
|
|
158
160
|
key: 0,
|
|
159
161
|
slotRow: { ...o }
|
|
160
|
-
}, void 0, !0) :
|
|
162
|
+
}, void 0, !0) : _.includes(o.type) ? (n(), d(L, m({
|
|
161
163
|
key: 1,
|
|
162
164
|
"is-value": !0,
|
|
163
|
-
value:
|
|
165
|
+
value: t(g)(t(l), o.prop),
|
|
164
166
|
colon: e.colon,
|
|
165
167
|
read: e.read,
|
|
166
168
|
"label-empty": e.labelEmpty,
|
|
167
169
|
ref_for: !0
|
|
168
170
|
}, o, {
|
|
169
|
-
"onUpdate:value":
|
|
170
|
-
onOnChange:
|
|
171
|
-
}),
|
|
172
|
-
|
|
171
|
+
"onUpdate:value": v,
|
|
172
|
+
onOnChange: S
|
|
173
|
+
}), P({ _: 2 }, [
|
|
174
|
+
k(e.$slots, (W, c) => ({
|
|
173
175
|
name: c,
|
|
174
|
-
fn:
|
|
175
|
-
i(e.$slots, c, m({ ref_for: !0 },
|
|
176
|
+
fn: s((F) => [
|
|
177
|
+
i(e.$slots, c, m({ ref_for: !0 }, F), void 0, !0)
|
|
176
178
|
])
|
|
177
179
|
}))
|
|
178
180
|
]), 1040, ["value", "colon", "read", "label-empty"])) : i(e.$slots, o.type, {
|
|
179
181
|
key: 2,
|
|
180
|
-
slotRow: { ...o }
|
|
182
|
+
slotRow: { ...o },
|
|
183
|
+
value: t(g)(t(l), o.prop),
|
|
184
|
+
updateFormData: v
|
|
181
185
|
}, void 0, !0)
|
|
182
186
|
], 64))), 128)),
|
|
183
187
|
i(e.$slots, "default", {}, void 0, !0),
|
|
184
|
-
e.showButtons ? (
|
|
185
|
-
default:
|
|
186
|
-
|
|
188
|
+
e.showButtons ? (n(), d(A, m({ key: 2 }, t(O), { class: e.buttonsClass }), {
|
|
189
|
+
default: s(() => [
|
|
190
|
+
R(B, {
|
|
187
191
|
type: "primary",
|
|
188
192
|
class: Q(e.confirmClassName),
|
|
189
193
|
loading: e.loading && e.showBtnLoading,
|
|
190
|
-
onClick:
|
|
194
|
+
onClick: r[0] || (r[0] = (o) => E(u.value))
|
|
191
195
|
}, {
|
|
192
|
-
default:
|
|
193
|
-
|
|
196
|
+
default: s(() => [
|
|
197
|
+
I(X(e.confirmText), 1)
|
|
194
198
|
]),
|
|
195
199
|
_: 1
|
|
196
200
|
}, 8, ["class", "loading"]),
|
|
197
|
-
e.showReset ? (
|
|
201
|
+
e.showReset ? (n(), d(B, {
|
|
198
202
|
key: 0,
|
|
199
|
-
onClick:
|
|
203
|
+
onClick: r[1] || (r[1] = (o) => V(u.value))
|
|
200
204
|
}, {
|
|
201
|
-
default:
|
|
202
|
-
|
|
205
|
+
default: s(() => [
|
|
206
|
+
I(" 重置 ")
|
|
203
207
|
]),
|
|
204
208
|
_: 1
|
|
205
|
-
})) :
|
|
209
|
+
})) : D("", !0)
|
|
206
210
|
]),
|
|
207
211
|
_: 1
|
|
208
|
-
}, 16, ["class"])) :
|
|
212
|
+
}, 16, ["class"])) : D("", !0)
|
|
209
213
|
]),
|
|
210
214
|
_: 3
|
|
211
215
|
}, 16, ["label-width", "hide-required-asterisk", "model", "disabled", "class"])
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-6722549d"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-6722549d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var B=Object.defineProperty;var o=(h,f)=>B(h,"name",{value:f,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */const t=require("vue"),K=,/* empty css */N=,/* empty css */D=,/* empty css */z=,/* empty css */R=,/* empty css */H=t.defineComponent({name:"LSTree"}),I=t.defineComponent({...H,props:N.lsTreeProps,emits:N.emitNames,setup(h,{expose:f,emit:b}){const y=b,d=h,C=K.useNamespace("tree"),x=C.b(),S=C.b("box"),s=t.ref(),i=t.ref(!1),c=t.ref(!1),p=t.ref([]),E=t.computed(()=>d.height?{maxHeight:d.height}:{}),m=t.computed(()=>d.treeData);t.watch(()=>m.value,async e=>{e&&e.length>0&&(i.value=!1,c.value=!1,p.value=q(),w(),await t.nextTick(),s.value.filter(),v(),_())},{immediate:!0,deep:!0});function q(){return m.value.reduce((e,l)=>(e.push(l.id),l.children&&e.push(...k(l.children)),e),[])}o(q,"getAllNodeKeys");function k(e){return e.reduce((l,a)=>(l.push(a.id),a.children&&l.push(...k(a.children)),l),[])}o(k,"getAllChildKeys");async function w(){var l,a;await t.nextTick();const e=document.getElementsByClassName("hide-child-node");for(let r=0;r<e.length;r++){const n=e[r].parentNode;n.style.opacity=0,n.style.width=0,n.style.height=0,(a=(l=n==null?void 0:n.parentNode)==null?void 0:l.parentNode)!=null&&a.previousElementSibling&&(n.parentNode.parentNode.previousElementSibling.querySelector(".el-icon").style.opacity=0,n.parentNode.parentNode.previousElementSibling.querySelector(".el-icon").style.visibility="hidden")}}o(w,"updateHideStyle");function T(){c.value=!1,s.value&&s.value.setCheckedKeys(i.value?p.value:[])}o(T,"handleCheckAllChange");function A(e,l){const{permission:a}=l||{};if(a!=null&&a.startsWith(d.hideNodePrefix))return!1;if(!e)return!0;const{label:r}=d.dataProps||{};return r?l[r].indexOf(e)!==-1:!0}o(A,"filterNode");function P(e,l){s.value.setCheckedNodes(D.excutePowerTree(m.value,e,l)),y("handleCheck",e,l)}o(P,"handleCheck");function V(e,l){v(),y("handleChekChange",e,l)}o(V,"handleChekChange");function v(){const e=s.value.getCheckedNodes(!1,!0);let l=[];e.forEach(a=>{const{id:r,parentId:n}=a;l.push(r||n)}),l.length>0?l.length===p.value.length?(i.value=!0,c.value=!1):(i.value=!1,c.value=!0):(i.value=!1,c.value=!1)}o(v,"updateAllCheckStatus");function _(){var e,l;if(d.direction=="h"){const a=(l=(e=s.value)==null?void 0:e.el$)==null?void 0:l.getElementsByClassName("el-tree-node");for(let r=0;r<a.length;r++){const n=a[r];if(n){const u=n.querySelector(".el-tree-node__content .el-icon");u&&getComputedStyle(u).visibility==="hidden"&&(n.style.display="inline-block",n.style.verticalAlign="middle")}}}}return o(_,"updateStyle"),f({lsTreeRef:s}),(e,l)=>{const a=z.ElCheckbox,r=R.ElTree;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(x))},[e.isCheckAll?(t.openBlock(),t.createBlock(a,{key:0,modelValue:t.unref(i),"onUpdate:modelValue":l[0]||(l[0]=n=>t.isRef(i)?i.value=n:null),indeterminate:t.unref(c),onChange:T},{default:t.withCtx(()=>[t.createTextVNode(" 全选 ")]),_:1},8,["modelValue","indeterminate"])):t.createCommentVNode("",!0),t.createVNode(r,{ref_key:"lsTreeRef",ref:s,"show-checkbox":e.showCheckbox,"default-expand-all":e.defaultExpandAll,"node-key":e.nodeKey,"check-strictly":e.isCheckStrictly,style:t.normalizeStyle(t.unref(E)),class:t.normalizeClass([t.unref(S),!e.isExpand&&"expand-disabled"]),data:e.treeData,props:e.dataProps,"default-checked-keys":e.defaultCheckedKeys,"expand-on-click-node":e.isExpand,"filter-node-method":A,onCheck:P,onCheckChange:V},{default:t.withCtx(({node:n,data:u})=>{var g;return[t.createElementVNode("span",{class:t.normalizeClass(["custom-tree-node",{"hide-child-node":e.hideNodePrefix&&((g=u.permission)==null?void 0:g.startsWith(e.hideNodePrefix))}])},[t.createElementVNode("span",null,t.toDisplayString(n.label),1)],2)]}),_:1},8,["show-checkbox","default-expand-all","node-key","check-strictly","style","class","data","props","default-checked-keys","expand-on-click-node"])],2)}}});exports.default=I;
|