@lingshugroup/web-plus 1.0.12 → 1.0.13
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 +3 -1
- 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/button/Button.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index.js +2 -2
- 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 +26 -26
- 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/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/types/index.js +6 -2
- package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/form/types/index.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 +72 -72
- 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 +15 -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/menu/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/menu/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/menu/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/menu/Index.vue/index2.js +7 -7
- package/lib/packages/ls-components/components/menu/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/menu/Index.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 +1 -1
- 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/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var pe = Object.defineProperty;
|
|
2
|
-
var o = (
|
|
2
|
+
var o = (P, $) => pe(P, "name", { value: $, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
@@ -10,9 +10,9 @@ var o = (k, P) => pe(k, "name", { value: P, configurable: !0 });
|
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
|
-
import { defineComponent as Y, useSlots as
|
|
14
|
-
import
|
|
15
|
-
import { ElDivider as X, ElButton as
|
|
13
|
+
import { defineComponent as Y, useSlots as Te, computed as A, ref as D, h as we, unref as i, openBlock as n, createElementBlock as B, createBlock as f, mergeProps as g, createSlots as j, withCtx as s, renderSlot as u, normalizeProps as O, guardReactiveProps as z, renderList as G, createCommentVNode as b, Fragment as J, createElementVNode as N, normalizeClass as ye, createTextVNode as v, toDisplayString as E, createVNode as S, isRef as Q, toHandlers as De } from "vue";
|
|
14
|
+
import ge from "../../_hooks/useTableListHook/index.js";
|
|
15
|
+
import { ElDivider as X, ElButton as k, ElSwitch as ve, ElSpace as Ee, ElMessage as Se, ElMessageBox as ke } from "element-plus";
|
|
16
16
|
import { lsListProps as Pe } from "../types/index.js";
|
|
17
17
|
import $e from "../../form/Form.vue/index.js";
|
|
18
18
|
import Ce from "../../table/Table.vue/index.js";
|
|
@@ -29,64 +29,64 @@ const Be = {
|
|
|
29
29
|
...ze,
|
|
30
30
|
props: Pe,
|
|
31
31
|
emits: ["submitForm"],
|
|
32
|
-
setup(
|
|
33
|
-
const { jumpRouteCom:
|
|
34
|
-
function
|
|
32
|
+
setup(P, { expose: $, emit: Z }) {
|
|
33
|
+
const { jumpRouteCom: C, currentRouter: K } = Re(), e = P, _ = Z, H = Te(), x = A(() => Object.keys(H).filter((t) => t.toString().endsWith("-form-slot"))), ee = A(() => Object.keys(H).filter((t) => t.toString().endsWith("-table-slot")));
|
|
34
|
+
function I(t, l = !1) {
|
|
35
35
|
if (t) {
|
|
36
36
|
const d = t.toString().lastIndexOf(`${l ? "-form-slot" : "-table-slot"}`);
|
|
37
37
|
return d !== -1 ? t.toString().slice(0, d) : t;
|
|
38
38
|
}
|
|
39
39
|
return "";
|
|
40
40
|
}
|
|
41
|
-
o(
|
|
42
|
-
const { isFirst:
|
|
41
|
+
o(I, "getSlotName");
|
|
42
|
+
const { isFirst: V, loading: p, tableData: M, total: U, pageSize: T, currentPage: w, handleReset: q, loadData: y } = ge(
|
|
43
43
|
e.listApi,
|
|
44
44
|
e.formData,
|
|
45
45
|
{ dealData: e == null ? void 0 : e.dealData, dealParams: e == null ? void 0 : e.dealParams, ...e == null ? void 0 : e.listHookConfig }
|
|
46
46
|
);
|
|
47
47
|
function te(t) {
|
|
48
|
-
_("submitForm", t), e != null && e.queryFn ? e.queryFn(t) :
|
|
48
|
+
_("submitForm", t), e != null && e.queryFn ? e.queryFn(t) : y();
|
|
49
49
|
}
|
|
50
50
|
o(te, "submitForm");
|
|
51
51
|
function le(t) {
|
|
52
|
-
console.warn("resetForm", t),
|
|
52
|
+
console.warn("resetForm", t), q();
|
|
53
53
|
}
|
|
54
54
|
o(le, "resetForm");
|
|
55
|
-
const
|
|
55
|
+
const R = A(() => K ? K.value.path : "");
|
|
56
56
|
function ae() {
|
|
57
|
-
e != null && e.addFn ? e.addFn() :
|
|
57
|
+
e != null && e.addFn ? e.addFn() : C(
|
|
58
58
|
{
|
|
59
|
-
path: e != null && e.addRoutePath ? e.addRoutePath : `${
|
|
59
|
+
path: e != null && e.addRoutePath ? e.addRoutePath : `${R.value}/add`
|
|
60
60
|
},
|
|
61
61
|
1
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
o(ae, "onAdd");
|
|
65
65
|
function ie(t, l) {
|
|
66
|
-
e != null && e.tableDetailFn ? e.tableDetailFn(l) :
|
|
66
|
+
e != null && e.tableDetailFn ? e.tableDetailFn(l) : C(
|
|
67
67
|
{
|
|
68
|
-
path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${
|
|
68
|
+
path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${R.value}/detail`}/${t}`
|
|
69
69
|
},
|
|
70
70
|
1
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
73
|
o(ie, "onDetail");
|
|
74
74
|
function oe(t, l) {
|
|
75
|
-
e != null && e.tableEditFn ? e.tableEditFn(l) :
|
|
75
|
+
e != null && e.tableEditFn ? e.tableEditFn(l) : C(
|
|
76
76
|
{
|
|
77
|
-
path: `${e != null && e.editRoutePath ? e.editRoutePath : `${
|
|
77
|
+
path: `${e != null && e.editRoutePath ? e.editRoutePath : `${R.value}/edit`}/${t}`
|
|
78
78
|
},
|
|
79
79
|
1
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
o(oe, "onEdit");
|
|
83
|
-
const
|
|
83
|
+
const F = D(void 0), h = D(!1);
|
|
84
84
|
function ne(t, l) {
|
|
85
85
|
if (e.delApi) {
|
|
86
|
-
|
|
86
|
+
F.value = t, h.value = !0;
|
|
87
87
|
let d = t;
|
|
88
88
|
e != null && e.dealDelParams && (d = e.dealDelParams(l)), e.delApi(d).then(() => {
|
|
89
|
-
|
|
89
|
+
Se.success("删除成功"), y();
|
|
90
90
|
}).catch((m) => {
|
|
91
91
|
console.warn(m);
|
|
92
92
|
}).finally(() => {
|
|
@@ -95,19 +95,19 @@ const Be = {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
o(ne, "onDel");
|
|
98
|
-
const
|
|
98
|
+
const W = D(), L = D(!1);
|
|
99
99
|
function se(t, l, d) {
|
|
100
|
-
|
|
100
|
+
W.value = t;
|
|
101
101
|
const m = /* @__PURE__ */ o((c, a) => {
|
|
102
102
|
if (e.switchApi) {
|
|
103
|
-
|
|
103
|
+
L.value = !0;
|
|
104
104
|
let r = t;
|
|
105
105
|
e != null && e.dealSwitchParams && (r = e.dealSwitchParams(d)), e.switchApi(r).then(() => {
|
|
106
|
-
|
|
106
|
+
y(!1), c(!0);
|
|
107
107
|
}).catch(() => {
|
|
108
108
|
a(new Error("Error"));
|
|
109
109
|
}).finally(() => {
|
|
110
|
-
|
|
110
|
+
L.value = !1;
|
|
111
111
|
});
|
|
112
112
|
} else
|
|
113
113
|
a(new Error("Error"));
|
|
@@ -163,23 +163,23 @@ const Be = {
|
|
|
163
163
|
return e != null && e.disabledTableDel && (typeof e.disabledTableDel == "boolean" ? l = e.disabledTableDel : typeof e.disabledTableDel == "function" && (l = e.disabledTableDel(t))), !!l;
|
|
164
164
|
}
|
|
165
165
|
o(ce, "disabledTableDel");
|
|
166
|
-
const he =
|
|
167
|
-
return
|
|
168
|
-
loadData:
|
|
169
|
-
handleReset:
|
|
170
|
-
isFirst:
|
|
166
|
+
const he = we(X, { direction: "vertical" });
|
|
167
|
+
return $({
|
|
168
|
+
loadData: y,
|
|
169
|
+
handleReset: q,
|
|
170
|
+
isFirst: V,
|
|
171
171
|
loading: p,
|
|
172
|
-
currentPage:
|
|
173
|
-
pageSize:
|
|
174
|
-
total:
|
|
172
|
+
currentPage: w,
|
|
173
|
+
pageSize: T,
|
|
174
|
+
total: U
|
|
175
175
|
}), (t, l) => {
|
|
176
176
|
const d = Fe, m = Le, c = Ae;
|
|
177
|
-
return i(
|
|
177
|
+
return i(V) ? (n(), f(c, {
|
|
178
178
|
key: 1,
|
|
179
179
|
rows: 5,
|
|
180
180
|
animated: ""
|
|
181
|
-
})) : (n(),
|
|
182
|
-
t.showForm ? (n(), f($e,
|
|
181
|
+
})) : (n(), B("div", Be, [
|
|
182
|
+
t.showForm ? (n(), f($e, g({
|
|
183
183
|
key: 0,
|
|
184
184
|
class: ["mb-6px ls-form-cpo", t.formClass],
|
|
185
185
|
"label-position": "top",
|
|
@@ -193,37 +193,37 @@ const Be = {
|
|
|
193
193
|
}, t.formAttrs, {
|
|
194
194
|
onSubmit: te,
|
|
195
195
|
onReset: le
|
|
196
|
-
}),
|
|
196
|
+
}), j({
|
|
197
197
|
default: s((a) => [
|
|
198
|
-
u(t.$slots, "form-append",
|
|
198
|
+
u(t.$slots, "form-append", O(z(a)), void 0, !0)
|
|
199
199
|
]),
|
|
200
200
|
_: 2
|
|
201
201
|
}, [
|
|
202
|
-
|
|
203
|
-
name:
|
|
202
|
+
G(i(x), (a) => ({
|
|
203
|
+
name: I(a, !0),
|
|
204
204
|
fn: s((r) => [
|
|
205
|
-
u(t.$slots, a,
|
|
205
|
+
u(t.$slots, a, O(z(r)), void 0, !0)
|
|
206
206
|
])
|
|
207
207
|
}))
|
|
208
208
|
]), 1040, ["class", "form-data", "form-items", "loading"])) : b("", !0),
|
|
209
|
-
t.showOperate ? (n(),
|
|
210
|
-
t.$slots.operate ? u(t.$slots, "operate", { key: 0 }, void 0, !0) : (n(),
|
|
209
|
+
t.showOperate ? (n(), B(J, { key: 1 }, [
|
|
210
|
+
t.$slots.operate ? u(t.$slots, "operate", { key: 0 }, void 0, !0) : (n(), B(J, { key: 1 }, [
|
|
211
211
|
t.showOperateDivider ? (n(), f(i(X), {
|
|
212
212
|
key: 0,
|
|
213
213
|
"border-style": "dashed"
|
|
214
214
|
})) : b("", !0),
|
|
215
|
-
|
|
216
|
-
class:
|
|
215
|
+
N("div", {
|
|
216
|
+
class: ye(["mt-24px flex items-center justify-start", t.operateClass])
|
|
217
217
|
}, [
|
|
218
218
|
u(t.$slots, "operate-prepend", {}, void 0, !0),
|
|
219
|
-
t.showAdd ? (n(), f(i(
|
|
219
|
+
t.showAdd ? (n(), f(i(k), {
|
|
220
220
|
key: 0,
|
|
221
221
|
type: "primary",
|
|
222
222
|
disabled: i(p) || t.disabledAddBtn,
|
|
223
223
|
onClick: ae
|
|
224
224
|
}, {
|
|
225
225
|
default: s(() => [
|
|
226
|
-
v(
|
|
226
|
+
v(E(t.addBtnText), 1)
|
|
227
227
|
]),
|
|
228
228
|
_: 1
|
|
229
229
|
}, 8, ["disabled"])) : b("", !0),
|
|
@@ -231,20 +231,20 @@ const Be = {
|
|
|
231
231
|
], 2)
|
|
232
232
|
], 64))
|
|
233
233
|
], 64)) : b("", !0),
|
|
234
|
-
S(Ce,
|
|
234
|
+
S(Ce, g({
|
|
235
235
|
class: ["ls-table-cpo", [t.showOperate ? "mt-16px" : "mt-24px"]],
|
|
236
236
|
"show-overflow-tooltip": !0,
|
|
237
237
|
loading: i(p),
|
|
238
|
-
total: i(
|
|
239
|
-
"table-data": i(
|
|
238
|
+
total: i(U),
|
|
239
|
+
"table-data": i(M),
|
|
240
240
|
"table-column": t.tableColumn,
|
|
241
|
-
"current-page": i(
|
|
242
|
-
"onUpdate:currentPage": l[0] || (l[0] = (a) => Q(
|
|
243
|
-
"page-size": i(
|
|
244
|
-
"onUpdate:pageSize": l[1] || (l[1] = (a) => Q(
|
|
245
|
-
}, t.tableAttrs,
|
|
241
|
+
"current-page": i(w),
|
|
242
|
+
"onUpdate:currentPage": l[0] || (l[0] = (a) => Q(w) ? w.value = a : null),
|
|
243
|
+
"page-size": i(T),
|
|
244
|
+
"onUpdate:pageSize": l[1] || (l[1] = (a) => Q(T) ? T.value = a : null)
|
|
245
|
+
}, t.tableAttrs, De(t.tableListeners || {})), j({
|
|
246
246
|
default: s(() => [
|
|
247
|
-
t.showTableSwitch ? (n(), f(d,
|
|
247
|
+
t.showTableSwitch ? (n(), f(d, g({
|
|
248
248
|
key: 0,
|
|
249
249
|
prop: t.switchProp,
|
|
250
250
|
label: "是否开启",
|
|
@@ -256,14 +256,14 @@ const Be = {
|
|
|
256
256
|
"model-value": a[t.switchProp] ? 1 : 0,
|
|
257
257
|
"active-value": 1,
|
|
258
258
|
"inactive-value": 0,
|
|
259
|
-
loading: i(
|
|
259
|
+
loading: i(L) && a[t.tableRowKey] === i(W),
|
|
260
260
|
"before-change": /* @__PURE__ */ o(() => se(a[t.tableRowKey], a[t.switchProp], a), "before-change"),
|
|
261
261
|
disabled: de(a)
|
|
262
262
|
}, null, 8, ["model-value", "loading", "before-change", "disabled"])
|
|
263
263
|
]),
|
|
264
264
|
_: 1
|
|
265
265
|
}, 16, ["prop"])) : b("", !0),
|
|
266
|
-
t.showTableOperate ? (n(), f(d,
|
|
266
|
+
t.showTableOperate ? (n(), f(d, g({
|
|
267
267
|
key: 1,
|
|
268
268
|
fixed: "right",
|
|
269
269
|
prop: "operate",
|
|
@@ -271,14 +271,14 @@ const Be = {
|
|
|
271
271
|
"show-overflow-tooltip": !1
|
|
272
272
|
}, t.tableOperateColumn), {
|
|
273
273
|
default: s(({ row: a }) => [
|
|
274
|
-
|
|
275
|
-
S(i(
|
|
274
|
+
N("div", Oe, [
|
|
275
|
+
S(i(Ee), {
|
|
276
276
|
size: 0,
|
|
277
277
|
spacer: i(he)
|
|
278
278
|
}, {
|
|
279
279
|
default: s(() => [
|
|
280
280
|
u(t.$slots, "table-operate-prepend", { row: a }, void 0, !0),
|
|
281
|
-
re(a) ? (n(), f(i(
|
|
281
|
+
re(a) ? (n(), f(i(k), {
|
|
282
282
|
key: 0,
|
|
283
283
|
disabled: fe(a),
|
|
284
284
|
link: "",
|
|
@@ -286,11 +286,11 @@ const Be = {
|
|
|
286
286
|
onClick: /* @__PURE__ */ o((r) => ie(a[t.tableRowKey], a), "onClick")
|
|
287
287
|
}, {
|
|
288
288
|
default: s(() => [
|
|
289
|
-
v(
|
|
289
|
+
v(E(t.tableDetailText || "查看"), 1)
|
|
290
290
|
]),
|
|
291
291
|
_: 2
|
|
292
292
|
}, 1032, ["disabled", "onClick"])) : b("", !0),
|
|
293
|
-
ue(a) ? (n(), f(i(
|
|
293
|
+
ue(a) ? (n(), f(i(k), {
|
|
294
294
|
key: 1,
|
|
295
295
|
disabled: be(a),
|
|
296
296
|
link: "",
|
|
@@ -298,7 +298,7 @@ const Be = {
|
|
|
298
298
|
onClick: /* @__PURE__ */ o((r) => oe(a[t.tableRowKey], a), "onClick")
|
|
299
299
|
}, {
|
|
300
300
|
default: s(() => [
|
|
301
|
-
v(
|
|
301
|
+
v(E(t.tableEditText || "编辑"), 1)
|
|
302
302
|
]),
|
|
303
303
|
_: 2
|
|
304
304
|
}, 1032, ["disabled", "onClick"])) : b("", !0),
|
|
@@ -313,14 +313,14 @@ const Be = {
|
|
|
313
313
|
onConfirm: /* @__PURE__ */ o((r) => ne(a[t.tableRowKey], a), "onConfirm")
|
|
314
314
|
}, {
|
|
315
315
|
reference: s(() => [
|
|
316
|
-
S(i(
|
|
316
|
+
S(i(k), {
|
|
317
317
|
link: "",
|
|
318
318
|
type: "danger",
|
|
319
319
|
disabled: i(h) || ce(a),
|
|
320
|
-
loading: i(h) && i(
|
|
320
|
+
loading: i(h) && i(F) === a[t.tableRowKey]
|
|
321
321
|
}, {
|
|
322
322
|
default: s(() => [
|
|
323
|
-
v(
|
|
323
|
+
v(E(i(h) && i(F) === a[t.tableRowKey] ? "" : t.tableDelText || "删除"), 1)
|
|
324
324
|
]),
|
|
325
325
|
_: 2
|
|
326
326
|
}, 1032, ["disabled", "loading"])
|
|
@@ -335,14 +335,14 @@ const Be = {
|
|
|
335
335
|
]),
|
|
336
336
|
_: 3
|
|
337
337
|
}, 16)) : b("", !0),
|
|
338
|
-
u(t.$slots, "table-append", { tableData: i(
|
|
338
|
+
u(t.$slots, "table-append", { tableData: i(M) }, void 0, !0)
|
|
339
339
|
]),
|
|
340
340
|
_: 2
|
|
341
341
|
}, [
|
|
342
|
-
|
|
343
|
-
name:
|
|
342
|
+
G(i(ee), (a) => ({
|
|
343
|
+
name: I(a, !1),
|
|
344
344
|
fn: s((r) => [
|
|
345
|
-
u(t.$slots, a,
|
|
345
|
+
u(t.$slots, a, O(z(r)), void 0, !0)
|
|
346
346
|
])
|
|
347
347
|
}))
|
|
348
348
|
]), 1040, ["class", "loading", "total", "table-data", "table-column", "current-page", "page-size"])
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var t=(e,a)=>l(e,"name",{value:a,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../_utils/runtime/index.cjs"),n=o.buildProps({listApi:{type:Function},dealParams:{type:Function},dealData:{type:Function},listHookConfig:{type:Object},delApi:{type:Function},dealDelParams:{type:Function},switchApi:{type:Function},dealSwitchParams:{type:Function},showForm:{type:Boolean,default:!0},formClass:{type:String,default:""},formData:{type:Object,default:t(()=>({}),"default")},formItems:{type:Array,default:t(()=>[],"default")},formAttrs:{type:Object,default:t(()=>{},"default")},queryFn:{type:Function},tableColumn:{type:Array,default:t(()=>[],"default")},tableRowKey:{type:String,default:"id"},tableAttrs:{type:Object,default:t(()=>{},"default")},tableListeners:{type:Object,default:t(()=>{},"default")},showOperate:{type:Boolean,default:!0},showOperateDivider:{type:Boolean,default:!0},operateClass:{type:String,default:""},showAdd:{type:Boolean,default:!0},disabledAddBtn:{type:Boolean,default:!1},addBtnText:{type:String,default:"添加"},addFn:{type:Function},showTableSwitch:{type:Boolean,default:!1},switchProp:{type:String,default:"status"},tableSwitchColumn:{type:Object,default:t(()=>{},"default")},disabledTableSwitch:{type:[Boolean,Function],default:!1},showTableOperate:{type:Boolean,default:!0},tableOperateColumn:{type:Object,default:t(()=>{},"default")},tableDetailFn:{type:Function},tableEditFn:{type:Function},showTableDetail:{type:[Boolean,Function],default:!0},disabledTableDetail:{type:[Boolean,Function],default:!1},showTableEdit:{type:[Boolean,Function],default:!0},disabledTableEdit:{type:[Boolean,Function],default:!1},showTableDel:{type:[Boolean,Function],default:!0},disabledTableDel:{type:[Boolean,Function],default:!1},addRoutePath:{type:String,default:""},detailRoutePath:{type:String,default:""},editRoutePath:{type:String,default:""},tableDetailText:{type:String,default:"查看"},tableEditText:{type:String,default:"编辑"},tableDelText:{type:String,default:"删除"}});exports.lsListProps=n;
|
|
@@ -203,6 +203,21 @@ const d = o({
|
|
|
203
203
|
editRoutePath: {
|
|
204
204
|
type: String,
|
|
205
205
|
default: ""
|
|
206
|
+
},
|
|
207
|
+
// 表格查看按钮文案
|
|
208
|
+
tableDetailText: {
|
|
209
|
+
type: String,
|
|
210
|
+
default: "查看"
|
|
211
|
+
},
|
|
212
|
+
// 表格编辑按钮文案
|
|
213
|
+
tableEditText: {
|
|
214
|
+
type: String,
|
|
215
|
+
default: "编辑"
|
|
216
|
+
},
|
|
217
|
+
// 表格删除按钮文案
|
|
218
|
+
tableDelText: {
|
|
219
|
+
type: String,
|
|
220
|
+
default: "删除"
|
|
206
221
|
}
|
|
207
222
|
});
|
|
208
223
|
export {
|
|
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 u=,/* empty css */t=u.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 u=,/* empty css */t=u.default(e.default,[["__scopeId","data-v-28207941"]]);exports.default=t;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-28207941"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var k=Object.defineProperty;var i=(o,r)=>k(o,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),M=,/* empty css */m=,/* empty css */q=,/* empty css */C=,/* empty css */y=,/* empty css */S=e.defineComponent({name:"LSMenu"}),g=e.defineComponent({...S,props:m.lsMenuProps,emits:m.lsEmitNames,setup(o,{emit:r}){e.useCssVars(n=>({
|
|
1
|
+
"use strict";var k=Object.defineProperty;var i=(o,r)=>k(o,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),M=,/* empty css */m=,/* empty css */q=,/* empty css */C=,/* empty css */y=,/* empty css */S=e.defineComponent({name:"LSMenu"}),g=e.defineComponent({...S,props:m.lsMenuProps,emits:m.lsEmitNames,setup(o,{emit:r}){e.useCssVars(n=>({34792420:n.hoverColor}));const{currentRouter:s}=q.default(),p=M.useNamespace("menu").b(),l=o,d=r,c=e.ref(!1),a=e.ref(""),f=e.ref();e.watch(()=>l.permissionList,n=>{l.needPermission&&n&&n.length>0&&u()},{immediate:!0,deep:!0}),e.watch(()=>s.value,()=>{u()},{immediate:!0,deep:!0});function u(){if(!c.value)return;const{meta:n}=(s==null?void 0:s.value)||{};a.value=(n==null?void 0:n.key)||"1"}i(u,"initMenuSider");function _(n){d("onJump",n)}return i(_,"onJump"),e.onMounted(()=>{c.value=!0,u()}),(n,B)=>{const v=y.ElMenu;return e.openBlock(),e.createBlock(v,e.mergeProps({ref_key:"lsComMenu",ref:f},n.$attrs,{class:e.unref(p),"default-active":e.unref(a)}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menuConfigList,t=>(e.openBlock(),e.createBlock(C.default,{key:t.key,item:t,"permission-list":n.permissionList,"need-permission":n.needPermission,onOnJump:_},{[t.iconSlot]:e.withCtx(()=>[e.renderSlot(n.$slots,t.iconSlot,{},void 0,!0)]),_:2},1032,["item","permission-list","need-permission"]))),128))]),_:3},16,["class","default-active"])}}});exports.default=g;
|
|
@@ -4,7 +4,7 @@ var i = (n, t) => L(n, "name", { value: t, configurable: !0 });
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { defineComponent as v, useCssVars as S, ref as m, watch as
|
|
7
|
+
import { defineComponent as v, useCssVars as S, ref as m, watch as c, onMounted as g, openBlock as u, createBlock as f, mergeProps as P, unref as d, withCtx as _, createElementBlock as B, Fragment as E, renderList as J, renderSlot as $ } from "vue";
|
|
8
8
|
import { useNamespace as w } from "../../_hooks/useNamespace/index.js";
|
|
9
9
|
import { lsMenuProps as N, lsEmitNames as b } from "../types/index.js";
|
|
10
10
|
import F from "../../_hooks/useRouterHook/index.js";
|
|
@@ -18,10 +18,10 @@ const K = v({
|
|
|
18
18
|
emits: b,
|
|
19
19
|
setup(n, { emit: t }) {
|
|
20
20
|
S((e) => ({
|
|
21
|
-
|
|
21
|
+
34792420: e.hoverColor
|
|
22
22
|
}));
|
|
23
|
-
const { currentRouter: o } = F(), k = w("menu").b(), l = n, C = t, p = m(!1),
|
|
24
|
-
|
|
23
|
+
const { currentRouter: o } = F(), k = w("menu").b(), l = n, C = t, p = m(!1), a = m(""), M = m();
|
|
24
|
+
c(
|
|
25
25
|
() => l.permissionList,
|
|
26
26
|
(e) => {
|
|
27
27
|
l.needPermission && e && e.length > 0 && r();
|
|
@@ -30,7 +30,7 @@ const K = v({
|
|
|
30
30
|
immediate: !0,
|
|
31
31
|
deep: !0
|
|
32
32
|
}
|
|
33
|
-
),
|
|
33
|
+
), c(
|
|
34
34
|
() => o.value,
|
|
35
35
|
() => {
|
|
36
36
|
r();
|
|
@@ -44,7 +44,7 @@ const K = v({
|
|
|
44
44
|
if (!p.value)
|
|
45
45
|
return;
|
|
46
46
|
const { meta: e } = (o == null ? void 0 : o.value) || {};
|
|
47
|
-
|
|
47
|
+
a.value = (e == null ? void 0 : e.key) || "1";
|
|
48
48
|
}
|
|
49
49
|
i(r, "initMenuSider");
|
|
50
50
|
function h(e) {
|
|
@@ -59,7 +59,7 @@ const K = v({
|
|
|
59
59
|
ref: M
|
|
60
60
|
}, e.$attrs, {
|
|
61
61
|
class: d(k),
|
|
62
|
-
"default-active": d(
|
|
62
|
+
"default-active": d(a)
|
|
63
63
|
}), {
|
|
64
64
|
default: _(() => [
|
|
65
65
|
(u(!0), B(E, null, J(e.menuConfigList, (s) => (u(), f(H, {
|
|
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-f1015473"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f1015473"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var h=(m,y)=>A(m,"name",{value:y,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 */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),O=,/* empty css */L=,/* empty css */w=,/* empty css */j=,/* empty css */g=,/* empty css */F=,/* empty css */q=,/* empty css */Y=,/* empty css */H=,/* empty css */U=,/* empty css */G=,/* empty css */J=,/* empty css */K={class:"ls-table-wrap"},Q=e.defineComponent({name:"LSTable"}),W=e.defineComponent({...Q,inheritAttrs:!1,props:L.lsTableProps,emits:["sizeChange","currentPageChange","update:page-size","update:current-page","update:selection"],setup(m,{expose:y,emit:E}){const s=m,u=E,d=e.useAttrs(),k=e.ref(),c=e.ref(1),f=e.ref(10),p=e.ref([]);e.watch(()=>s.currentPage,t=>{if(t!==c.value){const l=Math.max(1,Math.min(t,Math.ceil(s.total/f.value)));c.value=l,l!==t&&u("update:current-page",l)}},{immediate:!0}),e.watch([()=>s.pageSize,()=>s.pageSizes],([t,l])=>{let a=t;w.isEmpty(l)||(a=l.includes(t)?t:l[0]),f.value=a,a!==t&&u("update:page-size",a)},{immediate:!0}),e.watch(()=>s.selection,t=>{p.value=t||[]},{immediate:!0,deep:!0}),e.watch([()=>s.tableData,()=>s.showSelect,()=>s.selection],([t,l,a])=>{l&&t&&t.length>0&&e.nextTick(()=>{t.forEach(r=>{(a||[]).some(v=>v.id===r.id)&&k.value.toggleRowSelection(r,!0)})})},{immediate:!0,deep:!0}),e.watch(()=>p.value,t=>{u("update:selection",t)},{deep:!0}),e.watch(c,t=>{u("currentPageChange",t),u("update:current-page",t)}),e.watch(f,t=>{u("sizeChange",t),u("update:page-size",t)});function P(t){return(c.value-1)*f.value+t+1}h(P,"indexMethod");function $(t,l){return t?O.default(t).format(l||"YYYY-MM-DD HH:mm:ss"):s.labelEmpty||"--"}h($,"formatDate");function z(t,l){const a=(t||[]).findIndex(i=>i.id===l.id),r=(p.value||[]).findIndex(i=>i.id===l.id);a>-1?p.value.push(l):p.value.splice(r,1)}h(z,"handleSelect");function T(t){const l=t.length>0;s.tableData.length>0&&s.tableData.forEach(a=>{const r=(p.value||[]).findIndex(i=>i.id===a.id);l?r<0&&p.value.push(a):r>=0&&p.value.splice(r,1)})}h(T,"handleSelectAll");const N=e.computed(()=>{const t={...d};if(t["table-layout"]||(t["table-layout"]="auto"),s.showSelect&&(t.onSelect||(t.onSelect=z),t.onSelectAll||(t.onSelectAll=T)),d&&d.hasOwnProperty("show-overflow-tooltip"))if(typeof d["show-overflow-tooltip"]=="boolean")d["show-overflow-tooltip"]===!0&&(t["show-overflow-tooltip"]={popperClass:"table-popper-css"});else if(typeof d["show-overflow-tooltip"]=="object"){const l=d["show-overflow-tooltip"]||{},a=`table-popper-css ${l&&(l==null?void 0:l.popperClass)}`;t["show-overflow-tooltip"]={...l,popperClass:a}}else t["show-overflow-tooltip"]={popperClass:"table-popper-css"};else t["show-overflow-tooltip"]={popperClass:"table-popper-css"};return t});function C(t,l,a){var r;return(r=t[g.default(l,a)])==null?void 0:r.type}h(C,"getStatusType");function D(t="default",l,a){const r=[];return["dot","follow"].includes(t)&&(r.push("ls-table-status"),r.push(`ls-table-status--${l||"default"}`)),a&&r.push(a),r.join(" ")}return h(D,"getStatusClass"),y({TableRef:k}),(t,l)=>{const a=F.ElRadio,r=q.ElTableColumn,i=Y.ElText,v=H.ElEmpty,x=q.ElTable,R=U.ElPagination,V=G.ElConfigProvider,I=J.vLoading;return e.openBlock(),e.createElementBlock("div",K,[e.createVNode(V,{locale:e.unref(j.default)},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(x,e.mergeProps({ref_key:"TableRef",ref:k,style:{width:"100%"}},e.unref(N),{data:t.tableData}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend",{},void 0,!0),t.showRadio?(e.openBlock(),e.createBlock(r,e.mergeProps({key:0,width:"60"},t.radioColumnOptions),{default:e.withCtx(({row:o})=>[e.createVNode(a,{"model-value":t.currentRow?t.currentRow[t.radioProp]:void 0,label:o[t.radioProp]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.showRadioLabel?o[t.radioProp]:""),1)]),_:2},1032,["model-value","label"])]),_:1},16)):e.createCommentVNode("",!0),t.showSelect?(e.openBlock(),e.createBlock(r,e.mergeProps({key:1,width:"60"},t.selectColumnOptions,{type:"selection"}),null,16)):e.createCommentVNode("",!0),t.showExpand?(e.openBlock(),e.createBlock(r,e.mergeProps({key:2},t.expandColumnOptions,{type:"expand"}),{default:e.withCtx(({row:o})=>[e.renderSlot(t.$slots,"expand",{row:o},void 0,!0)]),_:3},16)):e.createCommentVNode("",!0),t.showTableIndex?(e.openBlock(),e.createBlock(r,e.mergeProps({key:3,width:"60",fixed:t.tableIndexfixed,label:t.tableIndexLabel,index:P},t.indexColumnOptions,{type:"index"}),null,16,["fixed","label"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tableColumn,o=>(e.openBlock(),e.createBlock(r,e.mergeProps({key:o.prop,ref_for:!0},o),e.createSlots({default:e.withCtx(({row:n,column:b,$index:M})=>[o.type==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString($(e.unref(g.default)(n,o.prop),o.dateTemplate)),1)],64)):o.type==="status"?(e.openBlock(),e.createBlock(i,{key:1,type:["default","follow"].includes(o.statusStyle||"default")&&C(o.value,n,o.prop),class:e.normalizeClass(D(o.statusStyle,C(o.value,n,o.prop),o.className))},{default:e.withCtx(()=>{var S,B;return[e.createTextVNode(e.toDisplayString(((S=o.value[e.unref(g.default)(n,o.prop)])==null?void 0:S.label)||((B=o.value.default)==null?void 0:B.label)||n[o.prop]),1)]}),_:2},1032,["type","class"])):o.type==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.unref(w.isEmpty)(e.unref(g.default)(n,o.prop))?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.labelEmpty||"--"),1)],64)):(e.openBlock(),e.createBlock(i,{key:1,type:Number(e.unref(g.default)(n,o.prop))<0?"danger":`${o.isSuc?"success":""}`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(g.default)(n,o.prop)),1)]),_:2},1032,["type"]))],64)):o.type==="slot"?e.renderSlot(t.$slots,o.prop,{key:3,row:n,column:b,index:M},void 0,!0):e.unref(w.isEmpty)(e.unref(g.default)(n,o.prop))?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(t.labelEmptyClass)},e.toDisplayString(t.labelEmpty||"--"),3)):e.createCommentVNode("",!0)]),_:2},[o.headerSlot?{name:"header",fn:e.withCtx(({column:n,$index:b})=>[e.renderSlot(t.$slots,`${o.prop}-header`,{column:n,index:b},void 0,!0)]),key:"0"}:void 0,o.filterIconSlot?{name:"filter-icon",fn:e.withCtx(({filterOpened:n})=>[e.renderSlot(t.$slots,`${o.prop}-filter-icon`,{filterOpened:n},void 0,!0)]),key:"1"}:void 0]),1040))),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:2},[t.showEmpty?{name:"empty",fn:e.withCtx(()=>[t.$slots.empty?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:0,description:t.emptyLabel},null,8,["description"])),e.renderSlot(t.$slots,"empty",{},void 0,!0)]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append",{},void 0,!0)]),key:"1"}:void 0]),1040,["data"])),[[I,t.loading]]),t.showPagination?(e.openBlock(),e.createBlock(R,e.mergeProps({key:0,"current-page":e.unref(c),"onUpdate:currentPage":l[0]||(l[0]=o=>e.isRef(c)?c.value=o:null),"page-size":e.unref(f),"onUpdate:pageSize":l[1]||(l[1]=o=>e.isRef(f)?f.value=o:null),layout:"total, sizes, prev, pager, next, jumper",class:t.paginationClass,disabled:t.loading,"page-sizes":t.pageSizes,total:t.total},t.paginationOptions),null,16,["current-page","page-size","class","disabled","page-sizes","total"])):e.createCommentVNode("",!0)]),_:3},8,["locale"])])}}});exports.default=W;
|
|
1
|
+
"use strict";var A=Object.defineProperty;var h=(m,y)=>A(m,"name",{value:y,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 */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),O=,/* empty css */L=,/* empty css */w=,/* empty css */j=,/* empty css */g=,/* empty css */F=,/* empty css */q=,/* empty css */Y=,/* empty css */H=,/* empty css */U=,/* empty css */G=,/* empty css */J=,/* empty css */K={class:"ls-table-wrap"},Q=e.defineComponent({name:"LSTable"}),W=e.defineComponent({...Q,inheritAttrs:!1,props:L.lsTableProps,emits:["sizeChange","currentPageChange","update:page-size","update:current-page","update:selection"],setup(m,{expose:y,emit:E}){const s=m,u=E,d=e.useAttrs(),k=e.ref(),c=e.ref(1),f=e.ref(10),p=e.ref([]);e.watch(()=>s.currentPage,t=>{if(t!==c.value){const l=Math.max(1,Math.min(t,Math.ceil(s.total/f.value)));c.value=l,l!==t&&u("update:current-page",l)}},{immediate:!0}),e.watch([()=>s.pageSize,()=>s.pageSizes],([t,l])=>{let a=t;w.isEmpty(l)||(a=l.includes(t)?t:l[0]),f.value=a,a!==t&&u("update:page-size",a)},{immediate:!0}),e.watch(()=>s.selection,t=>{p.value=t||[]},{immediate:!0,deep:!0}),e.watch([()=>s.tableData,()=>s.showSelect,()=>s.selection],([t,l,a])=>{l&&t&&t.length>0&&e.nextTick(()=>{t.forEach(r=>{(a||[]).some(v=>v.id===r.id)&&k.value.toggleRowSelection(r,!0)})})},{immediate:!0,deep:!0}),e.watch(()=>p.value,t=>{u("update:selection",t)},{deep:!0}),e.watch(c,t=>{u("currentPageChange",t),u("update:current-page",t)}),e.watch(f,t=>{u("sizeChange",t),u("update:page-size",t)});function P(t){return(c.value-1)*f.value+t+1}h(P,"indexMethod");function $(t,l){return t?O.default(t).format(l||"YYYY-MM-DD HH:mm:ss"):s.labelEmpty||"--"}h($,"formatDate");function z(t,l){const a=(t||[]).findIndex(i=>i.id===l.id),r=(p.value||[]).findIndex(i=>i.id===l.id);a>-1?p.value.push(l):p.value.splice(r,1)}h(z,"handleSelect");function T(t){const l=t.length>0;s.tableData.length>0&&s.tableData.forEach(a=>{const r=(p.value||[]).findIndex(i=>i.id===a.id);l?r<0&&p.value.push(a):r>=0&&p.value.splice(r,1)})}h(T,"handleSelectAll");const N=e.computed(()=>{const t={...d};if(t["table-layout"]||(t["table-layout"]="auto"),s.showSelect&&(t.onSelect||(t.onSelect=z),t.onSelectAll||(t.onSelectAll=T)),d&&d.hasOwnProperty("show-overflow-tooltip"))if(typeof d["show-overflow-tooltip"]=="boolean")d["show-overflow-tooltip"]===!0&&(t["show-overflow-tooltip"]={popperClass:"table-popper-css"});else if(typeof d["show-overflow-tooltip"]=="object"){const l=d["show-overflow-tooltip"]||{},a=`table-popper-css ${l&&(l==null?void 0:l.popperClass)}`;t["show-overflow-tooltip"]={...l,popperClass:a}}else t["show-overflow-tooltip"]={popperClass:"table-popper-css"};else t["show-overflow-tooltip"]={popperClass:"table-popper-css"};return t});function C(t,l,a){var r;return(r=t[g.default(l,a)])==null?void 0:r.type}h(C,"getStatusType");function D(t="default",l,a){const r=[];return["dot","follow"].includes(t)&&(r.push("ls-table-status"),r.push(`ls-table-status--${l||"default"}`)),a&&r.push(a),r.join(" ")}return h(D,"getStatusClass"),y({TableRef:k}),(t,l)=>{const a=F.ElRadio,r=q.ElTableColumn,i=Y.ElText,v=H.ElEmpty,x=q.ElTable,R=U.ElPagination,V=G.ElConfigProvider,I=J.vLoading;return e.openBlock(),e.createElementBlock("div",K,[e.createVNode(V,{locale:e.unref(j.default)},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(x,e.mergeProps({ref_key:"TableRef",ref:k,style:{width:"100%"}},e.unref(N),{data:t.tableData}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend",{},void 0,!0),t.showRadio?(e.openBlock(),e.createBlock(r,e.mergeProps({key:0,width:"60"},t.radioColumnOptions),{default:e.withCtx(({row:o})=>[e.createVNode(a,{"model-value":t.currentRow?t.currentRow[t.radioProp]:void 0,label:o[t.radioProp]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.showRadioLabel?o[t.radioProp]:""),1)]),_:2},1032,["model-value","label"])]),_:1},16)):e.createCommentVNode("",!0),t.showSelect?(e.openBlock(),e.createBlock(r,e.mergeProps({key:1,width:"60"},t.selectColumnOptions,{type:"selection"}),null,16)):e.createCommentVNode("",!0),t.showExpand?(e.openBlock(),e.createBlock(r,e.mergeProps({key:2},t.expandColumnOptions,{type:"expand"}),{default:e.withCtx(({row:o})=>[e.renderSlot(t.$slots,"expand",{row:o},void 0,!0)]),_:3},16)):e.createCommentVNode("",!0),t.showTableIndex?(e.openBlock(),e.createBlock(r,e.mergeProps({key:3,width:"60",fixed:t.tableIndexfixed,label:t.tableIndexLabel,index:P},t.indexColumnOptions,{type:"index"}),null,16,["fixed","label"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tableColumn,o=>(e.openBlock(),e.createBlock(r,e.mergeProps({key:o.prop,ref_for:!0},o),e.createSlots({default:e.withCtx(({row:n,column:b,$index:M})=>[o.type==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString($(e.unref(g.default)(n,o.prop),o.dateTemplate)),1)],64)):o.type==="status"?(e.openBlock(),e.createBlock(i,{key:1,type:["default","follow"].includes(o.statusStyle||"default")?C(o.value,n,o.prop):"",class:e.normalizeClass(D(o.statusStyle,C(o.value,n,o.prop),o.className))},{default:e.withCtx(()=>{var S,B;return[e.createTextVNode(e.toDisplayString(((S=o.value[e.unref(g.default)(n,o.prop)])==null?void 0:S.label)||((B=o.value.default)==null?void 0:B.label)||n[o.prop]),1)]}),_:2},1032,["type","class"])):o.type==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.unref(w.isEmpty)(e.unref(g.default)(n,o.prop))?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.labelEmpty||"--"),1)],64)):(e.openBlock(),e.createBlock(i,{key:1,type:Number(e.unref(g.default)(n,o.prop))<0?"danger":`${o.isSuc?"success":""}`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(g.default)(n,o.prop)),1)]),_:2},1032,["type"]))],64)):o.type==="slot"?e.renderSlot(t.$slots,o.prop,{key:3,row:n,column:b,index:M},void 0,!0):e.unref(w.isEmpty)(e.unref(g.default)(n,o.prop))?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(t.labelEmptyClass)},e.toDisplayString(t.labelEmpty||"--"),3)):e.createCommentVNode("",!0)]),_:2},[o.headerSlot?{name:"header",fn:e.withCtx(({column:n,$index:b})=>[e.renderSlot(t.$slots,`${o.prop}-header`,{column:n,index:b},void 0,!0)]),key:"0"}:void 0,o.filterIconSlot?{name:"filter-icon",fn:e.withCtx(({filterOpened:n})=>[e.renderSlot(t.$slots,`${o.prop}-filter-icon`,{filterOpened:n},void 0,!0)]),key:"1"}:void 0]),1040))),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:2},[t.showEmpty?{name:"empty",fn:e.withCtx(()=>[t.$slots.empty?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:0,description:t.emptyLabel},null,8,["description"])),e.renderSlot(t.$slots,"empty",{},void 0,!0)]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append",{},void 0,!0)]),key:"1"}:void 0]),1040,["data"])),[[I,t.loading]]),t.showPagination?(e.openBlock(),e.createBlock(R,e.mergeProps({key:0,"current-page":e.unref(c),"onUpdate:currentPage":l[0]||(l[0]=o=>e.isRef(c)?c.value=o:null),"page-size":e.unref(f),"onUpdate:pageSize":l[1]||(l[1]=o=>e.isRef(f)?f.value=o:null),layout:"total, sizes, prev, pager, next, jumper",class:t.paginationClass,disabled:t.loading,"page-sizes":t.pageSizes,total:t.total},t.paginationOptions),null,16,["current-page","page-size","class","disabled","page-sizes","total"])):e.createCommentVNode("",!0)]),_:3},8,["locale"])])}}});exports.default=W;
|
|
@@ -204,7 +204,7 @@ const ge = { class: "ls-table-wrap" }, ve = U({
|
|
|
204
204
|
z(E(G(n(k)(s, o.prop), o.dateTemplate)), 1)
|
|
205
205
|
], 64)) : o.type === "status" ? (p(), u(d, {
|
|
206
206
|
key: 1,
|
|
207
|
-
type: ["default", "follow"].includes(o.statusStyle || "default")
|
|
207
|
+
type: ["default", "follow"].includes(o.statusStyle || "default") ? M(o.value, s, o.prop) : "",
|
|
208
208
|
class: B(W(o.statusStyle, M(o.value, s, o.prop), o.className))
|
|
209
209
|
}, {
|
|
210
210
|
default: i(() => {
|
|
Binary file
|
|
Binary file
|