@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.
- package/README.md +3 -1
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min/index.js.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 +72 -67
- 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/button/Button.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index.js +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index.js +2 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index.js.br +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/index.js.gz +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.js +2 -2
- package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.js +105 -91
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index.js +2 -2
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +98 -99
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/types/index.js +4 -0
- package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/form/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/list/List.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index.js +2 -2
- package/lib/packages/ls-components/components/list/List.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index2.js +133 -127
- package/lib/packages/ls-components/components/list/List.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/list/List.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview/Index.vue/index2.js +42 -34
- package/lib/packages/ls-components/components/preview/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/table/Table.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index.js +2 -2
- package/lib/packages/ls-components/components/table/Table.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/table/Table.vue/index2.js +145 -136
- 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/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var o = (P,
|
|
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
|
|
14
|
-
import
|
|
15
|
-
import { ElDivider as
|
|
16
|
-
import { lsListProps as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { ElTableColumn as
|
|
21
|
-
import { ElPopconfirm as
|
|
22
|
-
import { ElSkeleton as
|
|
23
|
-
const
|
|
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
|
-
},
|
|
26
|
+
}, Ke = { class: "flex items-center" }, He = _({
|
|
27
27
|
name: "LSList"
|
|
28
|
-
}),
|
|
29
|
-
...
|
|
30
|
-
props:
|
|
28
|
+
}), ot = /* @__PURE__ */ _({
|
|
29
|
+
...He,
|
|
30
|
+
props: $e,
|
|
31
31
|
emits: ["submitForm"],
|
|
32
|
-
setup(P, { expose:
|
|
33
|
-
const { jumpRouteCom:
|
|
34
|
-
function
|
|
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(
|
|
42
|
-
const { isFirst:
|
|
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
|
|
48
|
-
|
|
47
|
+
function ae(t) {
|
|
48
|
+
ee("submitForm", t), e != null && e.queryFn ? e.queryFn(t) : D();
|
|
49
49
|
}
|
|
50
|
-
o(
|
|
51
|
-
function
|
|
52
|
-
console.warn("resetForm", t),
|
|
50
|
+
o(ae, "submitForm");
|
|
51
|
+
function ie(t) {
|
|
52
|
+
console.warn("resetForm", t), j();
|
|
53
53
|
}
|
|
54
|
-
o(
|
|
55
|
-
const
|
|
56
|
-
function
|
|
57
|
-
e != null && e.addFn ? e.addFn() :
|
|
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 : `${
|
|
59
|
+
path: e != null && e.addRoutePath ? e.addRoutePath : `${C.value}/add`
|
|
60
60
|
},
|
|
61
61
|
1
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
|
-
o(
|
|
65
|
-
function
|
|
66
|
-
e != null && e.tableDetailFn ? e.tableDetailFn(l) :
|
|
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 : `${
|
|
68
|
+
path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${C.value}/detail`}/${t}`
|
|
69
69
|
},
|
|
70
70
|
1
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
|
-
o(
|
|
74
|
-
function
|
|
75
|
-
e != null && e.tableEditFn ? e.tableEditFn(l) :
|
|
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 : `${
|
|
77
|
+
path: `${e != null && e.editRoutePath ? e.editRoutePath : `${C.value}/edit`}/${t}`
|
|
78
78
|
},
|
|
79
79
|
1
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
|
-
o(
|
|
83
|
-
const F =
|
|
84
|
-
function
|
|
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,
|
|
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
|
-
|
|
89
|
+
Pe.success("删除成功"), D();
|
|
90
90
|
}).catch((m) => {
|
|
91
91
|
console.warn(m);
|
|
92
92
|
}).finally(() => {
|
|
93
|
-
|
|
93
|
+
p.value = !1;
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
o(
|
|
98
|
-
const
|
|
99
|
-
function
|
|
100
|
-
|
|
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
|
-
|
|
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 ?
|
|
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(
|
|
131
|
-
function
|
|
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(
|
|
136
|
-
function
|
|
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(
|
|
141
|
-
function
|
|
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(
|
|
146
|
-
function
|
|
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(
|
|
151
|
-
function
|
|
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(
|
|
156
|
-
function
|
|
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(
|
|
161
|
-
function
|
|
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(
|
|
166
|
-
const
|
|
167
|
-
return
|
|
168
|
-
loadData:
|
|
169
|
-
handleReset:
|
|
170
|
-
isFirst:
|
|
171
|
-
loading:
|
|
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:
|
|
174
|
-
total:
|
|
173
|
+
pageSize: y,
|
|
174
|
+
total: W,
|
|
175
|
+
FormRef: I,
|
|
176
|
+
TableRef: V
|
|
175
177
|
}), (t, l) => {
|
|
176
|
-
const d =
|
|
177
|
-
return i(
|
|
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",
|
|
182
|
-
t.showForm ? (n(), f(
|
|
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(
|
|
195
|
+
loading: i(T),
|
|
192
196
|
"confirm-text": "查询"
|
|
193
197
|
}, t.formAttrs, {
|
|
194
|
-
onSubmit:
|
|
195
|
-
onReset:
|
|
196
|
-
}),
|
|
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
|
-
|
|
203
|
-
name:
|
|
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(
|
|
210
|
-
t.$slots.operate ? u(t.$slots, "operate", { key: 0 }, void 0, !0) : (n(), B(
|
|
211
|
-
t.showOperateDivider ? (n(), f(i(
|
|
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
|
-
|
|
216
|
-
class:
|
|
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(
|
|
223
|
+
t.showAdd ? (n(), f(i(S), {
|
|
220
224
|
key: 0,
|
|
221
225
|
type: "primary",
|
|
222
|
-
disabled: i(
|
|
223
|
-
onClick:
|
|
226
|
+
disabled: i(T) || t.disabledAddBtn,
|
|
227
|
+
onClick: oe
|
|
224
228
|
}, {
|
|
225
229
|
default: s(() => [
|
|
226
|
-
v(
|
|
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
|
-
|
|
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(
|
|
238
|
-
total: i(
|
|
239
|
-
"table-data": i(
|
|
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) =>
|
|
243
|
-
"page-size": i(
|
|
244
|
-
"onUpdate:pageSize": l[1] || (l[1] = (a) =>
|
|
245
|
-
}, t.tableAttrs,
|
|
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
|
-
|
|
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(
|
|
260
|
-
"before-change": /* @__PURE__ */ o(() =>
|
|
261
|
-
disabled:
|
|
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
|
-
|
|
275
|
-
|
|
280
|
+
X("div", Ke, [
|
|
281
|
+
E(i(Se), {
|
|
276
282
|
size: 0,
|
|
277
|
-
spacer: i(
|
|
283
|
+
spacer: i(Te)
|
|
278
284
|
}, {
|
|
279
285
|
default: s(() => [
|
|
280
286
|
u(t.$slots, "table-operate-prepend", { row: a }, void 0, !0),
|
|
281
|
-
|
|
287
|
+
ue(a) ? (n(), f(i(S), {
|
|
282
288
|
key: 0,
|
|
283
|
-
disabled:
|
|
289
|
+
disabled: be(a),
|
|
284
290
|
link: "",
|
|
285
291
|
type: "primary",
|
|
286
|
-
onClick: /* @__PURE__ */ o((r) =>
|
|
292
|
+
onClick: /* @__PURE__ */ o((r) => ne(a[t.tableRowKey], a), "onClick")
|
|
287
293
|
}, {
|
|
288
294
|
default: s(() => [
|
|
289
|
-
v(
|
|
295
|
+
v(k(t.tableDetailText || "查看"), 1)
|
|
290
296
|
]),
|
|
291
297
|
_: 2
|
|
292
298
|
}, 1032, ["disabled", "onClick"])) : b("", !0),
|
|
293
|
-
|
|
299
|
+
me(a) ? (n(), f(i(S), {
|
|
294
300
|
key: 1,
|
|
295
|
-
disabled:
|
|
301
|
+
disabled: ce(a),
|
|
296
302
|
link: "",
|
|
297
303
|
type: "primary",
|
|
298
|
-
onClick: /* @__PURE__ */ o((r) =>
|
|
304
|
+
onClick: /* @__PURE__ */ o((r) => se(a[t.tableRowKey], a), "onClick")
|
|
299
305
|
}, {
|
|
300
306
|
default: s(() => [
|
|
301
|
-
v(
|
|
307
|
+
v(k(t.tableEditText || "编辑"), 1)
|
|
302
308
|
]),
|
|
303
309
|
_: 2
|
|
304
310
|
}, 1032, ["disabled", "onClick"])) : b("", !0),
|
|
305
|
-
|
|
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) =>
|
|
319
|
+
onConfirm: /* @__PURE__ */ o((r) => de(a[t.tableRowKey], a), "onConfirm")
|
|
314
320
|
}, {
|
|
315
321
|
reference: s(() => [
|
|
316
|
-
|
|
322
|
+
E(i(S), {
|
|
317
323
|
link: "",
|
|
318
324
|
type: "danger",
|
|
319
|
-
disabled: i(
|
|
320
|
-
loading: i(
|
|
325
|
+
disabled: i(p) || pe(a),
|
|
326
|
+
loading: i(p) && i(F) === a[t.tableRowKey]
|
|
321
327
|
}, {
|
|
322
328
|
default: s(() => [
|
|
323
|
-
v(
|
|
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(
|
|
344
|
+
u(t.$slots, "table-append", { tableData: i(q) }, void 0, !0)
|
|
339
345
|
]),
|
|
340
346
|
_: 2
|
|
341
347
|
}, [
|
|
342
|
-
|
|
343
|
-
name:
|
|
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
|
-
|
|
360
|
+
ot as default
|
|
355
361
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-a1aa0014"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const e = /* @__PURE__ */
|
|
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
|
|
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
|
|
2
|
-
var l = (s,
|
|
3
|
-
import { defineComponent as
|
|
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
|
-
|
|
8
|
-
|
|
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:
|
|
26
|
-
const p =
|
|
27
|
-
zoomSize:
|
|
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
|
-
}),
|
|
33
|
+
}), B = $("preview").b(), t = V({
|
|
30
34
|
image: null,
|
|
31
35
|
docx: null,
|
|
32
36
|
xlsx: null,
|
|
33
37
|
pdf: null
|
|
34
|
-
}),
|
|
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
|
-
(
|
|
38
|
-
|
|
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
|
-
(
|
|
47
|
-
f.source =
|
|
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 (
|
|
60
|
+
switch (e.needLoading && (d.value = q.service(e.loadingOption)), e.type) {
|
|
56
61
|
case "image":
|
|
57
|
-
|
|
62
|
+
t.value.image = i(() => import("../components/Image.vue/index.js"));
|
|
58
63
|
break;
|
|
59
64
|
case "docx":
|
|
60
|
-
|
|
65
|
+
t.value.docx = i(() => import("../components/Docx.vue/index.js"));
|
|
61
66
|
break;
|
|
62
67
|
case "xlsx":
|
|
63
|
-
|
|
68
|
+
t.value.xlsx = i(() => import("../components/Xlsx.vue/index.js"));
|
|
64
69
|
break;
|
|
65
70
|
case "pdf":
|
|
66
|
-
|
|
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
|
|
72
|
-
e.needLoading &&
|
|
73
|
-
}, "closeLoading"),
|
|
74
|
-
|
|
75
|
-
}, "loadComplete"),
|
|
76
|
-
|
|
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
|
-
|
|
82
|
-
}), (
|
|
89
|
+
c();
|
|
90
|
+
}), (a, J) => r.value ? (L(), R("div", {
|
|
83
91
|
key: 0,
|
|
84
|
-
class: S(n(
|
|
92
|
+
class: S(n(B))
|
|
85
93
|
}, [
|
|
86
|
-
n(v) ? (L(), D(O(n(v)), U({ key: 0 }, n(
|
|
87
|
-
onLoadComplete:
|
|
88
|
-
onLoadError:
|
|
89
|
-
}), null, 16)) :
|
|
90
|
-
], 2)) :
|
|
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
|
-
|
|
102
|
+
ae as default
|
|
95
103
|
};
|
|
Binary file
|
|
Binary file
|