@lingshugroup/web-plus 1.0.29 → 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 (51) hide show
  1. package/README.md +1 -1
  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 +73 -68
  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/button/Button.vue/index.cjs +1 -1
  10. package/lib/packages/ls-components/components/button/Button.vue/index.js +1 -1
  11. package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
  12. package/lib/packages/ls-components/components/form/Form.vue/index.js +2 -2
  13. package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
  14. package/lib/packages/ls-components/components/form/Form.vue/index2.js +105 -91
  15. package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
  16. package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
  17. package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
  18. package/lib/packages/ls-components/components/form/FormItem.vue/index.js +2 -2
  19. package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
  20. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +98 -99
  21. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
  22. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
  23. package/lib/packages/ls-components/components/form/types/index.cjs +1 -1
  24. package/lib/packages/ls-components/components/form/types/index.js +4 -0
  25. package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
  26. package/lib/packages/ls-components/components/form/types/index.js.gz +0 -0
  27. package/lib/packages/ls-components/components/list/List.vue/index.cjs +1 -1
  28. package/lib/packages/ls-components/components/list/List.vue/index.js +2 -2
  29. package/lib/packages/ls-components/components/list/List.vue/index2.cjs +1 -1
  30. package/lib/packages/ls-components/components/list/List.vue/index2.js +133 -127
  31. package/lib/packages/ls-components/components/list/List.vue/index2.js.br +0 -0
  32. package/lib/packages/ls-components/components/list/List.vue/index2.js.gz +0 -0
  33. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index.cjs +1 -1
  34. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index.js +1 -1
  35. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.cjs +1 -1
  36. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js +61 -62
  37. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js.br +0 -0
  38. package/lib/packages/ls-components/components/preview/components/Pdf.vue/index2.js.gz +0 -0
  39. package/lib/packages/ls-components/components/table/Table.vue/index.cjs +1 -1
  40. package/lib/packages/ls-components/components/table/Table.vue/index.js +2 -2
  41. package/lib/packages/ls-components/components/table/Table.vue/index2.cjs +1 -1
  42. package/lib/packages/ls-components/components/table/Table.vue/index2.js +163 -154
  43. package/lib/packages/ls-components/components/table/Table.vue/index2.js.br +0 -0
  44. package/lib/packages/ls-components/components/table/Table.vue/index2.js.gz +0 -0
  45. package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
  46. package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
  47. package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
  48. package/lib/packages/ls-components/components/upload/Index.vue/index2.js +1 -1
  49. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
  50. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
  51. package/package.json +1 -1
@@ -3,7 +3,7 @@ var t = (g, k) => Q(g, "name", { value: k, configurable: !0 });
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { defineComponent as I, ref as a, watch as R, computed as U, resolveComponent as N, unref as e, openBlock as s, createElementBlock as c, normalizeClass as $, createElementVNode as m, createVNode as n, withCtx as C, createTextVNode as x, toDisplayString as h, createCommentVNode as B, createBlock as W, mergeProps as V, withDirectives as X, Fragment as Y, renderList as Z } from "vue";
6
+ import { defineComponent as F, ref as a, watch as R, computed as U, resolveComponent as N, unref as e, openBlock as s, createElementBlock as u, normalizeClass as $, createElementVNode as m, createVNode as n, withCtx as C, createTextVNode as S, toDisplayString as h, createCommentVNode as x, createBlock as W, mergeProps as V, withDirectives as X, Fragment as Y, renderList as Z } from "vue";
7
7
  import { useNamespace as ee } from "../../../_hooks/useNamespace/index.js";
8
8
  import { usePDF as oe } from "../../composable/index.js";
9
9
  import D from "../pdfs/PdfItem.vue/index.js";
@@ -19,9 +19,9 @@ const ae = { class: "opt-wrap" }, se = {
19
19
  key: 1,
20
20
  class: "infinite-list-wrapper",
21
21
  style: { overflow: "auto" }
22
- }, de = ["infinite-scroll-disabled"], pe = I({
22
+ }, de = ["infinite-scroll-disabled"], pe = F({
23
23
  name: "LSPdf"
24
- }), we = /* @__PURE__ */ I({
24
+ }), we = /* @__PURE__ */ F({
25
25
  ...pe,
26
26
  props: {
27
27
  source: {},
@@ -30,58 +30,58 @@ const ae = { class: "opt-wrap" }, se = {
30
30
  },
31
31
  emits: ["annotation", "highlight", "loaded", "textLoaded", "annotationLoaded", "xfaLoaded", "loadComplete", "loadError", "update:source"],
32
32
  setup(g, { emit: k }) {
33
- const b = ee("pdf"), T = b.b(), w = a(void 0), l = a(1), i = a(0), o = a(1), u = a(!0), L = a(!1), d = g, P = k;
33
+ const b = ee("pdf"), I = b.b(), w = a(void 0), l = a(1), i = a(0), o = a(1), d = a(!0), L = a(!1), p = g, P = k;
34
34
  R(
35
- () => d.source,
35
+ () => p.source,
36
36
  () => {
37
- j();
37
+ M();
38
38
  },
39
39
  {
40
40
  immediate: !0,
41
41
  deep: !0
42
42
  }
43
43
  );
44
- const M = U(() => u.value ? "取消分页" : "分页展示");
45
- async function j() {
46
- if (d.source)
44
+ const T = U(() => d.value ? "取消分页" : "分页展示");
45
+ async function M() {
46
+ if (p.source)
47
47
  try {
48
- const { pdf: r, processLoadingTask: p, pages: S } = oe(d.source, {
48
+ const { pdf: r, processLoadingTask: f, pages: c } = oe(p.source, {
49
49
  onError: _
50
50
  });
51
- await p(d.source), w.value = r.value, i.value = S.value, E();
51
+ await f(p.source), w.value = r.value, i.value = c.value, E();
52
52
  } catch {
53
53
  _();
54
54
  } finally {
55
55
  L.value = !0;
56
56
  }
57
57
  }
58
- t(j, "initPdf");
59
- const O = /* @__PURE__ */ t(() => {
60
- L.value = !1, d.onClose && d.onClose(), P("update:source");
58
+ t(M, "initPdf");
59
+ const j = /* @__PURE__ */ t(() => {
60
+ L.value = !1, p.onClose && p.onClose(), P("update:source");
61
61
  }, "closeFunc");
62
- function q() {
62
+ function O() {
63
63
  l.value > 1 && l.value--;
64
64
  }
65
- t(q, "prevPdf");
66
- function A() {
65
+ t(O, "prevPdf");
66
+ function q() {
67
67
  l.value < i.value && l.value++;
68
68
  }
69
- t(A, "nextPdf");
70
- function F(r) {
69
+ t(q, "nextPdf");
70
+ function B(r) {
71
71
  r === 0 ? o.value = o.value > 0.25 ? o.value - 0.25 : o.value : o.value = o.value < 2 ? o.value + 0.25 : o.value;
72
72
  }
73
- t(F, "scalePdf");
74
- const z = a(!1), v = a(0), G = /* @__PURE__ */ t(() => {
73
+ t(B, "scalePdf");
74
+ const z = a(!1), v = a(0), A = /* @__PURE__ */ t(() => {
75
75
  if (v.value >= i.value) {
76
76
  z.value = !0;
77
77
  return;
78
78
  }
79
79
  v.value++;
80
80
  }, "load");
81
- function H() {
82
- u.value = !u.value, u.value || (z.value = !1, v.value = i.value > 10 ? 10 : i.value);
81
+ function G() {
82
+ d.value = !d.value, d.value || (z.value = !1, v.value = i.value > 10 ? 10 : i.value);
83
83
  }
84
- t(H, "changePagition");
84
+ t(G, "changePagition");
85
85
  function E() {
86
86
  P("loadComplete");
87
87
  }
@@ -89,91 +89,90 @@ const ae = { class: "opt-wrap" }, se = {
89
89
  function _() {
90
90
  P("loadError");
91
91
  }
92
- return t(_, "loadError"), (r, p) => {
93
- const S = N("LSIcon"), f = N("LSButton"), J = te, K = le;
94
- return e(L) ? (s(), c("div", {
92
+ return t(_, "loadError"), (r, f) => {
93
+ const c = N("LSButton"), H = N("LSIcon"), J = te, K = le;
94
+ return e(L) ? (s(), u("div", {
95
95
  key: 0,
96
- class: $(e(T))
96
+ class: $(e(I))
97
97
  }, [
98
- m("span", {
99
- class: $([e(b).e("btn"), e(b).e("close")]),
100
- onClick: O
101
- }, [
102
- n(S, {
103
- name: "Close",
104
- size: 24,
105
- color: "#FFF"
106
- })
107
- ], 2),
108
98
  m("div", ae, [
109
- e(u) ? (s(), c("div", se, [
110
- n(f, {
99
+ e(d) ? (s(), u("div", se, [
100
+ n(c, {
111
101
  type: "primary",
112
102
  size: "small",
113
103
  disabled: e(l) == 1,
114
- onClick: q
104
+ onClick: O
115
105
  }, {
116
106
  default: C(() => [
117
- x("上一页")
107
+ S("上一页")
118
108
  ]),
119
109
  _: 1
120
110
  }, 8, ["disabled"]),
121
111
  m("span", ne, h(e(l)) + " / " + h(e(i)), 1),
122
- n(f, {
112
+ n(c, {
123
113
  type: "primary",
124
114
  size: "small",
125
115
  disabled: e(l) == e(i),
126
- onClick: A
116
+ onClick: q
127
117
  }, {
128
118
  default: C(() => [
129
- x("下一页")
119
+ S("下一页")
130
120
  ]),
131
121
  _: 1
132
122
  }, 8, ["disabled"])
133
- ])) : B("", !0),
134
- r.showSize ? (s(), c("div", ie, [
135
- n(f, {
123
+ ])) : x("", !0),
124
+ r.showSize ? (s(), u("div", ie, [
125
+ n(c, {
136
126
  type: "primary",
137
127
  icon: "Minus",
138
128
  size: "small",
139
129
  disabled: e(o) == 0.25,
140
- onClick: p[0] || (p[0] = (y) => F(0))
130
+ onClick: f[0] || (f[0] = (y) => B(0))
141
131
  }, null, 8, ["disabled"]),
142
132
  m("span", re, h(e(o) * 100) + "%", 1),
143
- n(f, {
133
+ n(c, {
144
134
  type: "primary",
145
135
  icon: "Plus",
146
136
  size: "small",
147
137
  disabled: e(o) == 2,
148
- onClick: p[1] || (p[1] = (y) => F(1))
138
+ onClick: f[1] || (f[1] = (y) => B(1))
149
139
  }, null, 8, ["disabled"])
150
- ])) : B("", !0),
151
- n(f, {
140
+ ])) : x("", !0),
141
+ n(c, {
152
142
  type: "primary",
153
143
  size: "small",
154
- onClick: H
144
+ onClick: G
155
145
  }, {
156
146
  default: C(() => [
157
- x(h(e(M)), 1)
147
+ S(h(e(T)), 1)
158
148
  ]),
159
149
  _: 1
160
- })
150
+ }),
151
+ m("span", {
152
+ class: $([e(b).e("btn"), e(b).e("close")]),
153
+ onClick: j
154
+ }, [
155
+ n(H, {
156
+ name: "Close",
157
+ size: 30
158
+ })
159
+ ], 2)
161
160
  ]),
162
161
  m("div", ce, [
163
- e(u) ? (s(), W(D, V({ key: 0 }, r.$attrs, {
162
+ e(d) ? (s(), W(D, V({ key: 0 }, r.$attrs, {
164
163
  pdf: e(w),
165
164
  page: e(l),
166
165
  scale: e(o),
167
166
  onLoadComplete: E,
168
167
  onLoadError: _
169
- }), null, 16, ["pdf", "page", "scale"])) : (s(), c("div", ue, [
168
+ }), null, 16, ["pdf", "page", "scale"])) : (s(), u("div", ue, [
170
169
  n(J, { height: "calc(100vh - 48px)" }, {
171
170
  default: C(() => [
172
- X((s(), c("ul", {
171
+ X((s(), u("ul", {
173
172
  "infinite-scroll-disabled": e(z),
174
173
  class: "infinite-list"
175
174
  }, [
176
- (s(!0), c(Y, null, Z(e(v), (y) => (s(), c("li", {
175
+ (s(!0), u(Y, null, Z(e(v), (y) => (s(), u("li", {
177
176
  key: y,
178
177
  class: "infinite-list-item"
179
178
  }, [
@@ -186,14 +185,14 @@ const ae = { class: "opt-wrap" }, se = {
186
185
  }), null, 16, ["pdf", "page", "scale"])
187
186
  ]))), 128))
188
187
  ], 8, de)), [
189
- [K, G]
188
+ [K, A]
190
189
  ])
191
190
  ]),
192
191
  _: 1
193
192
  })
194
193
  ]))
195
194
  ])
196
- ], 2)) : B("", !0);
195
+ ], 2)) : x("", !0);
197
196
  };
198
197
  }
199
198
  });
@@ -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-f1015473"]]);exports.default=u;
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-4958e67a"]]);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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f1015473"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4958e67a"]]);
5
5
  export {
6
- f as default
6
+ e 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 j=Object.defineProperty;var p=(v,k)=>j(v,"name",{value:k,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"),F=,/* empty css */Y=,/* empty css */S=,/* empty css */H=,/* empty css */c=,/* empty css */U=,/* empty css */$=,/* empty css */G=,/* empty css */J=,/* empty css */K=,/* empty css */Q=,/* empty css */W=,/* empty css */X={class:"ls-table-wrap"},Z=e.defineComponent({name:"LSTable"}),_=e.defineComponent({...Z,inheritAttrs:!1,props:Y.lsTableProps,emits:["sizeChange","currentPageChange","update:page-size","update:current-page","update:selection"],setup(v,{expose:k,emit:z}){const i=v,f=z,a=e.useAttrs(),w=e.ref(),h=e.ref(1),y=e.ref(10),d=e.ref([]),g=e.computed(()=>(a==null?void 0:a.rowKey)||(a==null?void 0:a.rowkey)||a["row-key"]||"id");e.watch(()=>i.currentPage,t=>{if(t!==h.value){const o=Math.max(1,Math.min(t,Math.ceil(i.total/y.value)));h.value=o,o!==t&&f("update:current-page",o)}},{immediate:!0}),e.watch([()=>i.pageSize,()=>i.pageSizes],([t,o])=>{let r=t;S.isEmpty(o)||(r=o.includes(t)?t:o[0]),y.value=r,r!==t&&f("update:page-size",r)},{immediate:!0}),e.watch(()=>i.selection,t=>{d.value=t||[]},{immediate:!0,deep:!0});function B(t,o){if(!t)throw new Error("Row is required when get row identity");return typeof o=="string"?`${c.default(t,o)}`:typeof o=="function"?o.call(null,t):""}p(B,"getRowIdentity");function m(t,o,r){return B(t,r)===B(o,r)}p(m,"isSameRow"),e.watch([()=>i.tableData,()=>i.showSelect,()=>i.selection],([t,o,r])=>{o&&t&&t.length>0&&e.nextTick(()=>{t.forEach(n=>{(r||[]).some(b=>m(b,n,g.value))&&w.value.toggleRowSelection(n,!0)})})},{immediate:!0,deep:!0}),e.watch(()=>d.value,t=>{f("update:selection",t)},{deep:!0}),e.watch(h,t=>{f("currentPageChange",t),f("update:current-page",t)}),e.watch(y,t=>{f("sizeChange",t),f("update:page-size",t)});function T(t){return(h.value-1)*y.value+t+1}p(T,"indexMethod");function N(t,o){return t?F.default(t).format(o||"YYYY-MM-DD HH:mm:ss"):i.labelEmpty||"--"}p(N,"formatDate");function D(t,o){const r=(t||[]).findIndex(u=>m(u,o,g.value)),n=(d.value||[]).findIndex(u=>m(u,o,g.value));r>-1?d.value.push(o):d.value.splice(n,1)}p(D,"handleSelect");function R(t){const o=t.length>0;i.tableData.length>0&&i.tableData.forEach(r=>{const n=(d.value||[]).findIndex(u=>m(r,u,g.value));o?n<0&&d.value.push(r):n>=0&&d.value.splice(n,1)})}p(R,"handleSelectAll");const x=e.computed(()=>{const t={...a};if(t["table-layout"]||(t["table-layout"]="auto"),i.showSelect&&(t.onSelect||(t.onSelect=D),t.onSelectAll||(t.onSelectAll=R)),a&&a.hasOwnProperty("show-overflow-tooltip"))if(typeof a["show-overflow-tooltip"]=="boolean")a["show-overflow-tooltip"]===!0&&(t["show-overflow-tooltip"]={popperClass:"table-popper-css"});else if(typeof a["show-overflow-tooltip"]=="object"){const o=a["show-overflow-tooltip"]||{},r=`table-popper-css ${o&&(o==null?void 0:o.popperClass)}`;t["show-overflow-tooltip"]={...o,popperClass:r}}else t["show-overflow-tooltip"]={popperClass:"table-popper-css"};else t["show-overflow-tooltip"]={popperClass:"table-popper-css"};return t});function q(t,o,r){var n;return(n=t[c.default(o,r)])==null?void 0:n.type}p(q,"getStatusType");function I(t="default",o,r){const n=[];return["dot","follow"].includes(t)&&(n.push("ls-table-status"),n.push(`ls-table-status--${o||"default"}`)),r&&n.push(r),n.join(" ")}return p(I,"getStatusClass"),k({TableRef:w}),(t,o)=>{const r=U.ElRadio,n=$.ElTableColumn,u=G.ElText,b=J.ElEmpty,V=$.ElTable,M=K.ElPagination,A=Q.ElConfigProvider,O=W.vLoading;return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(A,{locale:e.unref(H.default)},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(V,e.mergeProps({ref_key:"TableRef",ref:w,style:{width:"100%"}},e.unref(x),{data:t.tableData}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend",{},void 0,!0),t.showRadio?(e.openBlock(),e.createBlock(n,e.mergeProps({key:0,width:"60"},t.radioColumnOptions),{default:e.withCtx(({row:l})=>[e.createVNode(r,{"model-value":t.currentRow?t.currentRow[t.radioProp]:void 0,label:l[t.radioProp]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.showRadioLabel?l[t.radioProp]:""),1)]),_:2},1032,["model-value","label"])]),_:1},16)):e.createCommentVNode("",!0),t.showSelect?(e.openBlock(),e.createBlock(n,e.mergeProps({key:1,width:"60"},t.selectColumnOptions,{type:"selection"}),null,16)):e.createCommentVNode("",!0),t.showExpand?(e.openBlock(),e.createBlock(n,e.mergeProps({key:2},t.expandColumnOptions,{type:"expand"}),{default:e.withCtx(({row:l})=>[e.renderSlot(t.$slots,"expand",{row:l},void 0,!0)]),_:3},16)):e.createCommentVNode("",!0),t.showTableIndex?(e.openBlock(),e.createBlock(n,e.mergeProps({key:3,width:"60",fixed:t.tableIndexfixed,label:t.tableIndexLabel,index:T},t.indexColumnOptions,{type:"index"}),null,16,["fixed","label"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tableColumn,l=>(e.openBlock(),e.createBlock(n,e.mergeProps({key:l.prop,ref_for:!0},l),e.createSlots({default:e.withCtx(({row:s,column:C,$index:L})=>[l.type==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(N(e.unref(c.default)(s,l.prop),l.dateTemplate)),1)],64)):l.type==="status"?(e.openBlock(),e.createBlock(u,{key:1,type:["default","follow"].includes(l.statusStyle||"default")?q(l.value,s,l.prop):"",class:e.normalizeClass(I(l.statusStyle,q(l.value,s,l.prop),l.className))},{default:e.withCtx(()=>{var E,P;return[e.createTextVNode(e.toDisplayString(((E=l.value[e.unref(c.default)(s,l.prop)])==null?void 0:E.label)||((P=l.value.default)==null?void 0:P.label)||s[l.prop]),1)]}),_:2},1032,["type","class"])):l.type==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.unref(S.isEmpty)(e.unref(c.default)(s,l.prop))?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.labelEmpty||"--"),1)],64)):(e.openBlock(),e.createBlock(u,{key:1,type:Number(e.unref(c.default)(s,l.prop))<0?"danger":`${l.isSuc?"success":""}`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c.default)(s,l.prop)),1)]),_:2},1032,["type"]))],64)):l.type==="slot"?e.renderSlot(t.$slots,l.prop,{key:3,row:s,column:C,index:L},void 0,!0):e.unref(S.isEmpty)(e.unref(c.default)(s,l.prop))?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(t.labelEmptyClass)},e.toDisplayString(t.labelEmpty||"--"),3)):e.createCommentVNode("",!0)]),_:2},[l.headerSlot?{name:"header",fn:e.withCtx(({column:s,$index:C})=>[e.renderSlot(t.$slots,`${l.prop}-header`,{column:s,index:C},void 0,!0)]),key:"0"}:void 0,l.filterIconSlot?{name:"filter-icon",fn:e.withCtx(({filterOpened:s})=>[e.renderSlot(t.$slots,`${l.prop}-filter-icon`,{filterOpened:s},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(b,{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"])),[[O,t.loading]]),t.showPagination?(e.openBlock(),e.createBlock(M,e.mergeProps({key:0,"current-page":e.unref(h),"onUpdate:currentPage":o[0]||(o[0]=l=>e.isRef(h)?h.value=l:null),"page-size":e.unref(y),"onUpdate:pageSize":o[1]||(o[1]=l=>e.isRef(y)?y.value=l: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=_;