@lingshugroup/web-plus 1.0.30 → 1.0.31
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 -3
- 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/useTableListHook/index.cjs +1 -1
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js +6 -6
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.br +0 -0
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js +61 -62
- package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview/components/Pdf.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 +76 -76
- 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
|
@@ -17,7 +17,7 @@ var c = (I, D) => ae(I, "name", { value: D, configurable: !0 });
|
|
|
17
17
|
/* empty css */
|
|
18
18
|
/* empty css */
|
|
19
19
|
/* empty css */
|
|
20
|
-
import { defineComponent as J, useAttrs as ne, ref as R, computed as H, watch as w, nextTick as re, openBlock as n, createElementBlock as C, createVNode as U, unref as
|
|
20
|
+
import { defineComponent as J, useAttrs as ne, ref as R, computed as H, watch as w, nextTick as re, openBlock as n, createElementBlock as C, createVNode as U, unref as i, withCtx as u, withDirectives as pe, createBlock as d, mergeProps as S, createSlots as q, renderSlot as y, createTextVNode as z, toDisplayString as E, createCommentVNode as k, Fragment as T, renderList as se, normalizeClass as F, isRef as G } from "vue";
|
|
21
21
|
import ie from "../../../../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min/index.js";
|
|
22
22
|
import { lsTableProps as ue } from "../types/index.js";
|
|
23
23
|
import { isEmpty as O } from "../../_utils/utils/index.js";
|
|
@@ -38,13 +38,13 @@ const we = { class: "ls-table-wrap" }, Se = J({
|
|
|
38
38
|
props: ue,
|
|
39
39
|
emits: ["sizeChange", "currentPageChange", "update:page-size", "update:current-page", "update:selection"],
|
|
40
40
|
setup(I, { expose: D, emit: K }) {
|
|
41
|
-
const s = I, h = K,
|
|
41
|
+
const s = I, h = K, r = ne(), A = R(), v = R(1), b = R(10), m = R([]), $ = H(() => (r == null ? void 0 : r.rowKey) || (r == null ? void 0 : r.rowkey) || r["row-key"] || "id");
|
|
42
42
|
w(
|
|
43
43
|
() => s.currentPage,
|
|
44
44
|
(e) => {
|
|
45
45
|
if (e !== v.value) {
|
|
46
|
-
const
|
|
47
|
-
v.value =
|
|
46
|
+
const o = Math.max(1, Math.min(e, Math.ceil(s.total / b.value)));
|
|
47
|
+
v.value = o, o !== e && h("update:current-page", o);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -52,9 +52,9 @@ const we = { class: "ls-table-wrap" }, Se = J({
|
|
|
52
52
|
}
|
|
53
53
|
), w(
|
|
54
54
|
[() => s.pageSize, () => s.pageSizes],
|
|
55
|
-
([e,
|
|
55
|
+
([e, o]) => {
|
|
56
56
|
let l = e;
|
|
57
|
-
O(
|
|
57
|
+
O(o) || (l = o.includes(e) ? e : o[0]), b.value = l, l !== e && h("update:page-size", l);
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
immediate: !0
|
|
@@ -69,18 +69,18 @@ const we = { class: "ls-table-wrap" }, Se = J({
|
|
|
69
69
|
deep: !0
|
|
70
70
|
}
|
|
71
71
|
);
|
|
72
|
-
function j(e,
|
|
72
|
+
function j(e, o) {
|
|
73
73
|
if (!e) throw new Error("Row is required when get row identity");
|
|
74
|
-
return typeof
|
|
74
|
+
return typeof o == "string" ? `${g(e, o)}` : typeof o == "function" ? o.call(null, e) : "";
|
|
75
75
|
}
|
|
76
76
|
c(j, "getRowIdentity");
|
|
77
|
-
function P(e,
|
|
78
|
-
return j(e, l) === j(
|
|
77
|
+
function P(e, o, l) {
|
|
78
|
+
return j(e, l) === j(o, l);
|
|
79
79
|
}
|
|
80
80
|
c(P, "isSameRow"), w(
|
|
81
81
|
[() => s.tableData, () => s.showSelect, () => s.selection],
|
|
82
|
-
([e,
|
|
83
|
-
|
|
82
|
+
([e, o, l]) => {
|
|
83
|
+
o && e && e.length > 0 && re(() => {
|
|
84
84
|
e.forEach((a) => {
|
|
85
85
|
(l || []).some((L) => P(L, a, $.value)) && A.value.toggleRowSelection(a, !0);
|
|
86
86
|
});
|
|
@@ -107,34 +107,34 @@ const we = { class: "ls-table-wrap" }, Se = J({
|
|
|
107
107
|
return (v.value - 1) * b.value + e + 1;
|
|
108
108
|
}
|
|
109
109
|
c(Q, "indexMethod");
|
|
110
|
-
function W(e,
|
|
111
|
-
return e ? ie(e).format(
|
|
110
|
+
function W(e, o) {
|
|
111
|
+
return e ? ie(e).format(o || "YYYY-MM-DD HH:mm:ss") : s.labelEmpty || "--";
|
|
112
112
|
}
|
|
113
113
|
c(W, "formatDate");
|
|
114
|
-
function X(e,
|
|
115
|
-
const l = (e || []).findIndex((f) => P(f,
|
|
116
|
-
l > -1 ? m.value.push(
|
|
114
|
+
function X(e, o) {
|
|
115
|
+
const l = (e || []).findIndex((f) => P(f, o, $.value)), a = (m.value || []).findIndex((f) => P(f, o, $.value));
|
|
116
|
+
l > -1 ? m.value.push(o) : m.value.splice(a, 1);
|
|
117
117
|
}
|
|
118
118
|
c(X, "handleSelect");
|
|
119
119
|
function Z(e) {
|
|
120
|
-
const
|
|
120
|
+
const o = e.length > 0;
|
|
121
121
|
s.tableData.length > 0 && s.tableData.forEach((l) => {
|
|
122
122
|
const a = (m.value || []).findIndex((f) => P(l, f, $.value));
|
|
123
|
-
|
|
123
|
+
o ? a < 0 && m.value.push(l) : a >= 0 && m.value.splice(a, 1);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
c(Z, "handleSelectAll");
|
|
127
127
|
const V = H(() => {
|
|
128
|
-
const e = { ...
|
|
129
|
-
if (e["table-layout"] || (e["table-layout"] = "auto"), s.showSelect && (e.onSelect || (e.onSelect = X), e.onSelectAll || (e.onSelectAll = Z)),
|
|
130
|
-
if (typeof
|
|
131
|
-
|
|
128
|
+
const e = { ...r };
|
|
129
|
+
if (e["table-layout"] || (e["table-layout"] = "auto"), s.showSelect && (e.onSelect || (e.onSelect = X), e.onSelectAll || (e.onSelectAll = Z)), r && r.hasOwnProperty("show-overflow-tooltip"))
|
|
130
|
+
if (typeof r["show-overflow-tooltip"] == "boolean")
|
|
131
|
+
r["show-overflow-tooltip"] === !0 && (e["show-overflow-tooltip"] = {
|
|
132
132
|
popperClass: "table-popper-css"
|
|
133
133
|
});
|
|
134
|
-
else if (typeof
|
|
135
|
-
const
|
|
134
|
+
else if (typeof r["show-overflow-tooltip"] == "object") {
|
|
135
|
+
const o = r["show-overflow-tooltip"] || {}, l = `table-popper-css ${o && (o == null ? void 0 : o.popperClass)}`;
|
|
136
136
|
e["show-overflow-tooltip"] = {
|
|
137
|
-
...
|
|
137
|
+
...o,
|
|
138
138
|
popperClass: l
|
|
139
139
|
};
|
|
140
140
|
} else
|
|
@@ -147,40 +147,40 @@ const we = { class: "ls-table-wrap" }, Se = J({
|
|
|
147
147
|
};
|
|
148
148
|
return e;
|
|
149
149
|
});
|
|
150
|
-
function N(e,
|
|
150
|
+
function N(e, o, l) {
|
|
151
151
|
var a;
|
|
152
|
-
return (a = e[g(
|
|
152
|
+
return (a = e[g(o, l)]) == null ? void 0 : a.type;
|
|
153
153
|
}
|
|
154
154
|
c(N, "getStatusType");
|
|
155
|
-
function _(e = "default",
|
|
155
|
+
function _(e = "default", o, l) {
|
|
156
156
|
const a = [];
|
|
157
|
-
return ["dot", "follow"].includes(e) && (a.push("ls-table-status"), a.push(`ls-table-status--${
|
|
157
|
+
return ["dot", "follow"].includes(e) && (a.push("ls-table-status"), a.push(`ls-table-status--${o || "default"}`)), l && a.push(l), a.join(" ");
|
|
158
158
|
}
|
|
159
159
|
return c(_, "getStatusClass"), D({
|
|
160
160
|
TableRef: A
|
|
161
|
-
}), (e,
|
|
162
|
-
const l = fe, a = ce, f = ye, L = ge, x = me, ee = he,
|
|
161
|
+
}), (e, o) => {
|
|
162
|
+
const l = fe, a = ce, f = ye, L = ge, x = me, ee = he, oe = ve, te = be;
|
|
163
163
|
return n(), C("div", we, [
|
|
164
|
-
U(
|
|
165
|
-
default:
|
|
166
|
-
|
|
164
|
+
U(oe, { locale: i(de) }, {
|
|
165
|
+
default: u(() => [
|
|
166
|
+
pe((n(), d(x, S({
|
|
167
167
|
ref_key: "TableRef",
|
|
168
168
|
ref: A,
|
|
169
169
|
style: { width: "100%" }
|
|
170
|
-
},
|
|
171
|
-
default:
|
|
170
|
+
}, i(V), { data: e.tableData }), q({
|
|
171
|
+
default: u(() => [
|
|
172
172
|
y(e.$slots, "prepend", {}, void 0, !0),
|
|
173
173
|
e.showRadio ? (n(), d(a, S({
|
|
174
174
|
key: 0,
|
|
175
175
|
width: "60"
|
|
176
176
|
}, e.radioColumnOptions), {
|
|
177
|
-
default:
|
|
177
|
+
default: u(({ row: t }) => [
|
|
178
178
|
U(l, {
|
|
179
179
|
"model-value": e.currentRow ? e.currentRow[e.radioProp] : void 0,
|
|
180
|
-
label:
|
|
180
|
+
label: t[e.radioProp]
|
|
181
181
|
}, {
|
|
182
|
-
default:
|
|
183
|
-
z(E(e.showRadioLabel ?
|
|
182
|
+
default: u(() => [
|
|
183
|
+
z(E(e.showRadioLabel ? t[e.radioProp] : ""), 1)
|
|
184
184
|
]),
|
|
185
185
|
_: 2
|
|
186
186
|
}, 1032, ["model-value", "label"])
|
|
@@ -192,8 +192,8 @@ const we = { class: "ls-table-wrap" }, Se = J({
|
|
|
192
192
|
width: "60"
|
|
193
193
|
}, e.selectColumnOptions, { type: "selection" }), null, 16)) : k("", !0),
|
|
194
194
|
e.showExpand ? (n(), d(a, S({ key: 2 }, e.expandColumnOptions, { type: "expand" }), {
|
|
195
|
-
default:
|
|
196
|
-
y(e.$slots, "expand", { row:
|
|
195
|
+
default: u(({ row: t }) => [
|
|
196
|
+
y(e.$slots, "expand", { row: t }, void 0, !0)
|
|
197
197
|
]),
|
|
198
198
|
_: 3
|
|
199
199
|
}, 16)) : k("", !0),
|
|
@@ -204,63 +204,63 @@ const we = { class: "ls-table-wrap" }, Se = J({
|
|
|
204
204
|
label: e.tableIndexLabel,
|
|
205
205
|
index: Q
|
|
206
206
|
}, e.indexColumnOptions, { type: "index" }), null, 16, ["fixed", "label"])) : k("", !0),
|
|
207
|
-
(n(!0), C(T, null,
|
|
208
|
-
key:
|
|
207
|
+
(n(!0), C(T, null, se(e.tableColumn, (t) => (n(), d(a, S({
|
|
208
|
+
key: t.prop,
|
|
209
209
|
ref_for: !0
|
|
210
|
-
},
|
|
211
|
-
default:
|
|
212
|
-
|
|
213
|
-
z(E(W(
|
|
214
|
-
], 64)) :
|
|
210
|
+
}, t), q({
|
|
211
|
+
default: u(({ row: p, column: M, $index: le }) => [
|
|
212
|
+
t.type === "date" ? (n(), C(T, { key: 0 }, [
|
|
213
|
+
z(E(W(i(g)(p, t.prop), t.dateTemplate)), 1)
|
|
214
|
+
], 64)) : t.type === "status" ? (n(), d(f, {
|
|
215
215
|
key: 1,
|
|
216
|
-
type: ["default", "follow"].includes(
|
|
217
|
-
class: F(_(
|
|
216
|
+
type: ["default", "follow"].includes(t.statusStyle || "default") ? N(t.value, p, t.prop) : "",
|
|
217
|
+
class: F(_(t.statusStyle, N(t.value, p, t.prop), t.className))
|
|
218
218
|
}, {
|
|
219
|
-
default:
|
|
219
|
+
default: u(() => {
|
|
220
220
|
var Y, B;
|
|
221
221
|
return [
|
|
222
|
-
z(E(((Y =
|
|
222
|
+
z(E(((Y = t.value[i(g)(p, t.prop)]) == null ? void 0 : Y.label) || ((B = t.value.default) == null ? void 0 : B.label) || p[t.prop]), 1)
|
|
223
223
|
];
|
|
224
224
|
}),
|
|
225
225
|
_: 2
|
|
226
|
-
}, 1032, ["type", "class"])) :
|
|
227
|
-
|
|
226
|
+
}, 1032, ["type", "class"])) : t.type === "number" ? (n(), C(T, { key: 2 }, [
|
|
227
|
+
i(O)(i(g)(p, t.prop)) ? (n(), C(T, { key: 0 }, [
|
|
228
228
|
z(E(e.labelEmpty || "--"), 1)
|
|
229
229
|
], 64)) : (n(), d(f, {
|
|
230
230
|
key: 1,
|
|
231
|
-
type: Number(
|
|
231
|
+
type: Number(i(g)(p, t.prop)) < 0 ? "danger" : `${t.isSuc ? "success" : ""}`
|
|
232
232
|
}, {
|
|
233
|
-
default:
|
|
234
|
-
z(E(
|
|
233
|
+
default: u(() => [
|
|
234
|
+
z(E(i(g)(p, t.prop)), 1)
|
|
235
235
|
]),
|
|
236
236
|
_: 2
|
|
237
237
|
}, 1032, ["type"]))
|
|
238
|
-
], 64)) :
|
|
238
|
+
], 64)) : t.type === "slot" ? y(e.$slots, t.prop, {
|
|
239
239
|
key: 3,
|
|
240
|
-
row:
|
|
240
|
+
row: p,
|
|
241
241
|
column: M,
|
|
242
242
|
index: le
|
|
243
|
-
}, void 0, !0) :
|
|
243
|
+
}, void 0, !0) : i(O)(i(g)(p, t.prop)) ? (n(), C("div", {
|
|
244
244
|
key: 4,
|
|
245
245
|
class: F(e.labelEmptyClass)
|
|
246
246
|
}, E(e.labelEmpty || "--"), 3)) : k("", !0)
|
|
247
247
|
]),
|
|
248
248
|
_: 2
|
|
249
249
|
}, [
|
|
250
|
-
|
|
250
|
+
t.headerSlot ? {
|
|
251
251
|
name: "header",
|
|
252
|
-
fn:
|
|
253
|
-
y(e.$slots, `${
|
|
254
|
-
column:
|
|
252
|
+
fn: u(({ column: p, $index: M }) => [
|
|
253
|
+
y(e.$slots, `${t.prop}-header`, {
|
|
254
|
+
column: p,
|
|
255
255
|
index: M
|
|
256
256
|
}, void 0, !0)
|
|
257
257
|
]),
|
|
258
258
|
key: "0"
|
|
259
259
|
} : void 0,
|
|
260
|
-
|
|
260
|
+
t.filterIconSlot ? {
|
|
261
261
|
name: "filter-icon",
|
|
262
|
-
fn:
|
|
263
|
-
y(e.$slots, `${
|
|
262
|
+
fn: u(({ filterOpened: p }) => [
|
|
263
|
+
y(e.$slots, `${t.prop}-filter-icon`, { filterOpened: p }, void 0, !0)
|
|
264
264
|
]),
|
|
265
265
|
key: "1"
|
|
266
266
|
} : void 0
|
|
@@ -271,7 +271,7 @@ const we = { class: "ls-table-wrap" }, Se = J({
|
|
|
271
271
|
}, [
|
|
272
272
|
e.showEmpty ? {
|
|
273
273
|
name: "empty",
|
|
274
|
-
fn:
|
|
274
|
+
fn: u(() => [
|
|
275
275
|
e.$slots.empty ? k("", !0) : (n(), d(L, {
|
|
276
276
|
key: 0,
|
|
277
277
|
description: e.emptyLabel
|
|
@@ -282,20 +282,20 @@ const we = { class: "ls-table-wrap" }, Se = J({
|
|
|
282
282
|
} : void 0,
|
|
283
283
|
e.$slots.append ? {
|
|
284
284
|
name: "append",
|
|
285
|
-
fn:
|
|
285
|
+
fn: u(() => [
|
|
286
286
|
y(e.$slots, "append", {}, void 0, !0)
|
|
287
287
|
]),
|
|
288
288
|
key: "1"
|
|
289
289
|
} : void 0
|
|
290
290
|
]), 1040, ["data"])), [
|
|
291
|
-
[
|
|
291
|
+
[te, e.loading]
|
|
292
292
|
]),
|
|
293
293
|
e.showPagination ? (n(), d(ee, S({
|
|
294
294
|
key: 0,
|
|
295
|
-
"current-page":
|
|
296
|
-
"onUpdate:currentPage":
|
|
297
|
-
"page-size":
|
|
298
|
-
"onUpdate:pageSize":
|
|
295
|
+
"current-page": i(v),
|
|
296
|
+
"onUpdate:currentPage": o[0] || (o[0] = (t) => G(v) ? v.value = t : null),
|
|
297
|
+
"page-size": i(b),
|
|
298
|
+
"onUpdate:pageSize": o[1] || (o[1] = (t) => G(b) ? b.value = t : null),
|
|
299
299
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
300
300
|
class: e.paginationClass,
|
|
301
301
|
disabled: e.loading,
|
|
Binary file
|
|
Binary file
|