@lingshugroup/web-plus 2.4.12 → 2.5.1
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/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/_utils/power/index.cjs +1 -1
- package/lib/packages/ls-components/components/_utils/power/index.js +14 -14
- package/lib/packages/ls-components/components/_utils/power/index.js.br +0 -0
- package/lib/packages/ls-components/components/_utils/power/index.js.gz +0 -0
- package/lib/packages/ls-components/components/dialog/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/types/index.js +4 -4
- package/lib/packages/ls-components/components/dialog/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/dialog/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/layout/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/layout/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/layout/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/layout/Index.vue/index2.js +3 -3
- package/lib/packages/ls-components/components/layout/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/layout/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/layout/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/layout/types/index.js +5 -0
- package/lib/packages/ls-components/components/layout/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/layout/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 +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 +138 -138
- 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 +5 -5
- 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,5 +1,5 @@
|
|
|
1
1
|
var ye = Object.defineProperty;
|
|
2
|
-
var p = (
|
|
2
|
+
var p = (_, D) => ye(_, "name", { value: D, configurable: !0 });
|
|
3
3
|
import { ElConfigProvider as ve } from "../../../../../node_modules/.pnpm/element-plus@2.13.5_typescript@5.9.3_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/config-provider/index/index.js";
|
|
4
4
|
import { ElButton as ge } from "../../../../../node_modules/.pnpm/element-plus@2.13.5_typescript@5.9.3_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/button/index/index.js";
|
|
5
5
|
import { ElRadio as me } from "../../../../../node_modules/.pnpm/element-plus@2.13.5_typescript@5.9.3_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/radio/index/index.js";
|
|
@@ -30,20 +30,20 @@ import Te from "../../../../../_virtual/dayjs.min/index.js";
|
|
|
30
30
|
/* empty css */
|
|
31
31
|
/* empty css */
|
|
32
32
|
/* empty css */
|
|
33
|
-
import { defineComponent as X, useAttrs as ze, ref as
|
|
34
|
-
import { lsTableProps as
|
|
33
|
+
import { defineComponent as X, useAttrs as ze, ref as I, computed as Y, watch as P, nextTick as we, createElementBlock as g, openBlock as s, createVNode as G, unref as E, withCtx as i, withDirectives as Oe, createBlock as f, createCommentVNode as k, mergeProps as y, createSlots as J, renderSlot as S, createTextVNode as T, toDisplayString as m, Fragment as R, renderList as Re, normalizeClass as Q, resolveDynamicComponent as $e, isRef as W } from "vue";
|
|
34
|
+
import { lsTableProps as Le } from "../types/index.js";
|
|
35
35
|
import { isEmpty as z } from "../../_utils/utils/index.js";
|
|
36
|
-
import
|
|
36
|
+
import Ae from "../../../../../node_modules/.pnpm/element-plus@2.13.5_typescript@5.9.3_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/dist/locale/zh-cn/index.js";
|
|
37
37
|
import d from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get/index.js";
|
|
38
|
-
const
|
|
38
|
+
const Ie = { class: "ls-table-wrap" }, _e = X({
|
|
39
39
|
name: "LSTable"
|
|
40
40
|
}), mt = /* @__PURE__ */ X({
|
|
41
|
-
...
|
|
41
|
+
..._e,
|
|
42
42
|
inheritAttrs: !1,
|
|
43
|
-
props:
|
|
43
|
+
props: Le,
|
|
44
44
|
emits: ["sizeChange", "currentPageChange", "update:page-size", "update:current-page", "update:selection"],
|
|
45
|
-
setup(
|
|
46
|
-
const a =
|
|
45
|
+
setup(_, { expose: D, emit: Z }) {
|
|
46
|
+
const a = _, C = Z, M = ze(), B = I(), c = I(1), h = I(10), w = I([]);
|
|
47
47
|
function H(e) {
|
|
48
48
|
return (e == null ? void 0 : e.rowKey) || (e == null ? void 0 : e.rowkey) || (e == null ? void 0 : e["row-key"]) || "id";
|
|
49
49
|
}
|
|
@@ -90,13 +90,13 @@ const _e = { class: "ls-table-wrap" }, Le = X({
|
|
|
90
90
|
return e.replace(/-([a-z])/g, (o, n) => n.toUpperCase());
|
|
91
91
|
}
|
|
92
92
|
p(x, "kebabToCamel");
|
|
93
|
-
function
|
|
94
|
-
return typeof e != "object" || e === null || z(e) ? e : Array.isArray(e) ? e.map((o) =>
|
|
93
|
+
function A(e) {
|
|
94
|
+
return typeof e != "object" || e === null || z(e) ? e : Array.isArray(e) ? e.map((o) => A(o)) : Object.keys(e).reduce((o, n) => {
|
|
95
95
|
const l = x(n), u = e[n];
|
|
96
|
-
return o[l] = typeof u == "object" ?
|
|
96
|
+
return o[l] = typeof u == "object" ? A(u) : u, o;
|
|
97
97
|
}, {});
|
|
98
98
|
}
|
|
99
|
-
p(
|
|
99
|
+
p(A, "objectKeysToCamel");
|
|
100
100
|
function K(e, o) {
|
|
101
101
|
if (!e) throw new Error("Row is required when get row identity");
|
|
102
102
|
return typeof o == "string" ? `${d(e, o)}` : typeof o == "function" ? o.call(null, e) : "";
|
|
@@ -128,7 +128,7 @@ const _e = { class: "ls-table-wrap" }, Le = X({
|
|
|
128
128
|
}
|
|
129
129
|
);
|
|
130
130
|
const U = Y(() => {
|
|
131
|
-
const e =
|
|
131
|
+
const e = A(a.selectColumnOptions), o = d(e, "reserveSelection");
|
|
132
132
|
return z(o) && a.showSelect ? {
|
|
133
133
|
...e,
|
|
134
134
|
reserveSelection: !0
|
|
@@ -160,8 +160,8 @@ const _e = { class: "ls-table-wrap" }, Le = X({
|
|
|
160
160
|
}
|
|
161
161
|
p(le, "handleSelectAll");
|
|
162
162
|
const re = Y(() => {
|
|
163
|
-
const e =
|
|
164
|
-
n && (o.rowKey = n), a.showSelect && (o.onSelect || (o.onSelect = ne), o.onSelectAll || (o.onSelectAll = le));
|
|
163
|
+
const e = A(M), o = { ...e }, n = H(e);
|
|
164
|
+
n && (o.rowKey = n), o.tableLayout || (o.tableLayout = "auto"), a.showSelect && (o.onSelect || (o.onSelect = ne), o.onSelectAll || (o.onSelectAll = le));
|
|
165
165
|
const l = d(e, "showOverflowTooltip");
|
|
166
166
|
if (M && !z(l))
|
|
167
167
|
if (typeof l == "boolean")
|
|
@@ -199,33 +199,33 @@ const _e = { class: "ls-table-wrap" }, Le = X({
|
|
|
199
199
|
return typeof n == "function" ? n(o) : typeof n == "string" ? n : l ? d(o, l) : d(o, e == null ? void 0 : e.prop);
|
|
200
200
|
}
|
|
201
201
|
p(se, "getLinkHref");
|
|
202
|
-
function
|
|
202
|
+
function v(e, o) {
|
|
203
203
|
return d(o, e == null ? void 0 : e.prop);
|
|
204
204
|
}
|
|
205
|
-
p(
|
|
205
|
+
p(v, "getCellValue");
|
|
206
206
|
function F(e, o) {
|
|
207
|
-
return z(
|
|
207
|
+
return z(v(e, o));
|
|
208
208
|
}
|
|
209
209
|
p(F, "isCellEmpty");
|
|
210
210
|
function q(e, o) {
|
|
211
211
|
const { text: n, textProp: l, textFormatter: u } = e || {};
|
|
212
|
-
return typeof u == "function" ? u(o,
|
|
212
|
+
return typeof u == "function" ? u(o, v(e, o)) : z(n) ? l ? d(o, l) : v(e, o) : n;
|
|
213
213
|
}
|
|
214
214
|
return p(q, "getCellText"), D({
|
|
215
215
|
TableRef: B
|
|
216
216
|
}), (e, o) => {
|
|
217
217
|
const n = me, l = Ce, u = Pe, $ = be, pe = ge, ue = he, ie = Se, fe = ke, de = ve, ce = Ee;
|
|
218
|
-
return s(),
|
|
219
|
-
G(de, { locale: E(
|
|
218
|
+
return s(), g("div", Ie, [
|
|
219
|
+
G(de, { locale: E(Ae) }, {
|
|
220
220
|
default: i(() => [
|
|
221
|
-
Oe((s(), f(ie,
|
|
221
|
+
Oe((s(), f(ie, y({
|
|
222
222
|
ref_key: "TableRef",
|
|
223
223
|
ref: B,
|
|
224
224
|
style: { width: "100%" }
|
|
225
225
|
}, E(re), { data: e.tableData }), J({
|
|
226
226
|
default: i(() => [
|
|
227
|
-
|
|
228
|
-
e.showRadio ? (s(), f(l,
|
|
227
|
+
S(e.$slots, "prepend", {}, void 0, !0),
|
|
228
|
+
e.showRadio ? (s(), f(l, y({
|
|
229
229
|
key: 0,
|
|
230
230
|
width: "60"
|
|
231
231
|
}, e.radioColumnOptions), {
|
|
@@ -235,147 +235,147 @@ const _e = { class: "ls-table-wrap" }, Le = X({
|
|
|
235
235
|
label: t[e.radioProp]
|
|
236
236
|
}, {
|
|
237
237
|
default: i(() => [
|
|
238
|
-
|
|
238
|
+
T(m(e.showRadioLabel ? t[e.radioProp] : ""), 1)
|
|
239
239
|
]),
|
|
240
240
|
_: 2
|
|
241
241
|
}, 1032, ["model-value", "label"])
|
|
242
242
|
]),
|
|
243
243
|
_: 1
|
|
244
|
-
}, 16)) :
|
|
245
|
-
e.showSelect ? (s(), f(l,
|
|
244
|
+
}, 16)) : k("", !0),
|
|
245
|
+
e.showSelect ? (s(), f(l, y({
|
|
246
246
|
key: 1,
|
|
247
247
|
width: "60"
|
|
248
|
-
}, E(U), { type: "selection" }), null, 16)) :
|
|
249
|
-
e.showExpand ? (s(), f(l,
|
|
248
|
+
}, E(U), { type: "selection" }), null, 16)) : k("", !0),
|
|
249
|
+
e.showExpand ? (s(), f(l, y({ key: 2 }, e.expandColumnOptions, { type: "expand" }), {
|
|
250
250
|
default: i(({ row: t }) => [
|
|
251
|
-
|
|
251
|
+
S(e.$slots, "expand", { row: t }, void 0, !0)
|
|
252
252
|
]),
|
|
253
253
|
_: 3
|
|
254
|
-
}, 16)) :
|
|
255
|
-
e.showTableIndex ? (s(), f(l,
|
|
254
|
+
}, 16)) : k("", !0),
|
|
255
|
+
e.showTableIndex ? (s(), f(l, y({
|
|
256
256
|
key: 3,
|
|
257
257
|
width: "60",
|
|
258
258
|
fixed: e.tableIndexfixed,
|
|
259
259
|
label: e.tableIndexLabel,
|
|
260
260
|
index: te
|
|
261
|
-
}, e.indexColumnOptions, { type: "index" }), null, 16, ["fixed", "label"])) :
|
|
262
|
-
(s(!0),
|
|
261
|
+
}, e.indexColumnOptions, { type: "index" }), null, 16, ["fixed", "label"])) : k("", !0),
|
|
262
|
+
(s(!0), g(R, null, Re(e.tableColumn, (t) => (s(), f(l, y({
|
|
263
263
|
key: t.prop,
|
|
264
264
|
ref_for: !0
|
|
265
265
|
}, t), J({
|
|
266
266
|
default: i(({ row: r, column: b, $index: O }) => [
|
|
267
|
-
t.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
267
|
+
t.type === "date" ? (s(), g(R, { key: 0 }, [
|
|
268
|
+
T(m(oe(v(t, r), t.dateTemplate)), 1)
|
|
269
|
+
], 64)) : t.type === "status" ? (s(), f(u, y(
|
|
270
|
+
{
|
|
271
|
+
key: 1,
|
|
272
|
+
ref_for: !0
|
|
273
|
+
},
|
|
274
|
+
typeof t.statusProps == "function" ? t.statusProps({
|
|
275
|
+
row: r,
|
|
276
|
+
column: b,
|
|
277
|
+
index: O,
|
|
278
|
+
value: E(d)(r, t.prop),
|
|
279
|
+
item: t
|
|
280
|
+
}) : t.statusProps,
|
|
281
|
+
{
|
|
282
|
+
type: ["default", "follow"].includes(t.statusStyle || "default") ? j(t.value, r, t.prop) : "",
|
|
283
|
+
class: ae(t.statusStyle, j(t.value, r, t.prop), t.className)
|
|
284
|
+
}
|
|
285
|
+
), {
|
|
286
|
+
default: i(() => {
|
|
287
|
+
var N, L;
|
|
288
|
+
return [
|
|
289
|
+
T(m(((N = t.value[E(d)(r, t.prop)]) == null ? void 0 : N.label) || ((L = t.value.default) == null ? void 0 : L.label) || r[t.prop]), 1)
|
|
290
|
+
];
|
|
291
|
+
}),
|
|
292
|
+
_: 2
|
|
293
|
+
}, 1040, ["type", "class"])) : t.type === "number" ? (s(), g(R, { key: 2 }, [
|
|
294
|
+
F(t, r) ? (s(), g(R, { key: 0 }, [
|
|
295
|
+
T(m(e.labelEmpty || "--"), 1)
|
|
296
|
+
], 64)) : (s(), f(u, {
|
|
297
|
+
key: 1,
|
|
298
|
+
type: Number(v(t, r)) < 0 ? "danger" : `${t.isSuc ? "success" : ""}`
|
|
299
|
+
}, {
|
|
300
|
+
default: i(() => [
|
|
301
|
+
T(m(v(t, r)), 1)
|
|
302
|
+
]),
|
|
300
303
|
_: 2
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}, {
|
|
308
|
-
default: i(() => [
|
|
309
|
-
S(m(y(t, r)), 1)
|
|
310
|
-
]),
|
|
311
|
-
_: 2
|
|
312
|
-
}, 1032, ["type"]))
|
|
313
|
-
], 64)) : t.type === "link" ? (s(), v(T, { key: 3 }, [
|
|
314
|
-
!t.text && !t.textProp && !t.textFormatter && F(t, r) ? (s(), v("div", {
|
|
315
|
-
key: 0,
|
|
316
|
-
class: Q(e.labelEmptyClass)
|
|
317
|
-
}, m(e.labelEmpty || "--"), 3)) : (s(), f($, g(
|
|
318
|
-
{
|
|
319
|
-
key: 1,
|
|
320
|
-
href: se(t, r)
|
|
321
|
-
},
|
|
322
|
-
{ ref_for: !0 },
|
|
323
|
-
typeof t.linkProps == "function" ? t.linkProps({ row: r, column: b, index: O }) : t.linkProps
|
|
324
|
-
), {
|
|
325
|
-
default: i(() => [
|
|
326
|
-
S(m(q(t, r)), 1)
|
|
327
|
-
]),
|
|
328
|
-
_: 2
|
|
329
|
-
}, 1040, ["href"]))
|
|
330
|
-
], 64)) : t.type === "button" ? (s(), f(pe, g(
|
|
304
|
+
}, 1032, ["type"]))
|
|
305
|
+
], 64)) : t.type === "link" ? (s(), g(R, { key: 3 }, [
|
|
306
|
+
!t.text && !t.textProp && !t.textFormatter && F(t, r) ? (s(), g("div", {
|
|
307
|
+
key: 0,
|
|
308
|
+
class: Q(e.labelEmptyClass)
|
|
309
|
+
}, m(e.labelEmpty || "--"), 3)) : (s(), f($, y(
|
|
331
310
|
{
|
|
332
|
-
key:
|
|
333
|
-
|
|
311
|
+
key: 1,
|
|
312
|
+
href: se(t, r)
|
|
334
313
|
},
|
|
335
314
|
{ ref_for: !0 },
|
|
336
|
-
typeof t.
|
|
337
|
-
row: r,
|
|
338
|
-
column: b,
|
|
339
|
-
index: O,
|
|
340
|
-
value: y(t, r),
|
|
341
|
-
item: t
|
|
342
|
-
}) : t.buttonProps,
|
|
343
|
-
{
|
|
344
|
-
onClick: /* @__PURE__ */ p((N) => {
|
|
345
|
-
var A;
|
|
346
|
-
return (A = t.onClick) == null ? void 0 : A.call(t, {
|
|
347
|
-
row: r,
|
|
348
|
-
column: b,
|
|
349
|
-
index: O,
|
|
350
|
-
value: y(t, r),
|
|
351
|
-
item: t
|
|
352
|
-
});
|
|
353
|
-
}, "onClick")
|
|
354
|
-
}
|
|
315
|
+
typeof t.linkProps == "function" ? t.linkProps({ row: r, column: b, index: O }) : t.linkProps
|
|
355
316
|
), {
|
|
356
317
|
default: i(() => [
|
|
357
|
-
|
|
318
|
+
T(m(q(t, r)), 1)
|
|
358
319
|
]),
|
|
359
320
|
_: 2
|
|
360
|
-
}, 1040, ["
|
|
361
|
-
|
|
321
|
+
}, 1040, ["href"]))
|
|
322
|
+
], 64)) : t.type === "button" ? (s(), f(pe, y(
|
|
323
|
+
{
|
|
324
|
+
key: 4,
|
|
325
|
+
class: "ls-table-button",
|
|
326
|
+
type: "primary",
|
|
327
|
+
link: ""
|
|
328
|
+
},
|
|
329
|
+
{ ref_for: !0 },
|
|
330
|
+
typeof t.buttonProps == "function" ? t.buttonProps({
|
|
362
331
|
row: r,
|
|
363
332
|
column: b,
|
|
364
|
-
index: O
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
333
|
+
index: O,
|
|
334
|
+
value: v(t, r),
|
|
335
|
+
item: t
|
|
336
|
+
}) : t.buttonProps,
|
|
337
|
+
{
|
|
338
|
+
onClick: /* @__PURE__ */ p((N) => {
|
|
339
|
+
var L;
|
|
340
|
+
return (L = t.onClick) == null ? void 0 : L.call(t, {
|
|
341
|
+
row: r,
|
|
342
|
+
column: b,
|
|
343
|
+
index: O,
|
|
344
|
+
value: v(t, r),
|
|
345
|
+
item: t
|
|
346
|
+
});
|
|
347
|
+
}, "onClick")
|
|
348
|
+
}
|
|
349
|
+
), {
|
|
350
|
+
default: i(() => [
|
|
351
|
+
T(m(q(t, r)), 1)
|
|
352
|
+
]),
|
|
353
|
+
_: 2
|
|
354
|
+
}, 1040, ["onClick"])) : t.type === "slot" ? S(e.$slots, t.prop, {
|
|
355
|
+
key: 5,
|
|
356
|
+
row: r,
|
|
357
|
+
column: b,
|
|
358
|
+
index: O
|
|
359
|
+
}, void 0, !0) : t.type === "render" ? (s(), g(R, { key: 6 }, [
|
|
360
|
+
t.render ? (s(), f($e(t.render), {
|
|
361
|
+
key: 0,
|
|
362
|
+
row: r,
|
|
363
|
+
column: b,
|
|
364
|
+
index: O,
|
|
365
|
+
value: v(t, r),
|
|
366
|
+
item: t
|
|
367
|
+
}, null, 8, ["row", "column", "index", "value", "item"])) : k("", !0)
|
|
368
|
+
], 64)) : F(t, r) ? (s(), g("div", {
|
|
369
|
+
key: 7,
|
|
370
|
+
class: Q(e.labelEmptyClass)
|
|
371
|
+
}, m(e.labelEmpty || "--"), 3)) : k("", !0)
|
|
372
372
|
]),
|
|
373
373
|
_: 2
|
|
374
374
|
}, [
|
|
375
375
|
t.headerSlot ? {
|
|
376
376
|
name: "header",
|
|
377
377
|
fn: i(({ column: r, $index: b }) => [
|
|
378
|
-
|
|
378
|
+
S(e.$slots, `${t.prop}-header`, {
|
|
379
379
|
column: r,
|
|
380
380
|
index: b
|
|
381
381
|
}, void 0, !0)
|
|
@@ -385,37 +385,37 @@ const _e = { class: "ls-table-wrap" }, Le = X({
|
|
|
385
385
|
t.filterIconSlot ? {
|
|
386
386
|
name: "filter-icon",
|
|
387
387
|
fn: i(({ filterOpened: r }) => [
|
|
388
|
-
|
|
388
|
+
S(e.$slots, `${t.prop}-filter-icon`, { filterOpened: r }, void 0, !0)
|
|
389
389
|
]),
|
|
390
390
|
key: "1"
|
|
391
391
|
} : void 0
|
|
392
392
|
]), 1040))), 128)),
|
|
393
|
-
|
|
393
|
+
S(e.$slots, "default", {}, void 0, !0)
|
|
394
394
|
]),
|
|
395
395
|
_: 2
|
|
396
396
|
}, [
|
|
397
397
|
e.showEmpty ? {
|
|
398
398
|
name: "empty",
|
|
399
399
|
fn: i(() => [
|
|
400
|
-
e.$slots.empty ?
|
|
400
|
+
e.$slots.empty ? k("", !0) : (s(), f(ue, {
|
|
401
401
|
key: 0,
|
|
402
402
|
description: e.emptyLabel
|
|
403
403
|
}, null, 8, ["description"])),
|
|
404
|
-
|
|
404
|
+
S(e.$slots, "empty", {}, void 0, !0)
|
|
405
405
|
]),
|
|
406
406
|
key: "0"
|
|
407
407
|
} : void 0,
|
|
408
408
|
e.$slots.append ? {
|
|
409
409
|
name: "append",
|
|
410
410
|
fn: i(() => [
|
|
411
|
-
|
|
411
|
+
S(e.$slots, "append", {}, void 0, !0)
|
|
412
412
|
]),
|
|
413
413
|
key: "1"
|
|
414
414
|
} : void 0
|
|
415
415
|
]), 1040, ["data"])), [
|
|
416
416
|
[ce, e.loading]
|
|
417
417
|
]),
|
|
418
|
-
e.showPagination ? (s(), f(fe,
|
|
418
|
+
e.showPagination ? (s(), f(fe, y({
|
|
419
419
|
key: 0,
|
|
420
420
|
"current-page": E(c),
|
|
421
421
|
"onUpdate:currentPage": o[0] || (o[0] = (t) => W(c) ? c.value = t : null),
|
|
@@ -426,7 +426,7 @@ const _e = { class: "ls-table-wrap" }, Le = X({
|
|
|
426
426
|
disabled: e.loading,
|
|
427
427
|
"page-sizes": e.pageSizes,
|
|
428
428
|
total: e.total
|
|
429
|
-
}, e.paginationOptions), null, 16, ["current-page", "page-size", "class", "disabled", "page-sizes", "total"])) :
|
|
429
|
+
}, e.paginationOptions), null, 16, ["current-page", "page-size", "class", "disabled", "page-sizes", "total"])) : k("", !0)
|
|
430
430
|
]),
|
|
431
431
|
_: 3
|
|
432
432
|
}, 8, ["locale"])
|
|
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-987b9e92"]]);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-987b9e92"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var D=Object.defineProperty;var a=(f,p)=>D(f,"name",{value:p,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=/* empty css */H=;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const t=require("vue"),I=/* empty css */
|
|
1
|
+
"use strict";var D=Object.defineProperty;var a=(f,p)=>D(f,"name",{value:p,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=/* empty css */H=;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const t=require("vue"),I=/* empty css */R=/* empty css */b=/* empty css */z=t.defineComponent({name:"LSTree"}),M=t.defineComponent({...z,props:b.lsTreeProps,emits:b.emitNames,setup(f,{expose:p,emit:x}){const y=x,d=f,N=I.useNamespace("tree"),q=N.b(),S=N.b("box"),o=t.ref(),i=t.ref(!1),u=t.ref(!1),m=t.ref([]),E=t.computed(()=>d.height?{maxHeight:d.height}:{}),k=t.computed(()=>d.treeData),w=a(({isPenultimate:e})=>e?"is-penultimate":"","customNodeClass");t.watch(()=>k.value,async e=>{e&&e.length>0&&(i.value=!1,u.value=!1,m.value=T(),await t.nextTick(),o.value.filter(),v(),await A())},{immediate:!0,deep:!0});function T(){return k.value.reduce((e,n)=>(e.push(n.id),n.children&&e.push(...g(n.children)),e),[])}a(T,"getAllNodeKeys");function g(e){return e.reduce((n,l)=>(n.push(l.id),l.children&&n.push(...g(l.children)),n),[])}a(g,"getAllChildKeys");async function A(){var n,l;await t.nextTick();const e=document.getElementsByClassName("hide-child-node");for(let s=0;s<e.length;s++){const r=e[s].parentNode;r.style.opacity=0,r.style.width=0,r.style.height=0;const h=r.parentNode.parentNode.querySelectorAll(".el-tree-node");let c=!0;for(let C=0;C<h.length;C++)if(h[C].style.display!=="none"){c=!1;break}(l=(n=r==null?void 0:r.parentNode)==null?void 0:n.parentNode)!=null&&l.previousElementSibling&&c&&(r.parentNode.parentNode.previousElementSibling.querySelector(".el-icon").style.opacity=0,r.parentNode.parentNode.previousElementSibling.querySelector(".el-icon").style.visibility="hidden")}}a(A,"updateHideStyle");function P(){u.value=!1,o.value&&o.value.setCheckedKeys(i.value?m.value:[])}a(P,"handleCheckAllChange");function V(e,n){const{permission:l}=n||{};if(l!=null&&l.startsWith(d.hideNodePrefix))return!1;if(!e)return!0;const{label:s}=d.dataProps||{};return s?n[s].indexOf(e)!==-1:!0}a(V,"filterNode");function B(e,n){o.value.setCheckedNodes(R.excutePowerTree(k.value,e,n)),y("handleCheck",e,n)}a(B,"handleCheck");function K(e,n){v(),y("handleChekChange",e,n)}a(K,"handleChekChange");function v(){const e=o.value.getCheckedNodes(!1,!0);let n=[];if(e.forEach(l=>{const{id:s,parentId:r}=l;n.push(s||r)}),n.length>0){const l=n.length===m.value.length;i.value=l,u.value=!l}else i.value=!1,u.value=!1}return a(v,"updateAllCheckStatus"),p({lsTreeRef:o}),(e,n)=>{const l=_.ElCheckbox,s=H.ElTree;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(q))},[e.isCheckAll?(t.openBlock(),t.createBlock(l,{key:0,modelValue:t.unref(i),"onUpdate:modelValue":n[0]||(n[0]=r=>t.isRef(i)?i.value=r:null),indeterminate:t.unref(u),onChange:P},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode(" 全选 ",-1)])),_:1,__:[1]},8,["modelValue","indeterminate"])):t.createCommentVNode("",!0),t.createVNode(s,t.mergeProps({ref_key:"lsTreeRef",ref:o,"show-checkbox":e.showCheckbox,"default-expand-all":e.defaultExpandAll,"node-key":e.nodeKey,"check-strictly":e.isCheckStrictly,style:t.unref(E),class:[t.unref(S),!e.isExpand&&"expand-disabled"],data:e.treeData,props:{...e.dataProps,class:w},"default-checked-keys":e.defaultCheckedKeys,"expand-on-click-node":e.isExpand,"filter-node-method":V},e.attrs,{onCheck:B,onCheckChange:K}),{default:t.withCtx(({node:r,data:h})=>{var c;return[t.createElementVNode("span",{class:t.normalizeClass(["custom-tree-node",{"hide-child-node":e.hideNodePrefix&&((c=h.permission)==null?void 0:c.startsWith(e.hideNodePrefix))}])},[t.createElementVNode("span",null,t.toDisplayString(r.label),1)],2)]}),_:1},16,["show-checkbox","default-expand-all","node-key","check-strictly","style","class","data","props","default-checked-keys","expand-on-click-node"])],2)}}});exports.default=M;
|
|
@@ -9,14 +9,14 @@ import { ElTree as U } from "../../../../../node_modules/.pnpm/element-plus@2.13
|
|
|
9
9
|
/* empty css */
|
|
10
10
|
import { defineComponent as T, ref as p, computed as x, watch as j, nextTick as E, createElementBlock as F, openBlock as S, normalizeClass as w, unref as u, createBlock as G, createCommentVNode as J, createVNode as M, isRef as Q, withCtx as A, createTextVNode as X, mergeProps as Y, createElementVNode as P, toDisplayString as Z } from "vue";
|
|
11
11
|
import { useNamespace as $ } from "../../_hooks/useNamespace/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { excutePowerTree as ee } from "../../_utils/power/index.js";
|
|
13
|
+
import { emitNames as te, lsTreeProps as le } from "../types/index.js";
|
|
14
14
|
const ne = T({
|
|
15
15
|
name: "LSTree"
|
|
16
16
|
}), ye = /* @__PURE__ */ T({
|
|
17
17
|
...ne,
|
|
18
|
-
props:
|
|
19
|
-
emits:
|
|
18
|
+
props: le,
|
|
19
|
+
emits: te,
|
|
20
20
|
setup(f, { expose: m, emit: K }) {
|
|
21
21
|
const N = K, i = f, g = $("tree"), V = g.b(), B = g.b("box"), s = p(), r = p(!1), d = p(!1), k = p([]), D = x(() => i.height ? {
|
|
22
22
|
maxHeight: i.height
|
|
@@ -71,7 +71,7 @@ const ne = T({
|
|
|
71
71
|
}
|
|
72
72
|
a(W, "filterNode");
|
|
73
73
|
function _(e, t) {
|
|
74
|
-
s.value.setCheckedNodes(
|
|
74
|
+
s.value.setCheckedNodes(ee(y.value, e, t)), N("handleCheck", e, t);
|
|
75
75
|
}
|
|
76
76
|
a(_, "handleCheck");
|
|
77
77
|
function z(e, t) {
|
|
Binary file
|
|
Binary file
|