@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.
Files changed (21) hide show
  1. package/README.md +1 -3
  2. package/lib/index.css +1 -1
  3. package/lib/index.css.br +0 -0
  4. package/lib/index.css.gz +0 -0
  5. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.cjs +1 -1
  6. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js +6 -6
  7. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.br +0 -0
  8. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.gz +0 -0
  9. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index.cjs +1 -1
  10. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index.js +1 -1
  11. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.cjs +1 -1
  12. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js +61 -62
  13. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js.br +0 -0
  14. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js.gz +0 -0
  15. package/lib/packages/ls-components/components/table/Table.vue/index.cjs +1 -1
  16. package/lib/packages/ls-components/components/table/Table.vue/index.js +2 -2
  17. package/lib/packages/ls-components/components/table/Table.vue/index2.cjs +1 -1
  18. package/lib/packages/ls-components/components/table/Table.vue/index2.js +76 -76
  19. package/lib/packages/ls-components/components/table/Table.vue/index2.js.br +0 -0
  20. package/lib/packages/ls-components/components/table/Table.vue/index2.js.gz +0 -0
  21. 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 p, withCtx as i, withDirectives as se, 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 pe, normalizeClass as F, isRef as G } from "vue";
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, u = ne(), A = R(), v = R(1), b = R(10), m = R([]), $ = H(() => (u == null ? void 0 : u.rowKey) || "id");
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 t = Math.max(1, Math.min(e, Math.ceil(s.total / b.value)));
47
- v.value = t, t !== e && h("update:current-page", t);
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, t]) => {
55
+ ([e, o]) => {
56
56
  let l = e;
57
- O(t) || (l = t.includes(e) ? e : t[0]), b.value = l, l !== e && h("update:page-size", l);
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, t) {
72
+ function j(e, o) {
73
73
  if (!e) throw new Error("Row is required when get row identity");
74
- return typeof t == "string" ? `${g(e, t)}` : typeof t == "function" ? t.call(null, e) : "";
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, t, l) {
78
- return j(e, l) === j(t, l);
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, t, l]) => {
83
- t && e && e.length > 0 && re(() => {
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, t) {
111
- return e ? ie(e).format(t || "YYYY-MM-DD HH:mm:ss") : s.labelEmpty || "--";
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, t) {
115
- const l = (e || []).findIndex((f) => P(f, t, $.value)), a = (m.value || []).findIndex((f) => P(f, t, $.value));
116
- l > -1 ? m.value.push(t) : m.value.splice(a, 1);
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 t = e.length > 0;
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
- t ? a < 0 && m.value.push(l) : a >= 0 && m.value.splice(a, 1);
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 = { ...u };
129
- if (e["table-layout"] || (e["table-layout"] = "auto"), s.showSelect && (e.onSelect || (e.onSelect = X), e.onSelectAll || (e.onSelectAll = Z)), u && u.hasOwnProperty("show-overflow-tooltip"))
130
- if (typeof u["show-overflow-tooltip"] == "boolean")
131
- u["show-overflow-tooltip"] === !0 && (e["show-overflow-tooltip"] = {
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 u["show-overflow-tooltip"] == "object") {
135
- const t = u["show-overflow-tooltip"] || {}, l = `table-popper-css ${t && (t == null ? void 0 : t.popperClass)}`;
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
- ...t,
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, t, l) {
150
+ function N(e, o, l) {
151
151
  var a;
152
- return (a = e[g(t, l)]) == null ? void 0 : a.type;
152
+ return (a = e[g(o, l)]) == null ? void 0 : a.type;
153
153
  }
154
154
  c(N, "getStatusType");
155
- function _(e = "default", t, l) {
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--${t || "default"}`)), l && a.push(l), a.join(" ");
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, t) => {
162
- const l = fe, a = ce, f = ye, L = ge, x = me, ee = he, te = ve, oe = be;
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(te, { locale: p(de) }, {
165
- default: i(() => [
166
- se((n(), d(x, S({
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
- }, p(V), { data: e.tableData }), q({
171
- default: i(() => [
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: i(({ row: o }) => [
177
+ default: u(({ row: t }) => [
178
178
  U(l, {
179
179
  "model-value": e.currentRow ? e.currentRow[e.radioProp] : void 0,
180
- label: o[e.radioProp]
180
+ label: t[e.radioProp]
181
181
  }, {
182
- default: i(() => [
183
- z(E(e.showRadioLabel ? o[e.radioProp] : ""), 1)
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: i(({ row: o }) => [
196
- y(e.$slots, "expand", { row: o }, void 0, !0)
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, pe(e.tableColumn, (o) => (n(), d(a, S({
208
- key: o.prop,
207
+ (n(!0), C(T, null, se(e.tableColumn, (t) => (n(), d(a, S({
208
+ key: t.prop,
209
209
  ref_for: !0
210
- }, o), q({
211
- default: i(({ row: r, column: M, $index: le }) => [
212
- o.type === "date" ? (n(), C(T, { key: 0 }, [
213
- z(E(W(p(g)(r, o.prop), o.dateTemplate)), 1)
214
- ], 64)) : o.type === "status" ? (n(), d(f, {
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(o.statusStyle || "default") ? N(o.value, r, o.prop) : "",
217
- class: F(_(o.statusStyle, N(o.value, r, o.prop), o.className))
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: i(() => {
219
+ default: u(() => {
220
220
  var Y, B;
221
221
  return [
222
- z(E(((Y = o.value[p(g)(r, o.prop)]) == null ? void 0 : Y.label) || ((B = o.value.default) == null ? void 0 : B.label) || r[o.prop]), 1)
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"])) : o.type === "number" ? (n(), C(T, { key: 2 }, [
227
- p(O)(p(g)(r, o.prop)) ? (n(), C(T, { key: 0 }, [
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(p(g)(r, o.prop)) < 0 ? "danger" : `${o.isSuc ? "success" : ""}`
231
+ type: Number(i(g)(p, t.prop)) < 0 ? "danger" : `${t.isSuc ? "success" : ""}`
232
232
  }, {
233
- default: i(() => [
234
- z(E(p(g)(r, o.prop)), 1)
233
+ default: u(() => [
234
+ z(E(i(g)(p, t.prop)), 1)
235
235
  ]),
236
236
  _: 2
237
237
  }, 1032, ["type"]))
238
- ], 64)) : o.type === "slot" ? y(e.$slots, o.prop, {
238
+ ], 64)) : t.type === "slot" ? y(e.$slots, t.prop, {
239
239
  key: 3,
240
- row: r,
240
+ row: p,
241
241
  column: M,
242
242
  index: le
243
- }, void 0, !0) : p(O)(p(g)(r, o.prop)) ? (n(), C("div", {
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
- o.headerSlot ? {
250
+ t.headerSlot ? {
251
251
  name: "header",
252
- fn: i(({ column: r, $index: M }) => [
253
- y(e.$slots, `${o.prop}-header`, {
254
- column: r,
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
- o.filterIconSlot ? {
260
+ t.filterIconSlot ? {
261
261
  name: "filter-icon",
262
- fn: i(({ filterOpened: r }) => [
263
- y(e.$slots, `${o.prop}-filter-icon`, { filterOpened: r }, void 0, !0)
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: i(() => [
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: i(() => [
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
- [oe, e.loading]
291
+ [te, e.loading]
292
292
  ]),
293
293
  e.showPagination ? (n(), d(ee, S({
294
294
  key: 0,
295
- "current-page": p(v),
296
- "onUpdate:currentPage": t[0] || (t[0] = (o) => G(v) ? v.value = o : null),
297
- "page-size": p(b),
298
- "onUpdate:pageSize": t[1] || (t[1] = (o) => G(b) ? b.value = o : null),
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingshugroup/web-plus",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "零数科技前端UI组件库(Vue3)",
5
5
  "type": "module",
6
6
  "main": "./lib/index/index.cjs",