@lingshugroup/web-plus 2.1.2 → 2.1.3
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/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/list/List.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index.js +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index2.js +239 -211
- 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/list/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/list/types/index.js +76 -7
- package/lib/packages/ls-components/components/list/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/list/types/index.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Fe = Object.defineProperty;
|
|
2
|
+
var i = (R, $) => Fe(R, "name", { value: $, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
@@ -10,148 +10,154 @@ var o = (R, $) => Pe(R, "name", { value: $, configurable: !0 });
|
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
|
-
import { defineComponent as
|
|
13
|
+
import { defineComponent as ae, useSlots as Re, ref as g, computed as v, watch as O, h as $e, createElementBlock as x, createBlock as u, unref as n, openBlock as s, createCommentVNode as b, createVNode as k, mergeProps as d, createSlots as Y, withCtx as r, renderSlot as c, normalizeProps as K, guardReactiveProps as H, renderList as Z, Fragment as _, createElementVNode as ee, normalizeClass as Ae, createTextVNode as P, toDisplayString as C, isRef as te, toHandlers as Be } from "vue";
|
|
14
14
|
import Le from "../../_hooks/useTableListHook/index.js";
|
|
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
|
|
15
|
+
import { ElDivider as le, ElButton as F, ElSwitch as ze, ElSpace as Me, ElMessageBox as Oe, ElMessage as xe } from "element-plus";
|
|
16
|
+
import { lsListProps as Ke } from "../types/index.js";
|
|
17
|
+
import He from "../../form/Form.vue/index.js";
|
|
18
|
+
import Ie from "../../table/Table.vue/index.js";
|
|
19
|
+
import Ve from "../../_hooks/useRouterHook/index.js";
|
|
20
|
+
import { ElTableColumn as Ue } from "../../../../../node_modules/.pnpm/element-plus@2.10.7_vue@3.5.18_typescript@5.9.2_/node_modules/element-plus/es/components/table/index/index.js";
|
|
21
|
+
import { ElPopconfirm as qe } from "../../../../../node_modules/.pnpm/element-plus@2.10.7_vue@3.5.18_typescript@5.9.2_/node_modules/element-plus/es/components/popconfirm/index/index.js";
|
|
22
|
+
import { ElSkeleton as We } from "../../../../../node_modules/.pnpm/element-plus@2.10.7_vue@3.5.18_typescript@5.9.2_/node_modules/element-plus/es/components/skeleton/index/index.js";
|
|
23
|
+
const je = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "animate_fadeIn transition-all-300 ls-list-wrap"
|
|
26
|
-
},
|
|
26
|
+
}, Ge = { class: "flex items-center" }, Je = ae({
|
|
27
27
|
name: "LSList"
|
|
28
|
-
}),
|
|
29
|
-
...
|
|
30
|
-
props:
|
|
31
|
-
emits: ["submitForm", "resetForm", "handleLoading", "handleCurrentPage", "handlePageSize"],
|
|
32
|
-
setup(R, { expose: $, emit:
|
|
33
|
-
const { jumpRouteCom:
|
|
34
|
-
function
|
|
28
|
+
}), ht = /* @__PURE__ */ ae({
|
|
29
|
+
...Je,
|
|
30
|
+
props: Ke,
|
|
31
|
+
emits: ["submitForm", "resetForm", "delSuccess", "switchSuccess", "handleLoading", "handleCurrentPage", "handlePageSize"],
|
|
32
|
+
setup(R, { expose: $, emit: ie }) {
|
|
33
|
+
const { jumpRouteCom: A, currentRouter: I } = Ve(), e = R, h = ie, V = Re(), U = g(), q = g(), ne = v(() => Object.keys(V).filter((t) => t.toString().endsWith("-form-slot"))), oe = v(() => Object.keys(V).filter((t) => t.toString().endsWith("-table-slot")));
|
|
34
|
+
function W(t, a = !1) {
|
|
35
35
|
if (t) {
|
|
36
|
-
const
|
|
37
|
-
return
|
|
36
|
+
const o = t.toString().lastIndexOf(`${a ? "-form-slot" : "-table-slot"}`);
|
|
37
|
+
return o !== -1 ? t.toString().slice(0, o) : t;
|
|
38
38
|
}
|
|
39
39
|
return "";
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
i(W, "getSlotName");
|
|
42
42
|
const {
|
|
43
|
-
isFirst:
|
|
44
|
-
loading:
|
|
45
|
-
tableData:
|
|
46
|
-
total:
|
|
47
|
-
pageSize:
|
|
48
|
-
currentPage:
|
|
49
|
-
handleReset:
|
|
50
|
-
loadData:
|
|
51
|
-
handleCurrentPageChange:
|
|
52
|
-
handleSizeChange:
|
|
43
|
+
isFirst: j,
|
|
44
|
+
loading: p,
|
|
45
|
+
tableData: G,
|
|
46
|
+
total: J,
|
|
47
|
+
pageSize: D,
|
|
48
|
+
currentPage: S,
|
|
49
|
+
handleReset: N,
|
|
50
|
+
loadData: w,
|
|
51
|
+
handleCurrentPageChange: Q,
|
|
52
|
+
handleSizeChange: se
|
|
53
53
|
} = Le(e.listApi, e.formData, {
|
|
54
54
|
dealData: e == null ? void 0 : e.dealData,
|
|
55
55
|
dealParams: e == null ? void 0 : e.dealParams,
|
|
56
56
|
...e == null ? void 0 : e.listHookConfig
|
|
57
57
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
}),
|
|
63
|
-
|
|
58
|
+
O(p, (t) => {
|
|
59
|
+
h("handleLoading", t);
|
|
60
|
+
}), O(S, (t) => {
|
|
61
|
+
h("handleCurrentPage", t);
|
|
62
|
+
}), O(D, (t) => {
|
|
63
|
+
h("handlePageSize", t);
|
|
64
64
|
});
|
|
65
|
-
function se(t) {
|
|
66
|
-
J(1, !1), p("submitForm", t), e != null && e.queryFn ? e.queryFn(t) : E();
|
|
67
|
-
}
|
|
68
|
-
o(se, "submitForm");
|
|
69
65
|
function re(t) {
|
|
70
|
-
|
|
66
|
+
Q(1, !1), h("submitForm", t), e != null && e.queryFn ? e.queryFn(t) : w();
|
|
67
|
+
}
|
|
68
|
+
i(re, "submitForm");
|
|
69
|
+
function de(t) {
|
|
70
|
+
console.warn("resetForm", t), h("resetForm", t), e != null && e.resetFn ? e.resetFn(t) : N();
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
function
|
|
75
|
-
e != null && e.addFn ? e.addFn() :
|
|
72
|
+
i(de, "resetForm");
|
|
73
|
+
const E = v(() => I ? I.value.path : "");
|
|
74
|
+
function fe() {
|
|
75
|
+
e != null && e.addFn ? e.addFn() : A(
|
|
76
76
|
{
|
|
77
|
-
path: e != null && e.addRoutePath ? e.addRoutePath : `${
|
|
77
|
+
path: e != null && e.addRoutePath ? e.addRoutePath : `${E.value}/add`
|
|
78
78
|
},
|
|
79
79
|
1
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
function
|
|
84
|
-
e != null && e.tableDetailFn ? e.tableDetailFn(a) :
|
|
82
|
+
i(fe, "onAdd");
|
|
83
|
+
function ue(t, a) {
|
|
84
|
+
e != null && e.tableDetailFn ? e.tableDetailFn(a) : A(
|
|
85
85
|
{
|
|
86
|
-
path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${
|
|
86
|
+
path: `${e != null && e.detailRoutePath ? e.detailRoutePath : `${E.value}/detail`}/${t}`
|
|
87
87
|
},
|
|
88
88
|
1
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
function
|
|
93
|
-
e != null && e.tableEditFn ? e.tableEditFn(a) :
|
|
91
|
+
i(ue, "onDetail");
|
|
92
|
+
function be(t, a) {
|
|
93
|
+
e != null && e.tableEditFn ? e.tableEditFn(a) : A(
|
|
94
94
|
{
|
|
95
|
-
path: `${e != null && e.editRoutePath ? e.editRoutePath : `${
|
|
95
|
+
path: `${e != null && e.editRoutePath ? e.editRoutePath : `${E.value}/edit`}/${t}`
|
|
96
96
|
},
|
|
97
97
|
1
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
function
|
|
103
|
-
if (e.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
i(be, "onEdit");
|
|
101
|
+
const B = g(void 0), T = g(!1);
|
|
102
|
+
function ce(t, a) {
|
|
103
|
+
if (B.value = t, e != null && e.tableDelFn)
|
|
104
|
+
e.tableDelFn(a, (o) => {
|
|
105
|
+
T.value = o;
|
|
106
|
+
});
|
|
107
|
+
else if (e.delApi) {
|
|
108
|
+
T.value = !0;
|
|
109
|
+
let o = t;
|
|
110
|
+
e != null && e.dealDelParams && (o = e.dealDelParams(a)), e.delApi(o).then(() => {
|
|
111
|
+
const m = we(a) || `${z(a)}成功`;
|
|
112
|
+
xe.success(m), w(), h("delSuccess", a, !0);
|
|
108
113
|
}).catch((m) => {
|
|
109
114
|
console.warn(m);
|
|
110
115
|
}).finally(() => {
|
|
111
|
-
|
|
116
|
+
T.value = !1;
|
|
112
117
|
});
|
|
113
118
|
}
|
|
114
119
|
}
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
function me(t, a,
|
|
118
|
-
|
|
119
|
-
const m = /* @__PURE__ */
|
|
120
|
+
i(ce, "onDel");
|
|
121
|
+
const X = g(), L = g(!1);
|
|
122
|
+
function me(t, a, o) {
|
|
123
|
+
X.value = t;
|
|
124
|
+
const m = /* @__PURE__ */ i((y, l) => {
|
|
120
125
|
if (e.switchApi) {
|
|
121
|
-
|
|
122
|
-
let
|
|
123
|
-
e != null && e.dealSwitchParams && (
|
|
124
|
-
|
|
126
|
+
L.value = !0;
|
|
127
|
+
let f = t;
|
|
128
|
+
e != null && e.dealSwitchParams && (f = e.dealSwitchParams(o)), e.switchApi(f).then(() => {
|
|
129
|
+
w(!1), y(!0), h("switchSuccess", o, a);
|
|
125
130
|
}).catch(() => {
|
|
126
131
|
l(new Error("Error"));
|
|
127
132
|
}).finally(() => {
|
|
128
|
-
|
|
133
|
+
L.value = !1;
|
|
129
134
|
});
|
|
130
135
|
} else
|
|
131
136
|
l(new Error("Error"));
|
|
132
137
|
}, "onSwitch");
|
|
133
|
-
return new Promise((
|
|
134
|
-
a ?
|
|
138
|
+
return new Promise((y, l) => {
|
|
139
|
+
a ? Oe.confirm(`<strong class="text-14px">${e.tableSwitchPopTxt || "请问是否关闭?"}</strong>`, {
|
|
135
140
|
confirmButtonText: "确定",
|
|
136
141
|
cancelButtonText: "取消",
|
|
137
142
|
dangerouslyUseHTMLString: !0,
|
|
138
143
|
customStyle: {
|
|
139
144
|
width: "240px"
|
|
140
|
-
}
|
|
145
|
+
},
|
|
146
|
+
...e.tableSwitchPopAttrs
|
|
141
147
|
}).then(() => {
|
|
142
|
-
m(
|
|
148
|
+
m(y, l);
|
|
143
149
|
}).catch(() => {
|
|
144
150
|
l(new Error("Error"));
|
|
145
|
-
}) : m(
|
|
151
|
+
}) : m(y, l);
|
|
146
152
|
});
|
|
147
153
|
}
|
|
148
|
-
|
|
149
|
-
function
|
|
154
|
+
i(me, "switchBeforeChange");
|
|
155
|
+
function he(t) {
|
|
150
156
|
let a = !1;
|
|
151
157
|
return e != null && e.disabledTableSwitch && (typeof e.disabledTableSwitch == "boolean" ? a = e.disabledTableSwitch : typeof e.disabledTableSwitch == "function" && (a = e.disabledTableSwitch(t))), !!a;
|
|
152
158
|
}
|
|
153
|
-
|
|
154
|
-
function
|
|
159
|
+
i(he, "disabledTableSwitch");
|
|
160
|
+
function Te(t) {
|
|
155
161
|
if (e != null && e.tableDetailText) {
|
|
156
162
|
if (typeof e.tableDetailText == "string")
|
|
157
163
|
return e.tableDetailText;
|
|
@@ -160,18 +166,18 @@ const qe = {
|
|
|
160
166
|
}
|
|
161
167
|
return "查看";
|
|
162
168
|
}
|
|
163
|
-
|
|
164
|
-
function
|
|
169
|
+
i(Te, "getTableDetailText");
|
|
170
|
+
function ye(t) {
|
|
165
171
|
let a = !1;
|
|
166
172
|
return e != null && e.showTableDetail && (typeof e.showTableDetail == "boolean" ? a = e.showTableDetail : typeof e.showTableDetail == "function" && (a = e.showTableDetail(t))), !!a;
|
|
167
173
|
}
|
|
168
|
-
|
|
169
|
-
function
|
|
174
|
+
i(ye, "showTableDetail");
|
|
175
|
+
function ge(t) {
|
|
170
176
|
let a = !1;
|
|
171
177
|
return e != null && e.disabledTableDetail && (typeof e.disabledTableDetail == "boolean" ? a = e.disabledTableDetail : typeof e.disabledTableDetail == "function" && (a = e.disabledTableDetail(t))), !!a;
|
|
172
178
|
}
|
|
173
|
-
|
|
174
|
-
function
|
|
179
|
+
i(ge, "disabledTableDetail");
|
|
180
|
+
function pe(t) {
|
|
175
181
|
if (e != null && e.tableEditText) {
|
|
176
182
|
if (typeof e.tableEditText == "string")
|
|
177
183
|
return e.tableEditText;
|
|
@@ -180,18 +186,18 @@ const qe = {
|
|
|
180
186
|
}
|
|
181
187
|
return "编辑";
|
|
182
188
|
}
|
|
183
|
-
|
|
184
|
-
function
|
|
189
|
+
i(pe, "getTableEditText");
|
|
190
|
+
function De(t) {
|
|
185
191
|
let a = !1;
|
|
186
192
|
return e != null && e.showTableEdit && (typeof e.showTableEdit == "boolean" ? a = e.showTableEdit : typeof e.showTableEdit == "function" && (a = e.showTableEdit(t))), !!a;
|
|
187
193
|
}
|
|
188
|
-
|
|
189
|
-
function
|
|
194
|
+
i(De, "showTableEdit");
|
|
195
|
+
function Se(t) {
|
|
190
196
|
let a = !1;
|
|
191
197
|
return e != null && e.disabledTableEdit && (typeof e.disabledTableEdit == "boolean" ? a = e.disabledTableEdit : typeof e.disabledTableEdit == "function" && (a = e.disabledTableEdit(t))), !!a;
|
|
192
198
|
}
|
|
193
|
-
|
|
194
|
-
function
|
|
199
|
+
i(Se, "disabledTableEdit");
|
|
200
|
+
function z(t) {
|
|
195
201
|
if (e != null && e.tableDelText) {
|
|
196
202
|
if (typeof e.tableDelText == "string")
|
|
197
203
|
return e.tableDelText;
|
|
@@ -200,47 +206,69 @@ const qe = {
|
|
|
200
206
|
}
|
|
201
207
|
return "删除";
|
|
202
208
|
}
|
|
203
|
-
|
|
209
|
+
i(z, "getTableDelText");
|
|
204
210
|
function we(t) {
|
|
211
|
+
if (e != null && e.delMessage) {
|
|
212
|
+
if (typeof e.delMessage == "string")
|
|
213
|
+
return e.delMessage;
|
|
214
|
+
if (typeof e.delMessage == "function")
|
|
215
|
+
return e.delMessage(t);
|
|
216
|
+
}
|
|
217
|
+
return "";
|
|
218
|
+
}
|
|
219
|
+
i(we, "getTableDelMessage");
|
|
220
|
+
function Ee(t) {
|
|
205
221
|
let a = !1;
|
|
206
222
|
return e != null && e.showTableDel && (typeof e.showTableDel == "boolean" ? a = e.showTableDel : typeof e.showTableDel == "function" && (a = e.showTableDel(t))), !!a;
|
|
207
223
|
}
|
|
208
|
-
|
|
209
|
-
function
|
|
224
|
+
i(Ee, "showTableDel");
|
|
225
|
+
function ve(t) {
|
|
210
226
|
let a = !1;
|
|
211
227
|
return e != null && e.disabledTableDel && (typeof e.disabledTableDel == "boolean" ? a = e.disabledTableDel : typeof e.disabledTableDel == "function" && (a = e.disabledTableDel(t))), !!a;
|
|
212
228
|
}
|
|
213
|
-
|
|
214
|
-
function
|
|
229
|
+
i(ve, "disabledTableDel");
|
|
230
|
+
function ke(t) {
|
|
215
231
|
if (e != null && e.popconfirmTxt) {
|
|
216
232
|
if (typeof e.popconfirmTxt == "string")
|
|
217
233
|
return e.popconfirmTxt;
|
|
218
234
|
if (typeof e.popconfirmTxt == "function")
|
|
219
235
|
return e.popconfirmTxt(t);
|
|
220
236
|
}
|
|
221
|
-
return `是否${
|
|
237
|
+
return `是否${z(t)}当前行数据?`;
|
|
238
|
+
}
|
|
239
|
+
i(ke, "getPopconfirmTxt");
|
|
240
|
+
function M(t, a) {
|
|
241
|
+
const o = e[t];
|
|
242
|
+
if (o) {
|
|
243
|
+
if (typeof o == "string")
|
|
244
|
+
return o;
|
|
245
|
+
if (typeof o == "function")
|
|
246
|
+
return o(a);
|
|
247
|
+
}
|
|
248
|
+
return "";
|
|
222
249
|
}
|
|
223
|
-
|
|
224
|
-
const
|
|
250
|
+
i(M, "getTableBtnType");
|
|
251
|
+
const Pe = $e(le, { direction: "vertical" }), Ce = v(() => e.showSkeleton ? !j.value : !0);
|
|
225
252
|
return $({
|
|
226
|
-
loadData:
|
|
227
|
-
handleReset:
|
|
228
|
-
setCurrentPage:
|
|
229
|
-
setPageSize:
|
|
230
|
-
isFirst:
|
|
231
|
-
loading:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
253
|
+
loadData: w,
|
|
254
|
+
handleReset: N,
|
|
255
|
+
setCurrentPage: Q,
|
|
256
|
+
setPageSize: se,
|
|
257
|
+
isFirst: j,
|
|
258
|
+
loading: p,
|
|
259
|
+
routePath: E,
|
|
260
|
+
currentPage: S,
|
|
261
|
+
pageSize: D,
|
|
262
|
+
total: J,
|
|
263
|
+
FormRef: U,
|
|
264
|
+
TableRef: q
|
|
237
265
|
}), (t, a) => {
|
|
238
|
-
const
|
|
239
|
-
return
|
|
240
|
-
t.showForm ? (
|
|
266
|
+
const o = Ue, m = qe, y = We;
|
|
267
|
+
return n(Ce) ? (s(), x("div", je, [
|
|
268
|
+
t.showForm ? (s(), u(He, d({
|
|
241
269
|
key: 0,
|
|
242
270
|
ref_key: "FormRef",
|
|
243
|
-
ref:
|
|
271
|
+
ref: U,
|
|
244
272
|
class: ["mb-6px ls-form-cpo", t.formClass],
|
|
245
273
|
"label-position": "top",
|
|
246
274
|
"show-btn-loading": !1,
|
|
@@ -248,166 +276,166 @@ const qe = {
|
|
|
248
276
|
inline: !0,
|
|
249
277
|
"form-data": t.formData,
|
|
250
278
|
"form-items": t.formItems,
|
|
251
|
-
loading:
|
|
279
|
+
loading: n(p),
|
|
252
280
|
"confirm-text": "查询"
|
|
253
281
|
}, t.formAttrs, {
|
|
254
|
-
onSubmit:
|
|
255
|
-
onReset:
|
|
256
|
-
}),
|
|
257
|
-
default:
|
|
258
|
-
|
|
282
|
+
onSubmit: re,
|
|
283
|
+
onReset: de
|
|
284
|
+
}), Y({
|
|
285
|
+
default: r((l) => [
|
|
286
|
+
c(t.$slots, "form-append", K(H(l)), void 0, !0)
|
|
259
287
|
]),
|
|
260
288
|
_: 2
|
|
261
289
|
}, [
|
|
262
|
-
|
|
263
|
-
name:
|
|
264
|
-
fn:
|
|
265
|
-
|
|
290
|
+
Z(n(ne), (l) => ({
|
|
291
|
+
name: W(l, !0),
|
|
292
|
+
fn: r((f) => [
|
|
293
|
+
c(t.$slots, l, K(H(f)), void 0, !0)
|
|
266
294
|
])
|
|
267
295
|
}))
|
|
268
|
-
]), 1040, ["class", "form-data", "form-items", "loading"])) :
|
|
269
|
-
t.showOperate ? (
|
|
270
|
-
t.$slots.operate ?
|
|
271
|
-
t.showOperateDivider ? (
|
|
296
|
+
]), 1040, ["class", "form-data", "form-items", "loading"])) : b("", !0),
|
|
297
|
+
t.showOperate ? (s(), x(_, { key: 1 }, [
|
|
298
|
+
t.$slots.operate ? c(t.$slots, "operate", { key: 0 }, void 0, !0) : (s(), x(_, { key: 1 }, [
|
|
299
|
+
t.showOperateDivider ? (s(), u(n(le), {
|
|
272
300
|
key: 0,
|
|
273
301
|
"border-style": "dashed"
|
|
274
|
-
})) :
|
|
275
|
-
|
|
276
|
-
class:
|
|
302
|
+
})) : b("", !0),
|
|
303
|
+
ee("div", {
|
|
304
|
+
class: Ae(["mt-24px flex items-center justify-start", t.operateClass])
|
|
277
305
|
}, [
|
|
278
|
-
|
|
279
|
-
t.showAdd ? (
|
|
306
|
+
c(t.$slots, "operate-prepend", {}, void 0, !0),
|
|
307
|
+
t.showAdd ? (s(), u(n(F), d({
|
|
280
308
|
key: 0,
|
|
281
309
|
type: "primary",
|
|
282
|
-
disabled:
|
|
283
|
-
}, t.addBtnAttrs, { onClick:
|
|
284
|
-
default:
|
|
285
|
-
|
|
310
|
+
disabled: n(p) || t.disabledAddBtn
|
|
311
|
+
}, t.addBtnAttrs, { onClick: fe }), {
|
|
312
|
+
default: r(() => [
|
|
313
|
+
P(C(t.addBtnText), 1)
|
|
286
314
|
]),
|
|
287
315
|
_: 1
|
|
288
|
-
}, 16, ["disabled"])) :
|
|
289
|
-
|
|
316
|
+
}, 16, ["disabled"])) : b("", !0),
|
|
317
|
+
c(t.$slots, "operate-append", {}, void 0, !0)
|
|
290
318
|
], 2)
|
|
291
319
|
], 64))
|
|
292
|
-
], 64)) :
|
|
293
|
-
|
|
320
|
+
], 64)) : b("", !0),
|
|
321
|
+
k(Ie, d({
|
|
294
322
|
ref_key: "TableRef",
|
|
295
|
-
ref:
|
|
323
|
+
ref: q,
|
|
296
324
|
class: ["ls-table-cpo", [t.showOperate ? "mt-16px" : "mt-24px"]],
|
|
297
325
|
"show-overflow-tooltip": !0,
|
|
298
|
-
loading:
|
|
299
|
-
total:
|
|
300
|
-
"table-data":
|
|
326
|
+
loading: n(p),
|
|
327
|
+
total: n(J),
|
|
328
|
+
"table-data": n(G),
|
|
301
329
|
"table-column": t.tableColumn,
|
|
302
|
-
"current-page":
|
|
303
|
-
"onUpdate:currentPage": a[0] || (a[0] = (l) =>
|
|
304
|
-
"page-size":
|
|
305
|
-
"onUpdate:pageSize": a[1] || (a[1] = (l) =>
|
|
306
|
-
}, t.tableAttrs,
|
|
307
|
-
default:
|
|
308
|
-
t.showTableSwitch ? (
|
|
330
|
+
"current-page": n(S),
|
|
331
|
+
"onUpdate:currentPage": a[0] || (a[0] = (l) => te(S) ? S.value = l : null),
|
|
332
|
+
"page-size": n(D),
|
|
333
|
+
"onUpdate:pageSize": a[1] || (a[1] = (l) => te(D) ? D.value = l : null)
|
|
334
|
+
}, t.tableAttrs, Be(t.tableListeners || {})), Y({
|
|
335
|
+
default: r(() => [
|
|
336
|
+
t.showTableSwitch ? (s(), u(o, d({
|
|
309
337
|
key: 0,
|
|
310
338
|
prop: t.switchProp,
|
|
311
339
|
label: "是否开启",
|
|
312
340
|
width: "100"
|
|
313
341
|
}, t.tableSwitchColumn), {
|
|
314
|
-
default:
|
|
315
|
-
|
|
342
|
+
default: r(({ row: l }) => [
|
|
343
|
+
k(n(ze), d({
|
|
316
344
|
class: "ls-list-table__switch",
|
|
317
345
|
"model-value": l[t.switchProp] ? 1 : 0,
|
|
318
346
|
"active-value": 1,
|
|
319
347
|
"inactive-value": 0,
|
|
320
|
-
loading:
|
|
321
|
-
"before-change": /* @__PURE__ */
|
|
322
|
-
disabled:
|
|
323
|
-
}, null,
|
|
348
|
+
loading: n(L) && l[t.tableRowKey] === n(X),
|
|
349
|
+
"before-change": /* @__PURE__ */ i(() => me(l[t.tableRowKey], l[t.switchProp], l), "before-change"),
|
|
350
|
+
disabled: he(l)
|
|
351
|
+
}, t.tableSwitchAttrs), null, 16, ["model-value", "loading", "before-change", "disabled"])
|
|
324
352
|
]),
|
|
325
353
|
_: 1
|
|
326
|
-
}, 16, ["prop"])) :
|
|
327
|
-
t.showTableOperate ? (
|
|
354
|
+
}, 16, ["prop"])) : b("", !0),
|
|
355
|
+
t.showTableOperate ? (s(), u(o, d({
|
|
328
356
|
key: 1,
|
|
329
357
|
fixed: "right",
|
|
330
358
|
prop: "operate",
|
|
331
359
|
label: "操作",
|
|
332
360
|
"show-overflow-tooltip": !1
|
|
333
361
|
}, t.tableOperateColumn), {
|
|
334
|
-
default:
|
|
335
|
-
|
|
336
|
-
|
|
362
|
+
default: r(({ row: l }) => [
|
|
363
|
+
ee("div", Ge, [
|
|
364
|
+
k(n(Me), {
|
|
337
365
|
size: 0,
|
|
338
|
-
spacer:
|
|
366
|
+
spacer: n(Pe)
|
|
339
367
|
}, {
|
|
340
|
-
default:
|
|
341
|
-
|
|
342
|
-
|
|
368
|
+
default: r(() => [
|
|
369
|
+
c(t.$slots, "table-operate-prepend", { row: l }, void 0, !0),
|
|
370
|
+
ye(l) ? (s(), u(n(F), d({
|
|
343
371
|
key: 0,
|
|
344
|
-
disabled:
|
|
372
|
+
disabled: ge(l),
|
|
345
373
|
link: "",
|
|
346
|
-
type: "primary",
|
|
347
|
-
onClick: /* @__PURE__ */
|
|
348
|
-
}, {
|
|
349
|
-
default:
|
|
350
|
-
|
|
374
|
+
type: M("tableDetailType", l) || "primary",
|
|
375
|
+
onClick: /* @__PURE__ */ i((f) => ue(l[t.tableRowKey], l), "onClick")
|
|
376
|
+
}, t.tableDetailBtnAttrs), {
|
|
377
|
+
default: r(() => [
|
|
378
|
+
P(C(l.tableDetailText || Te(l)), 1)
|
|
351
379
|
]),
|
|
352
380
|
_: 2
|
|
353
|
-
},
|
|
354
|
-
|
|
381
|
+
}, 1040, ["disabled", "type", "onClick"])) : b("", !0),
|
|
382
|
+
De(l) ? (s(), u(n(F), d({
|
|
355
383
|
key: 1,
|
|
356
|
-
disabled:
|
|
384
|
+
disabled: Se(l),
|
|
357
385
|
link: "",
|
|
358
|
-
type: "primary",
|
|
359
|
-
onClick: /* @__PURE__ */
|
|
360
|
-
}, {
|
|
361
|
-
default:
|
|
362
|
-
|
|
386
|
+
type: M("tableEditType", l) || "primary",
|
|
387
|
+
onClick: /* @__PURE__ */ i((f) => be(l[t.tableRowKey], l), "onClick")
|
|
388
|
+
}, t.tableEditBtnAttrs), {
|
|
389
|
+
default: r(() => [
|
|
390
|
+
P(C(l.tableEditText || pe(l)), 1)
|
|
363
391
|
]),
|
|
364
392
|
_: 2
|
|
365
|
-
},
|
|
366
|
-
|
|
393
|
+
}, 1040, ["disabled", "type", "onClick"])) : b("", !0),
|
|
394
|
+
Ee(l) ? (s(), u(m, d({
|
|
367
395
|
key: 2,
|
|
368
396
|
"hide-icon": "",
|
|
369
397
|
placement: "top",
|
|
370
398
|
width: "180",
|
|
371
399
|
"confirm-button-text": "确认",
|
|
372
400
|
"cancel-button-text": "取消",
|
|
373
|
-
title: l.popconfirmTxt ||
|
|
374
|
-
onConfirm: /* @__PURE__ */
|
|
375
|
-
}, {
|
|
376
|
-
reference:
|
|
377
|
-
|
|
401
|
+
title: l.popconfirmTxt || ke(l),
|
|
402
|
+
onConfirm: /* @__PURE__ */ i((f) => ce(l[t.tableRowKey], l), "onConfirm")
|
|
403
|
+
}, t.tableDelPopAttrs), {
|
|
404
|
+
reference: r(() => [
|
|
405
|
+
k(n(F), d({
|
|
378
406
|
link: "",
|
|
379
|
-
type: "danger",
|
|
380
|
-
disabled:
|
|
381
|
-
loading:
|
|
382
|
-
}, {
|
|
383
|
-
default:
|
|
384
|
-
|
|
407
|
+
type: M("tableDelType", l) || "danger",
|
|
408
|
+
disabled: n(T) || ve(l),
|
|
409
|
+
loading: n(T) && n(B) === l[t.tableRowKey]
|
|
410
|
+
}, t.tableDelBtnAttrs), {
|
|
411
|
+
default: r(() => [
|
|
412
|
+
P(C(n(T) && n(B) === l[t.tableRowKey] ? "" : l.tableDelText || z(l)), 1)
|
|
385
413
|
]),
|
|
386
414
|
_: 2
|
|
387
|
-
},
|
|
415
|
+
}, 1040, ["type", "disabled", "loading"])
|
|
388
416
|
]),
|
|
389
417
|
_: 2
|
|
390
|
-
},
|
|
391
|
-
|
|
418
|
+
}, 1040, ["title", "onConfirm"])) : b("", !0),
|
|
419
|
+
c(t.$slots, "table-operate-append", { row: l }, void 0, !0)
|
|
392
420
|
]),
|
|
393
421
|
_: 2
|
|
394
422
|
}, 1032, ["spacer"])
|
|
395
423
|
])
|
|
396
424
|
]),
|
|
397
425
|
_: 3
|
|
398
|
-
}, 16)) :
|
|
399
|
-
|
|
426
|
+
}, 16)) : b("", !0),
|
|
427
|
+
c(t.$slots, "table-append", { tableData: n(G) }, void 0, !0)
|
|
400
428
|
]),
|
|
401
429
|
_: 2
|
|
402
430
|
}, [
|
|
403
|
-
|
|
404
|
-
name:
|
|
405
|
-
fn:
|
|
406
|
-
|
|
431
|
+
Z(n(oe), (l) => ({
|
|
432
|
+
name: W(l, !1),
|
|
433
|
+
fn: r((f) => [
|
|
434
|
+
c(t.$slots, l, K(H(f)), void 0, !0)
|
|
407
435
|
])
|
|
408
436
|
}))
|
|
409
437
|
]), 1040, ["class", "loading", "total", "table-data", "table-column", "current-page", "page-size"])
|
|
410
|
-
])) : (
|
|
438
|
+
])) : (s(), u(y, d({
|
|
411
439
|
key: 1,
|
|
412
440
|
rows: 5,
|
|
413
441
|
animated: ""
|
|
@@ -416,5 +444,5 @@ const qe = {
|
|
|
416
444
|
}
|
|
417
445
|
});
|
|
418
446
|
export {
|
|
419
|
-
|
|
447
|
+
ht as default
|
|
420
448
|
};
|