@lingshugroup/web-plus 1.0.28 → 1.0.30

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 (56) hide show
  1. package/README.md +3 -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/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min/index.js.gz +0 -0
  6. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.cjs +1 -1
  7. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js +72 -67
  8. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.br +0 -0
  9. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.gz +0 -0
  10. package/lib/packages/ls-components/components/button/Button.vue/index.cjs +1 -1
  11. package/lib/packages/ls-components/components/button/Button.vue/index.js +1 -1
  12. package/lib/packages/ls-components/components/dialog/Index.vue/index.cjs +1 -1
  13. package/lib/packages/ls-components/components/dialog/Index.vue/index.js +2 -1
  14. package/lib/packages/ls-components/components/dialog/Index.vue/index.js.br +0 -0
  15. package/lib/packages/ls-components/components/dialog/Index.vue/index.js.gz +0 -0
  16. package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
  17. package/lib/packages/ls-components/components/form/Form.vue/index.js +2 -2
  18. package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
  19. package/lib/packages/ls-components/components/form/Form.vue/index2.js +105 -91
  20. package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
  21. package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
  22. package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
  23. package/lib/packages/ls-components/components/form/FormItem.vue/index.js +2 -2
  24. package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
  25. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +98 -99
  26. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
  27. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
  28. package/lib/packages/ls-components/components/form/types/index.cjs +1 -1
  29. package/lib/packages/ls-components/components/form/types/index.js +4 -0
  30. package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
  31. package/lib/packages/ls-components/components/form/types/index.js.gz +0 -0
  32. package/lib/packages/ls-components/components/list/List.vue/index.cjs +1 -1
  33. package/lib/packages/ls-components/components/list/List.vue/index.js +2 -2
  34. package/lib/packages/ls-components/components/list/List.vue/index2.cjs +1 -1
  35. package/lib/packages/ls-components/components/list/List.vue/index2.js +133 -127
  36. package/lib/packages/ls-components/components/list/List.vue/index2.js.br +0 -0
  37. package/lib/packages/ls-components/components/list/List.vue/index2.js.gz +0 -0
  38. package/lib/packages/ls-components/components/preview/Index.vue/index.cjs +1 -1
  39. package/lib/packages/ls-components/components/preview/Index.vue/index.js +2 -2
  40. package/lib/packages/ls-components/components/preview/Index.vue/index2.cjs +1 -1
  41. package/lib/packages/ls-components/components/preview/Index.vue/index2.js +42 -34
  42. package/lib/packages/ls-components/components/preview/Index.vue/index2.js.br +0 -0
  43. package/lib/packages/ls-components/components/preview/Index.vue/index2.js.gz +0 -0
  44. package/lib/packages/ls-components/components/table/Table.vue/index.cjs +1 -1
  45. package/lib/packages/ls-components/components/table/Table.vue/index.js +2 -2
  46. package/lib/packages/ls-components/components/table/Table.vue/index2.cjs +1 -1
  47. package/lib/packages/ls-components/components/table/Table.vue/index2.js +145 -136
  48. package/lib/packages/ls-components/components/table/Table.vue/index2.js.br +0 -0
  49. package/lib/packages/ls-components/components/table/Table.vue/index2.js.gz +0 -0
  50. package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
  51. package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
  52. package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
  53. package/lib/packages/ls-components/components/upload/Index.vue/index2.js +1 -1
  54. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
  55. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
  56. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- var pe = Object.defineProperty;
2
- var o = (P, $) => pe(P, "name", { value: $, configurable: !0 });
1
+ var ye = Object.defineProperty;
2
+ var o = (P, R) => ye(P, "name", { value: R, configurable: !0 });
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
@@ -10,100 +10,100 @@ var o = (P, $) => pe(P, "name", { value: $, configurable: !0 });
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
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
- import { lsListProps as Pe } from "../types/index.js";
17
- import $e from "../../form/Form.vue/index.js";
18
- import Ce from "../../table/Table.vue/index.js";
19
- import Re from "../../_hooks/useRouterHook/index.js";
20
- import { ElTableColumn as Fe } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/table/index/index.js";
21
- import { ElPopconfirm as Le } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/popconfirm/index/index.js";
22
- import { ElSkeleton as Ae } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/skeleton/index/index.js";
23
- const Be = {
13
+ import { defineComponent as _, useSlots as we, ref as h, computed as A, h as De, 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 N, createCommentVNode as b, Fragment as Q, createElementVNode as X, normalizeClass as ge, createTextVNode as v, toDisplayString as k, createVNode as E, isRef as Y, toHandlers as ve } from "vue";
14
+ import ke from "../../_hooks/useTableListHook/index.js";
15
+ import { ElDivider as Z, ElButton as S, ElSwitch as Ee, ElSpace as Se, ElMessage as Pe, ElMessageBox as Re } from "element-plus";
16
+ import { lsListProps as $e } from "../types/index.js";
17
+ import Ce from "../../form/Form.vue/index.js";
18
+ import Fe from "../../table/Table.vue/index.js";
19
+ import Le from "../../_hooks/useRouterHook/index.js";
20
+ import { ElTableColumn as Ae } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/table/index/index.js";
21
+ import { ElPopconfirm as Be } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/popconfirm/index/index.js";
22
+ import { ElSkeleton as Oe } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/skeleton/index/index.js";
23
+ const ze = {
24
24
  key: 0,
25
25
  class: "animate_fadeIn transition-all-300 ls-list-wrap"
26
- }, Oe = { class: "flex items-center" }, ze = Y({
26
+ }, Ke = { class: "flex items-center" }, He = _({
27
27
  name: "LSList"
28
- }), at = /* @__PURE__ */ Y({
29
- ...ze,
30
- props: Pe,
28
+ }), ot = /* @__PURE__ */ _({
29
+ ...He,
30
+ props: $e,
31
31
  emits: ["submitForm"],
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) {
32
+ setup(P, { expose: R, emit: x }) {
33
+ const { jumpRouteCom: $, currentRouter: K } = Le(), e = P, ee = x, H = we(), I = h(), V = h(), te = A(() => Object.keys(H).filter((t) => t.toString().endsWith("-form-slot"))), le = A(() => Object.keys(H).filter((t) => t.toString().endsWith("-table-slot")));
34
+ function M(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(I, "getSlotName");
42
- const { isFirst: V, loading: p, tableData: M, total: U, pageSize: T, currentPage: w, handleReset: q, loadData: y } = ge(
41
+ o(M, "getSlotName");
42
+ const { isFirst: U, loading: T, tableData: q, total: W, pageSize: y, currentPage: w, handleReset: j, loadData: D } = ke(
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
- function te(t) {
48
- _("submitForm", t), e != null && e.queryFn ? e.queryFn(t) : y();
47
+ function ae(t) {
48
+ ee("submitForm", t), e != null && e.queryFn ? e.queryFn(t) : D();
49
49
  }
50
- o(te, "submitForm");
51
- function le(t) {
52
- console.warn("resetForm", t), q();
50
+ o(ae, "submitForm");
51
+ function ie(t) {
52
+ console.warn("resetForm", t), j();
53
53
  }
54
- o(le, "resetForm");
55
- const R = A(() => K ? K.value.path : "");
56
- function ae() {
57
- e != null && e.addFn ? e.addFn() : C(
54
+ o(ie, "resetForm");
55
+ const C = A(() => K ? K.value.path : "");
56
+ function oe() {
57
+ e != null && e.addFn ? e.addFn() : $(
58
58
  {
59
- path: e != null && e.addRoutePath ? e.addRoutePath : `${R.value}/add`
59
+ path: e != null && e.addRoutePath ? e.addRoutePath : `${C.value}/add`
60
60
  },
61
61
  1
62
62
  );
63
63
  }
64
- o(ae, "onAdd");
65
- function ie(t, l) {
66
- e != null && e.tableDetailFn ? e.tableDetailFn(l) : C(
64
+ o(oe, "onAdd");
65
+ function ne(t, l) {
66
+ e != null && e.tableDetailFn ? e.tableDetailFn(l) : $(
67
67
  {
68
- path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${R.value}/detail`}/${t}`
68
+ path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${C.value}/detail`}/${t}`
69
69
  },
70
70
  1
71
71
  );
72
72
  }
73
- o(ie, "onDetail");
74
- function oe(t, l) {
75
- e != null && e.tableEditFn ? e.tableEditFn(l) : C(
73
+ o(ne, "onDetail");
74
+ function se(t, l) {
75
+ e != null && e.tableEditFn ? e.tableEditFn(l) : $(
76
76
  {
77
- path: `${e != null && e.editRoutePath ? e.editRoutePath : `${R.value}/edit`}/${t}`
77
+ path: `${e != null && e.editRoutePath ? e.editRoutePath : `${C.value}/edit`}/${t}`
78
78
  },
79
79
  1
80
80
  );
81
81
  }
82
- o(oe, "onEdit");
83
- const F = D(void 0), h = D(!1);
84
- function ne(t, l) {
82
+ o(se, "onEdit");
83
+ const F = h(void 0), p = h(!1);
84
+ function de(t, l) {
85
85
  if (e.delApi) {
86
- F.value = t, h.value = !0;
86
+ F.value = t, p.value = !0;
87
87
  let d = t;
88
88
  e != null && e.dealDelParams && (d = e.dealDelParams(l)), e.delApi(d).then(() => {
89
- Se.success("删除成功"), y();
89
+ Pe.success("删除成功"), D();
90
90
  }).catch((m) => {
91
91
  console.warn(m);
92
92
  }).finally(() => {
93
- h.value = !1;
93
+ p.value = !1;
94
94
  });
95
95
  }
96
96
  }
97
- o(ne, "onDel");
98
- const W = D(), L = D(!1);
99
- function se(t, l, d) {
100
- W.value = t;
97
+ o(de, "onDel");
98
+ const G = h(), L = h(!1);
99
+ function re(t, l, d) {
100
+ G.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
- y(!1), c(!0);
106
+ D(!1), c(!0);
107
107
  }).catch(() => {
108
108
  a(new Error("Error"));
109
109
  }).finally(() => {
@@ -113,7 +113,7 @@ const Be = {
113
113
  a(new Error("Error"));
114
114
  }, "onSwitch");
115
115
  return new Promise((c, a) => {
116
- l ? ke.confirm('<strong class="text-14px">请问是否关闭?</strong>', {
116
+ l ? Re.confirm('<strong class="text-14px">请问是否关闭?</strong>', {
117
117
  confirmButtonText: "确定",
118
118
  cancelButtonText: "取消",
119
119
  dangerouslyUseHTMLString: !0,
@@ -127,60 +127,64 @@ const Be = {
127
127
  }) : m(c, a);
128
128
  });
129
129
  }
130
- o(se, "switchBeforeChange");
131
- function de(t) {
130
+ o(re, "switchBeforeChange");
131
+ function fe(t) {
132
132
  let l = !1;
133
133
  return e != null && e.disabledTableSwitch && (typeof e.disabledTableSwitch == "boolean" ? l = e.disabledTableSwitch : typeof e.disabledTableSwitch == "function" && (l = e.disabledTableSwitch(t))), !!l;
134
134
  }
135
- o(de, "disabledTableSwitch");
136
- function re(t) {
135
+ o(fe, "disabledTableSwitch");
136
+ function ue(t) {
137
137
  let l = !1;
138
138
  return e != null && e.showTableDetail && (typeof e.showTableDetail == "boolean" ? l = e.showTableDetail : typeof e.showTableDetail == "function" && (l = e.showTableDetail(t))), !!l;
139
139
  }
140
- o(re, "showTableDetail");
141
- function fe(t) {
140
+ o(ue, "showTableDetail");
141
+ function be(t) {
142
142
  let l = !1;
143
143
  return e != null && e.disabledTableDetail && (typeof e.disabledTableDetail == "boolean" ? l = e.disabledTableDetail : typeof e.disabledTableDetail == "function" && (l = e.disabledTableDetail(t))), !!l;
144
144
  }
145
- o(fe, "disabledTableDetail");
146
- function ue(t) {
145
+ o(be, "disabledTableDetail");
146
+ function me(t) {
147
147
  let l = !1;
148
148
  return e != null && e.showTableEdit && (typeof e.showTableEdit == "boolean" ? l = e.showTableEdit : typeof e.showTableEdit == "function" && (l = e.showTableEdit(t))), !!l;
149
149
  }
150
- o(ue, "showTableEdit");
151
- function be(t) {
150
+ o(me, "showTableEdit");
151
+ function ce(t) {
152
152
  let l = !1;
153
153
  return e != null && e.disabledTableEdit && (typeof e.disabledTableEdit == "boolean" ? l = e.disabledTableEdit : typeof e.disabledTableEdit == "function" && (l = e.disabledTableEdit(t))), !!l;
154
154
  }
155
- o(be, "disabledTableEdit");
156
- function me(t) {
155
+ o(ce, "disabledTableEdit");
156
+ function he(t) {
157
157
  let l = !1;
158
158
  return e != null && e.showTableDel && (typeof e.showTableDel == "boolean" ? l = e.showTableDel : typeof e.showTableDel == "function" && (l = e.showTableDel(t))), !!l;
159
159
  }
160
- o(me, "showTableDel");
161
- function ce(t) {
160
+ o(he, "showTableDel");
161
+ function pe(t) {
162
162
  let l = !1;
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
- o(ce, "disabledTableDel");
166
- const he = we(X, { direction: "vertical" });
167
- return $({
168
- loadData: y,
169
- handleReset: q,
170
- isFirst: V,
171
- loading: p,
165
+ o(pe, "disabledTableDel");
166
+ const Te = De(Z, { direction: "vertical" });
167
+ return R({
168
+ loadData: D,
169
+ handleReset: j,
170
+ isFirst: U,
171
+ loading: T,
172
172
  currentPage: w,
173
- pageSize: T,
174
- total: U
173
+ pageSize: y,
174
+ total: W,
175
+ FormRef: I,
176
+ TableRef: V
175
177
  }), (t, l) => {
176
- const d = Fe, m = Le, c = Ae;
177
- return i(V) ? (n(), f(c, {
178
+ const d = Ae, m = Be, c = Oe;
179
+ return i(U) ? (n(), f(c, {
178
180
  key: 1,
179
181
  rows: 5,
180
182
  animated: ""
181
- })) : (n(), B("div", Be, [
182
- t.showForm ? (n(), f($e, g({
183
+ })) : (n(), B("div", ze, [
184
+ t.showForm ? (n(), f(Ce, g({
183
185
  key: 0,
186
+ ref_key: "FormRef",
187
+ ref: I,
184
188
  class: ["mb-6px ls-form-cpo", t.formClass],
185
189
  "label-position": "top",
186
190
  "show-btn-loading": !1,
@@ -188,42 +192,42 @@ const Be = {
188
192
  inline: !0,
189
193
  "form-data": t.formData,
190
194
  "form-items": t.formItems,
191
- loading: i(p),
195
+ loading: i(T),
192
196
  "confirm-text": "查询"
193
197
  }, t.formAttrs, {
194
- onSubmit: te,
195
- onReset: le
196
- }), j({
198
+ onSubmit: ae,
199
+ onReset: ie
200
+ }), J({
197
201
  default: s((a) => [
198
202
  u(t.$slots, "form-append", O(z(a)), void 0, !0)
199
203
  ]),
200
204
  _: 2
201
205
  }, [
202
- G(i(x), (a) => ({
203
- name: I(a, !0),
206
+ N(i(te), (a) => ({
207
+ name: M(a, !0),
204
208
  fn: s((r) => [
205
209
  u(t.$slots, a, O(z(r)), void 0, !0)
206
210
  ])
207
211
  }))
208
212
  ]), 1040, ["class", "form-data", "form-items", "loading"])) : b("", !0),
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
- t.showOperateDivider ? (n(), f(i(X), {
213
+ t.showOperate ? (n(), B(Q, { key: 1 }, [
214
+ t.$slots.operate ? u(t.$slots, "operate", { key: 0 }, void 0, !0) : (n(), B(Q, { key: 1 }, [
215
+ t.showOperateDivider ? (n(), f(i(Z), {
212
216
  key: 0,
213
217
  "border-style": "dashed"
214
218
  })) : b("", !0),
215
- N("div", {
216
- class: ye(["mt-24px flex items-center justify-start", t.operateClass])
219
+ X("div", {
220
+ class: ge(["mt-24px flex items-center justify-start", t.operateClass])
217
221
  }, [
218
222
  u(t.$slots, "operate-prepend", {}, void 0, !0),
219
- t.showAdd ? (n(), f(i(k), {
223
+ t.showAdd ? (n(), f(i(S), {
220
224
  key: 0,
221
225
  type: "primary",
222
- disabled: i(p) || t.disabledAddBtn,
223
- onClick: ae
226
+ disabled: i(T) || t.disabledAddBtn,
227
+ onClick: oe
224
228
  }, {
225
229
  default: s(() => [
226
- v(E(t.addBtnText), 1)
230
+ v(k(t.addBtnText), 1)
227
231
  ]),
228
232
  _: 1
229
233
  }, 8, ["disabled"])) : b("", !0),
@@ -231,18 +235,20 @@ const Be = {
231
235
  ], 2)
232
236
  ], 64))
233
237
  ], 64)) : b("", !0),
234
- S(Ce, g({
238
+ E(Fe, g({
239
+ ref_key: "TableRef",
240
+ ref: V,
235
241
  class: ["ls-table-cpo", [t.showOperate ? "mt-16px" : "mt-24px"]],
236
242
  "show-overflow-tooltip": !0,
237
- loading: i(p),
238
- total: i(U),
239
- "table-data": i(M),
243
+ loading: i(T),
244
+ total: i(W),
245
+ "table-data": i(q),
240
246
  "table-column": t.tableColumn,
241
247
  "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({
248
+ "onUpdate:currentPage": l[0] || (l[0] = (a) => Y(w) ? w.value = a : null),
249
+ "page-size": i(y),
250
+ "onUpdate:pageSize": l[1] || (l[1] = (a) => Y(y) ? y.value = a : null)
251
+ }, t.tableAttrs, ve(t.tableListeners || {})), J({
246
252
  default: s(() => [
247
253
  t.showTableSwitch ? (n(), f(d, g({
248
254
  key: 0,
@@ -251,14 +257,14 @@ const Be = {
251
257
  width: "100"
252
258
  }, t.tableSwitchColumn), {
253
259
  default: s(({ row: a }) => [
254
- S(i(ve), {
260
+ E(i(Ee), {
255
261
  class: "ls-list-table__switch",
256
262
  "model-value": a[t.switchProp] ? 1 : 0,
257
263
  "active-value": 1,
258
264
  "inactive-value": 0,
259
- loading: i(L) && a[t.tableRowKey] === i(W),
260
- "before-change": /* @__PURE__ */ o(() => se(a[t.tableRowKey], a[t.switchProp], a), "before-change"),
261
- disabled: de(a)
265
+ loading: i(L) && a[t.tableRowKey] === i(G),
266
+ "before-change": /* @__PURE__ */ o(() => re(a[t.tableRowKey], a[t.switchProp], a), "before-change"),
267
+ disabled: fe(a)
262
268
  }, null, 8, ["model-value", "loading", "before-change", "disabled"])
263
269
  ]),
264
270
  _: 1
@@ -271,38 +277,38 @@ const Be = {
271
277
  "show-overflow-tooltip": !1
272
278
  }, t.tableOperateColumn), {
273
279
  default: s(({ row: a }) => [
274
- N("div", Oe, [
275
- S(i(Ee), {
280
+ X("div", Ke, [
281
+ E(i(Se), {
276
282
  size: 0,
277
- spacer: i(he)
283
+ spacer: i(Te)
278
284
  }, {
279
285
  default: s(() => [
280
286
  u(t.$slots, "table-operate-prepend", { row: a }, void 0, !0),
281
- re(a) ? (n(), f(i(k), {
287
+ ue(a) ? (n(), f(i(S), {
282
288
  key: 0,
283
- disabled: fe(a),
289
+ disabled: be(a),
284
290
  link: "",
285
291
  type: "primary",
286
- onClick: /* @__PURE__ */ o((r) => ie(a[t.tableRowKey], a), "onClick")
292
+ onClick: /* @__PURE__ */ o((r) => ne(a[t.tableRowKey], a), "onClick")
287
293
  }, {
288
294
  default: s(() => [
289
- v(E(t.tableDetailText || "查看"), 1)
295
+ v(k(t.tableDetailText || "查看"), 1)
290
296
  ]),
291
297
  _: 2
292
298
  }, 1032, ["disabled", "onClick"])) : b("", !0),
293
- ue(a) ? (n(), f(i(k), {
299
+ me(a) ? (n(), f(i(S), {
294
300
  key: 1,
295
- disabled: be(a),
301
+ disabled: ce(a),
296
302
  link: "",
297
303
  type: "primary",
298
- onClick: /* @__PURE__ */ o((r) => oe(a[t.tableRowKey], a), "onClick")
304
+ onClick: /* @__PURE__ */ o((r) => se(a[t.tableRowKey], a), "onClick")
299
305
  }, {
300
306
  default: s(() => [
301
- v(E(t.tableEditText || "编辑"), 1)
307
+ v(k(t.tableEditText || "编辑"), 1)
302
308
  ]),
303
309
  _: 2
304
310
  }, 1032, ["disabled", "onClick"])) : b("", !0),
305
- me(a) ? (n(), f(m, {
311
+ he(a) ? (n(), f(m, {
306
312
  key: 2,
307
313
  "hide-icon": "",
308
314
  placement: "top",
@@ -310,17 +316,17 @@ const Be = {
310
316
  "confirm-button-text": "确认",
311
317
  "cancel-button-text": "取消",
312
318
  title: "是否删除当前列数据?",
313
- onConfirm: /* @__PURE__ */ o((r) => ne(a[t.tableRowKey], a), "onConfirm")
319
+ onConfirm: /* @__PURE__ */ o((r) => de(a[t.tableRowKey], a), "onConfirm")
314
320
  }, {
315
321
  reference: s(() => [
316
- S(i(k), {
322
+ E(i(S), {
317
323
  link: "",
318
324
  type: "danger",
319
- disabled: i(h) || ce(a),
320
- loading: i(h) && i(F) === a[t.tableRowKey]
325
+ disabled: i(p) || pe(a),
326
+ loading: i(p) && i(F) === a[t.tableRowKey]
321
327
  }, {
322
328
  default: s(() => [
323
- v(E(i(h) && i(F) === a[t.tableRowKey] ? "" : t.tableDelText || "删除"), 1)
329
+ v(k(i(p) && i(F) === a[t.tableRowKey] ? "" : t.tableDelText || "删除"), 1)
324
330
  ]),
325
331
  _: 2
326
332
  }, 1032, ["disabled", "loading"])
@@ -335,12 +341,12 @@ const Be = {
335
341
  ]),
336
342
  _: 3
337
343
  }, 16)) : b("", !0),
338
- u(t.$slots, "table-append", { tableData: i(M) }, void 0, !0)
344
+ u(t.$slots, "table-append", { tableData: i(q) }, void 0, !0)
339
345
  ]),
340
346
  _: 2
341
347
  }, [
342
- G(i(ee), (a) => ({
343
- name: I(a, !1),
348
+ N(i(le), (a) => ({
349
+ name: M(a, !1),
344
350
  fn: s((r) => [
345
351
  u(t.$slots, a, O(z(r)), void 0, !0)
346
352
  ])
@@ -351,5 +357,5 @@ const Be = {
351
357
  }
352
358
  });
353
359
  export {
354
- at as default
360
+ ot as default
355
361
  };
@@ -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-fb93ca95"]]);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-a1aa0014"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
- import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fb93ca95"]]);
3
+ import a from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
+ const e = /* @__PURE__ */ a(o, [["__scopeId", "data-v-a1aa0014"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var x=Object.defineProperty;var l=(a,u)=>x(a,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),P=require("../../_hooks/useNamespace/index.cjs"),q=require("../types/index.cjs"),y=require("element-plus"),M=require("../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs"),L=e.defineComponent({name:"LSPreview",inheritAttrs:!1,__name:"Index",props:e.mergeModels(q.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(a,{emit:u}){const m=u,o=a,{type:r,zoomSize:g}=e.toRefs(o),n=e.useModel(a,"modelValue"),p=e.reactive({zoomSize:g,source:""}),C=P.useNamespace("preview").b(),t=e.shallowRef({image:null,docx:null,xlsx:null,pdf:null}),c=e.ref(),v=e.computed(()=>(r==null?void 0:r.value)&&t.value[r==null?void 0:r.value]),i=e.ref();e.watch(()=>n==null?void 0:n.value,s=>{s&&f()},{immediate:!0,deep:!0}),e.watch(()=>o.source,s=>{p.source=s},{immediate:!0,deep:!0});function f(){switch(i.value="",o.needLoading&&(c.value=y.ElLoading.service(o.loadingOption)),o.type){case"image":t.value.image=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Image.vue/index.cjs")));break;case"docx":t.value.docx=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Docx.vue/index.cjs")));break;case"xlsx":t.value.xlsx=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Xlsx.vue/index.cjs")));break;case"pdf":t.value.pdf=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Pdf.vue/index.cjs")));break}}l(f,"openLoading");const d=l(()=>{o.needLoading&&c.value&&c.value.close()},"closeLoading"),h=l(()=>{d(),m("loadComplete")},"loadComplete"),k=l(()=>{d(),i.value="文件加载失败,请检查文件是否已损坏!",console.error(i.value),m("loadError")},"loadError");return e.onBeforeMount(()=>{n.value&&o.type&&f()}),e.onBeforeUnmount(()=>{d()}),(s,b)=>n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(C))},[e.unref(v)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(v)),e.mergeProps({key:0},e.unref(M.default)(e.unref(p),s.$attrs),{onLoadComplete:h,onLoadError:k}),null,16)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}});exports.default=L;
1
+ "use strict";var k=Object.defineProperty;var l=(a,i)=>k(a,"name",{value:i,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=,/* empty css */P=,/* empty css */y=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const L=,/* empty css */B=,/* empty css */E=e.defineComponent({name:"LSPreview",inheritAttrs:!1,__name:"Index",props:e.mergeModels(P.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(a,{emit:i}){const d=i,o=a,{type:r,zoomSize:g}=e.toRefs(o),n=e.useModel(a,"modelValue"),p=e.reactive({zoomSize:g,source:""}),C=M.useNamespace("preview").b(),t=e.shallowRef({image:null,docx:null,xlsx:null,pdf:null}),m=e.ref(),f=e.computed(()=>(r==null?void 0:r.value)&&t.value[r==null?void 0:r.value]),q=e.ref("文件加载失败,请检查文件是否已损坏!");let u=null;e.watch(()=>n==null?void 0:n.value,s=>{s&&v()},{immediate:!0,deep:!0}),e.watch(()=>o.source,s=>{p.source=s},{immediate:!0,deep:!0});function v(){switch(o.needLoading&&(m.value=y.ElLoading.service(o.loadingOption)),o.type){case"image":t.value.image=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Image.vue/index.cjs")));break;case"docx":t.value.docx=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Docx.vue/index.cjs")));break;case"xlsx":t.value.xlsx=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Xlsx.vue/index.cjs")));break;case"pdf":t.value.pdf=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Pdf.vue/index.cjs")));break}u=setTimeout(()=>{o.source||(L.ElMessage.error("文件加载超时,请检查文件是否存在!"),c(),n.value=!1),clearTimeout(u)},6e3)}l(v,"openLoading");const c=l(()=>{u&&clearTimeout(u),o.needLoading&&m.value&&m.value.close()},"closeLoading"),x=l(()=>{c(),d("loadComplete")},"loadComplete"),h=l(()=>{c(),console.error(q.value),d("loadError")},"loadError");return e.onBeforeMount(()=>{n.value&&o.type&&v()}),e.onBeforeUnmount(()=>{c()}),(s,w)=>n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(C))},[e.unref(f)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(f)),e.mergeProps({key:0},e.unref(B.default)(e.unref(p),s.$attrs),{onLoadComplete:x,onLoadError:h}),null,16)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}});exports.default=E;
@@ -1,11 +1,15 @@
1
- var b = Object.defineProperty;
2
- var l = (s, m) => b(s, "name", { value: m, configurable: !0 });
3
- import { defineComponent as y, mergeModels as x, toRefs as P, useModel as z, reactive as A, shallowRef as V, ref as C, computed as _, watch as k, defineAsyncComponent as c, onBeforeMount as I, onBeforeUnmount as N, openBlock as L, createElementBlock as R, normalizeClass as S, unref as n, createBlock as D, resolveDynamicComponent as O, mergeProps as U, createCommentVNode as B } from "vue";
1
+ var y = Object.defineProperty;
2
+ var l = (s, u) => y(s, "name", { value: u, configurable: !0 });
3
+ import { defineComponent as P, mergeModels as x, toRefs as z, useModel as A, reactive as T, shallowRef as V, ref as C, computed as _, watch as k, defineAsyncComponent as i, onBeforeMount as I, onBeforeUnmount as N, openBlock as L, createElementBlock as R, normalizeClass as S, unref as n, createBlock as D, resolveDynamicComponent as O, mergeProps as U, createCommentVNode as E } from "vue";
4
4
  import { useNamespace as $ } from "../../_hooks/useNamespace/index.js";
5
5
  import { lsPreviewProp as j } from "../types/index.js";
6
6
  import { ElLoading as q } from "element-plus";
7
- import F from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
8
- const Y = /* @__PURE__ */ y({
7
+ /* empty css */
8
+ /* empty css */
9
+ /* empty css */
10
+ import { ElMessage as F } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/message/index/index.js";
11
+ import G from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
12
+ const ae = /* @__PURE__ */ P({
9
13
  name: "LSPreview",
10
14
  // components: {
11
15
  // LSImage,
@@ -22,20 +26,21 @@ const Y = /* @__PURE__ */ y({
22
26
  modelModifiers: {}
23
27
  }),
24
28
  emits: /* @__PURE__ */ x(["loadComplete", "loadError"], ["update:modelValue"]),
25
- setup(s, { emit: m }) {
26
- const p = m, e = s, { type: o, zoomSize: E } = P(e), r = z(s, "modelValue"), f = A({
27
- zoomSize: E,
29
+ setup(s, { emit: u }) {
30
+ const p = u, e = s, { type: o, zoomSize: M } = z(e), r = A(s, "modelValue"), f = T({
31
+ zoomSize: M,
28
32
  source: ""
29
- }), M = $("preview").b(), a = V({
33
+ }), B = $("preview").b(), t = V({
30
34
  image: null,
31
35
  docx: null,
32
36
  xlsx: null,
33
37
  pdf: null
34
- }), u = C(), v = _(() => (o == null ? void 0 : o.value) && a.value[o == null ? void 0 : o.value]), d = C();
38
+ }), d = C(), v = _(() => (o == null ? void 0 : o.value) && t.value[o == null ? void 0 : o.value]), h = C("文件加载失败,请检查文件是否已损坏!");
39
+ let m = null;
35
40
  k(
36
41
  () => r == null ? void 0 : r.value,
37
- (t) => {
38
- t && g();
42
+ (a) => {
43
+ a && g();
39
44
  },
40
45
  {
41
46
  immediate: !0,
@@ -43,8 +48,8 @@ const Y = /* @__PURE__ */ y({
43
48
  }
44
49
  ), k(
45
50
  () => e.source,
46
- (t) => {
47
- f.source = t;
51
+ (a) => {
52
+ f.source = a;
48
53
  },
49
54
  {
50
55
  immediate: !0,
@@ -52,44 +57,47 @@ const Y = /* @__PURE__ */ y({
52
57
  }
53
58
  );
54
59
  function g() {
55
- switch (d.value = "", e.needLoading && (u.value = q.service(e.loadingOption)), e.type) {
60
+ switch (e.needLoading && (d.value = q.service(e.loadingOption)), e.type) {
56
61
  case "image":
57
- a.value.image = c(() => import("../components/Image.vue/index.js"));
62
+ t.value.image = i(() => import("../components/Image.vue/index.js"));
58
63
  break;
59
64
  case "docx":
60
- a.value.docx = c(() => import("../components/Docx.vue/index.js"));
65
+ t.value.docx = i(() => import("../components/Docx.vue/index.js"));
61
66
  break;
62
67
  case "xlsx":
63
- a.value.xlsx = c(() => import("../components/Xlsx.vue/index.js"));
68
+ t.value.xlsx = i(() => import("../components/Xlsx.vue/index.js"));
64
69
  break;
65
70
  case "pdf":
66
- a.value.pdf = c(() => import("../components/Pdf.vue/index.js"));
71
+ t.value.pdf = i(() => import("../components/Pdf.vue/index.js"));
67
72
  break;
68
73
  }
74
+ m = setTimeout(() => {
75
+ e.source || (F.error("文件加载超时,请检查文件是否存在!"), c(), r.value = !1), clearTimeout(m);
76
+ }, 6e3);
69
77
  }
70
78
  l(g, "openLoading");
71
- const i = /* @__PURE__ */ l(() => {
72
- e.needLoading && u.value && u.value.close();
73
- }, "closeLoading"), h = /* @__PURE__ */ l(() => {
74
- i(), p("loadComplete");
75
- }, "loadComplete"), w = /* @__PURE__ */ l(() => {
76
- i(), d.value = "文件加载失败,请检查文件是否已损坏!", console.error(d.value), p("loadError");
79
+ const c = /* @__PURE__ */ l(() => {
80
+ m && clearTimeout(m), e.needLoading && d.value && d.value.close();
81
+ }, "closeLoading"), w = /* @__PURE__ */ l(() => {
82
+ c(), p("loadComplete");
83
+ }, "loadComplete"), b = /* @__PURE__ */ l(() => {
84
+ c(), console.error(h.value), p("loadError");
77
85
  }, "loadError");
78
86
  return I(() => {
79
87
  r.value && e.type && g();
80
88
  }), N(() => {
81
- i();
82
- }), (t, H) => r.value ? (L(), R("div", {
89
+ c();
90
+ }), (a, J) => r.value ? (L(), R("div", {
83
91
  key: 0,
84
- class: S(n(M))
92
+ class: S(n(B))
85
93
  }, [
86
- n(v) ? (L(), D(O(n(v)), U({ key: 0 }, n(F)(n(f), t.$attrs), {
87
- onLoadComplete: h,
88
- onLoadError: w
89
- }), null, 16)) : B("", !0)
90
- ], 2)) : B("", !0);
94
+ n(v) ? (L(), D(O(n(v)), U({ key: 0 }, n(G)(n(f), a.$attrs), {
95
+ onLoadComplete: w,
96
+ onLoadError: b
97
+ }), null, 16)) : E("", !0)
98
+ ], 2)) : E("", !0);
91
99
  }
92
100
  });
93
101
  export {
94
- Y as default
102
+ ae as default
95
103
  };