@es-plus/vue2 1.0.4 → 1.1.0
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 +9 -4
- package/dist/components/es-crud-page/es-crud-page.vue.d.ts +107 -2
- package/dist/components/es-crud-page/es-crud-page.vue.d.ts.map +1 -1
- package/dist/components/es-dialog/component.vue.d.ts +361 -2
- package/dist/components/es-dialog/component.vue.d.ts.map +1 -1
- package/dist/components/es-dialog/render-jsx.vue.d.ts +91 -2
- package/dist/components/es-dialog/render-jsx.vue.d.ts.map +1 -1
- package/dist/components/es-form/es-form.vue.d.ts +297 -2
- package/dist/components/es-form/es-form.vue.d.ts.map +1 -1
- package/dist/components/es-table/column-item.vue.d.ts +35 -2
- package/dist/components/es-table/column-item.vue.d.ts.map +1 -1
- package/dist/components/es-table/component.vue.d.ts +499 -2
- package/dist/components/es-table/component.vue.d.ts.map +1 -1
- package/dist/components/es-table/table-btns.vue.d.ts +87 -2
- package/dist/components/es-table/table-btns.vue.d.ts.map +1 -1
- package/dist/es-plus-vue2.js +741 -721
- package/dist/es-plus-vue2.js.map +1 -1
- package/dist/es-plus-vue2.umd.cjs +1 -1
- package/dist/es-plus-vue2.umd.cjs.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/vue-compat.d.ts +46 -12
- package/dist/vue-compat.d.ts.map +1 -1
- package/package.json +82 -82
- package/CHANGELOG.md +0 -46
package/dist/es-plus-vue2.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { getNestedValue as
|
|
2
|
-
import { configureEsPlus as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { getNestedValue as G, setNestedValue as K, resolveFormLayProps as Ae, getRowColsAlgorithm as Ct, configFormField as St, formatConfigOut as Bt, getEveryFormQueryField as kt, queryTableListMethod as xt, getGlobalConfig as me, getButtonPosition as nt, createSelectionState as Ft, restoreSelectionForPage as It, clearAllSelection as Rt, applySelectionChange as Ot, isObject as pe, findValueByKey as wt, configureEsPlus as Pt } from "@es-plus/core";
|
|
2
|
+
import { configureEsPlus as Mn } from "@es-plus/core";
|
|
3
|
+
import * as $t from "vue";
|
|
4
|
+
import ct from "vue";
|
|
5
|
+
import * as Ve from "@vue/composition-api";
|
|
6
|
+
import { MessageBox as ot } from "element-ui";
|
|
7
|
+
const Ht = ct.version || "", [Tt = "0", At = "0"] = Ht.split("."), Lt = Number(Tt), zt = Number(At), ut = Lt === 2 && zt >= 7, te = ut ? $t : Ve, z = te.ref, ze = te.reactive, S = te.computed, de = te.watch, Ue = te.onMounted, jt = te.onBeforeUnmount, Et = te.onUpdated, ie = te.defineComponent, ce = te.inject, dt = te.provide, Fe = te.nextTick, Ke = te.getCurrentInstance, ue = te.h;
|
|
8
|
+
var it;
|
|
9
|
+
const st = (it = Ve.default) != null ? it : Ve;
|
|
10
|
+
function Be(n) {
|
|
7
11
|
if (Array.isArray(n)) return n;
|
|
8
12
|
if (typeof n == "function") {
|
|
9
13
|
const e = n();
|
|
@@ -11,19 +15,19 @@ function Se(n) {
|
|
|
11
15
|
}
|
|
12
16
|
return [];
|
|
13
17
|
}
|
|
14
|
-
function
|
|
18
|
+
function Y(n) {
|
|
15
19
|
const e = { ...n.attrs || {} };
|
|
16
20
|
return typeof e.disabled == "function" && (e.disabled = e.disabled()), e;
|
|
17
21
|
}
|
|
18
|
-
function
|
|
22
|
+
function oe(n, e) {
|
|
19
23
|
const o = n.on || {}, t = {};
|
|
20
24
|
for (const [i, l] of Object.entries(o))
|
|
21
25
|
typeof l == "function" && (t[i] = l);
|
|
22
26
|
return typeof t.input != "function" && (t.input = e), t;
|
|
23
27
|
}
|
|
24
|
-
function
|
|
28
|
+
function Dt() {
|
|
25
29
|
return { formInputComponents: (e) => {
|
|
26
|
-
var
|
|
30
|
+
var k;
|
|
27
31
|
const o = /* @__PURE__ */ new Map([
|
|
28
32
|
// ─────────────────────────────────────────────────────────────────
|
|
29
33
|
// Input - 文本输入
|
|
@@ -31,7 +35,7 @@ function It() {
|
|
|
31
35
|
[
|
|
32
36
|
"Input",
|
|
33
37
|
(d, g, { row: a }) => {
|
|
34
|
-
const f =
|
|
38
|
+
const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
|
|
35
39
|
return d("el-input", {
|
|
36
40
|
attrs: f,
|
|
37
41
|
props: { value: p, ...a.props },
|
|
@@ -45,7 +49,7 @@ function It() {
|
|
|
45
49
|
[
|
|
46
50
|
"InputNumber",
|
|
47
51
|
(d, g, { row: a }) => {
|
|
48
|
-
const f =
|
|
52
|
+
const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
|
|
49
53
|
return d("el-input-number", {
|
|
50
54
|
attrs: f,
|
|
51
55
|
props: { value: p, ...a.props },
|
|
@@ -59,7 +63,7 @@ function It() {
|
|
|
59
63
|
[
|
|
60
64
|
"Select",
|
|
61
65
|
(d, g, { row: a }) => {
|
|
62
|
-
const f =
|
|
66
|
+
const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
|
|
63
67
|
return d(
|
|
64
68
|
"el-select",
|
|
65
69
|
{
|
|
@@ -68,8 +72,8 @@ function It() {
|
|
|
68
72
|
on: y
|
|
69
73
|
},
|
|
70
74
|
b.map(
|
|
71
|
-
(_,
|
|
72
|
-
key:
|
|
75
|
+
(_, L) => d("el-option", {
|
|
76
|
+
key: L,
|
|
73
77
|
props: { value: _.value, label: _.label, disabled: _.disabled }
|
|
74
78
|
})
|
|
75
79
|
)
|
|
@@ -83,7 +87,7 @@ function It() {
|
|
|
83
87
|
[
|
|
84
88
|
"datePicker",
|
|
85
89
|
(d, g, { row: a }) => {
|
|
86
|
-
const f =
|
|
90
|
+
const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
|
|
87
91
|
return d("el-date-picker", {
|
|
88
92
|
attrs: f,
|
|
89
93
|
props: { value: p, ...a.props },
|
|
@@ -97,7 +101,7 @@ function It() {
|
|
|
97
101
|
[
|
|
98
102
|
"timePicker",
|
|
99
103
|
(d, g, { row: a }) => {
|
|
100
|
-
const f =
|
|
104
|
+
const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
|
|
101
105
|
return d("el-time-picker", {
|
|
102
106
|
attrs: f,
|
|
103
107
|
props: { value: p, ...a.props },
|
|
@@ -111,7 +115,7 @@ function It() {
|
|
|
111
115
|
[
|
|
112
116
|
"Slider",
|
|
113
117
|
(d, g, { row: a }) => {
|
|
114
|
-
const f =
|
|
118
|
+
const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
|
|
115
119
|
return d("el-slider", {
|
|
116
120
|
attrs: f,
|
|
117
121
|
props: { value: p, ...a.props },
|
|
@@ -127,10 +131,10 @@ function It() {
|
|
|
127
131
|
[
|
|
128
132
|
"ColorPicker",
|
|
129
133
|
(d, g, { row: a }) => {
|
|
130
|
-
const f =
|
|
131
|
-
for (const [_,
|
|
132
|
-
typeof
|
|
133
|
-
return typeof y.change != "function" && (y.change = (_) =>
|
|
134
|
+
const f = Y(a), p = G(g, a.prop), b = a.on || {}, y = {};
|
|
135
|
+
for (const [_, L] of Object.entries(b))
|
|
136
|
+
typeof L == "function" && (y[_] = L);
|
|
137
|
+
return typeof y.change != "function" && (y.change = (_) => K(g, a.prop, _)), d("el-color-picker", {
|
|
134
138
|
attrs: f,
|
|
135
139
|
props: { value: p, ...a.props },
|
|
136
140
|
on: y
|
|
@@ -144,7 +148,7 @@ function It() {
|
|
|
144
148
|
[
|
|
145
149
|
"Transfer",
|
|
146
150
|
(d, g, { row: a }) => {
|
|
147
|
-
const f =
|
|
151
|
+
const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
|
|
148
152
|
return d("el-transfer", {
|
|
149
153
|
attrs: f,
|
|
150
154
|
props: {
|
|
@@ -162,7 +166,7 @@ function It() {
|
|
|
162
166
|
[
|
|
163
167
|
"Cascader",
|
|
164
168
|
(d, g, { row: a }) => {
|
|
165
|
-
const f =
|
|
169
|
+
const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
|
|
166
170
|
return d("el-cascader", {
|
|
167
171
|
// key 强制 dataOptions 变化时重渲染,Element UI 内部 cache 否则不刷新
|
|
168
172
|
key: JSON.stringify(b),
|
|
@@ -182,7 +186,7 @@ function It() {
|
|
|
182
186
|
[
|
|
183
187
|
"Radio",
|
|
184
188
|
(d, g, { row: a }) => {
|
|
185
|
-
const f =
|
|
189
|
+
const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
|
|
186
190
|
return d(
|
|
187
191
|
"el-radio-group",
|
|
188
192
|
{
|
|
@@ -191,10 +195,10 @@ function It() {
|
|
|
191
195
|
on: y
|
|
192
196
|
},
|
|
193
197
|
b.map(
|
|
194
|
-
(_,
|
|
198
|
+
(_, L) => d(
|
|
195
199
|
"el-radio",
|
|
196
200
|
{
|
|
197
|
-
key:
|
|
201
|
+
key: L,
|
|
198
202
|
// Element UI 中 el-radio 使用 :label 作为值
|
|
199
203
|
props: { label: _.value, disabled: _.disabled || f.disabled }
|
|
200
204
|
},
|
|
@@ -210,7 +214,7 @@ function It() {
|
|
|
210
214
|
[
|
|
211
215
|
"Checkbox",
|
|
212
216
|
(d, g, { row: a }) => {
|
|
213
|
-
const f =
|
|
217
|
+
const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
|
|
214
218
|
return d(
|
|
215
219
|
"el-checkbox-group",
|
|
216
220
|
{
|
|
@@ -219,10 +223,10 @@ function It() {
|
|
|
219
223
|
on: y
|
|
220
224
|
},
|
|
221
225
|
b.map(
|
|
222
|
-
(_,
|
|
226
|
+
(_, L) => d(
|
|
223
227
|
"el-checkbox",
|
|
224
228
|
{
|
|
225
|
-
key:
|
|
229
|
+
key: L,
|
|
226
230
|
props: { label: _.value, disabled: _.disabled || f.disabled }
|
|
227
231
|
},
|
|
228
232
|
[_.label]
|
|
@@ -237,7 +241,7 @@ function It() {
|
|
|
237
241
|
[
|
|
238
242
|
"Switch",
|
|
239
243
|
(d, g, { row: a }) => {
|
|
240
|
-
const f =
|
|
244
|
+
const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
|
|
241
245
|
return d("el-switch", {
|
|
242
246
|
attrs: f,
|
|
243
247
|
props: { value: p, ...a.props },
|
|
@@ -251,7 +255,7 @@ function It() {
|
|
|
251
255
|
[
|
|
252
256
|
"Rate",
|
|
253
257
|
(d, g, { row: a }) => {
|
|
254
|
-
const f =
|
|
258
|
+
const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
|
|
255
259
|
return d("el-rate", {
|
|
256
260
|
attrs: f,
|
|
257
261
|
props: { value: p, ...a.props },
|
|
@@ -265,22 +269,22 @@ function It() {
|
|
|
265
269
|
[
|
|
266
270
|
"Upload",
|
|
267
271
|
(d, g, { row: a }) => {
|
|
268
|
-
const f = a.prop, p =
|
|
272
|
+
const f = a.prop, p = Y(a), b = a.props || {}, y = a.on || {}, _ = G(g, f) || [], L = typeof a.httpRequest == "function", j = a.triggerRender, N = a.fileRender, M = j ? j(d) : d("el-button", { props: { size: "mini", type: "primary" } }, ["选择文件"]), V = (r, u, h) => {
|
|
269
273
|
var A, x;
|
|
270
|
-
const w = (
|
|
271
|
-
w && (u.url = w), u.status = "success", u.response =
|
|
272
|
-
},
|
|
273
|
-
u.status = "fail", u.error =
|
|
274
|
-
},
|
|
274
|
+
const w = (r == null ? void 0 : r.link) || (r == null ? void 0 : r.url) || ((A = r == null ? void 0 : r.data) == null ? void 0 : A.link) || ((x = r == null ? void 0 : r.data) == null ? void 0 : x.url);
|
|
275
|
+
w && (u.url = w), u.status = "success", u.response = r, typeof y.success == "function" && y.success(r, u, h), K(g, f, [...h]);
|
|
276
|
+
}, W = (r, u, h) => {
|
|
277
|
+
u.status = "fail", u.error = r, typeof y.error == "function" && y.error(r, u, h), K(g, f, [...h]);
|
|
278
|
+
}, U = L ? (r) => {
|
|
275
279
|
const u = a.httpRequest;
|
|
276
280
|
u({
|
|
277
|
-
file:
|
|
278
|
-
filename:
|
|
279
|
-
onProgress:
|
|
281
|
+
file: r.file,
|
|
282
|
+
filename: r.file.name,
|
|
283
|
+
onProgress: r.onProgress
|
|
280
284
|
}).then((h) => {
|
|
281
285
|
const w = (h == null ? void 0 : h.data) || h;
|
|
282
|
-
|
|
283
|
-
}).catch((h) =>
|
|
286
|
+
r.onSuccess(w);
|
|
287
|
+
}).catch((h) => r.onError(h));
|
|
284
288
|
} : void 0, J = {
|
|
285
289
|
preview: "onPreview",
|
|
286
290
|
change: "onChange",
|
|
@@ -289,14 +293,14 @@ function It() {
|
|
|
289
293
|
progress: "onProgress",
|
|
290
294
|
remove: "onRemove",
|
|
291
295
|
exceed: "onExceed"
|
|
292
|
-
},
|
|
293
|
-
for (const [
|
|
294
|
-
if (typeof u != "function" ||
|
|
295
|
-
const h = J[
|
|
296
|
-
h && (
|
|
296
|
+
}, R = {};
|
|
297
|
+
for (const [r, u] of Object.entries(y)) {
|
|
298
|
+
if (typeof u != "function" || r === "success" || r === "error" || r === "remove") continue;
|
|
299
|
+
const h = J[r];
|
|
300
|
+
h && (R[h] = u);
|
|
297
301
|
}
|
|
298
|
-
return
|
|
299
|
-
typeof y.remove == "function" && y.remove(
|
|
302
|
+
return R.onSuccess = V, R.onError = W, R.onRemove = (r, u) => {
|
|
303
|
+
typeof y.remove == "function" && y.remove(r, u), K(g, f, [...u]);
|
|
300
304
|
}, d(
|
|
301
305
|
"el-upload",
|
|
302
306
|
{
|
|
@@ -309,17 +313,17 @@ function It() {
|
|
|
309
313
|
...b,
|
|
310
314
|
fileList: _,
|
|
311
315
|
// 自定义上传时禁用 auto-upload,由 httpRequest 接管
|
|
312
|
-
autoUpload:
|
|
313
|
-
httpRequest:
|
|
316
|
+
autoUpload: L ? !1 : b.autoUpload !== !1,
|
|
317
|
+
httpRequest: U,
|
|
314
318
|
// 把 row.on.* 转换为 onXxx prop(覆盖在 userProps 之上:
|
|
315
319
|
// 若用户已直接在 props 里给了 onPreview,这里仍以 row.on 为优先权来源)
|
|
316
|
-
...
|
|
320
|
+
...R
|
|
317
321
|
},
|
|
318
322
|
// Vue 2 的 scopedSlots 用于自定义文件项渲染
|
|
319
323
|
scopedSlots: N ? {
|
|
320
|
-
file: ({ file:
|
|
321
|
-
const u = _.filter((h) => h !==
|
|
322
|
-
|
|
324
|
+
file: ({ file: r }) => N(d, r, () => {
|
|
325
|
+
const u = _.filter((h) => h !== r);
|
|
326
|
+
K(g, f, u);
|
|
323
327
|
})
|
|
324
328
|
} : void 0
|
|
325
329
|
},
|
|
@@ -327,70 +331,70 @@ function It() {
|
|
|
327
331
|
);
|
|
328
332
|
}
|
|
329
333
|
]
|
|
330
|
-
]), t = (
|
|
334
|
+
]), t = (k = e.formtype) != null ? k : "";
|
|
331
335
|
if (!t) return () => null;
|
|
332
336
|
const i = o.get(t);
|
|
333
337
|
if (i) return i;
|
|
334
338
|
const l = t[0] ? t[0] === t[0].toLowerCase() ? t[0].toUpperCase() + t.slice(1) : t[0].toLowerCase() + t.slice(1) : t, c = o.get(l);
|
|
335
339
|
if (c) return c;
|
|
336
|
-
const
|
|
340
|
+
const B = t.toLowerCase();
|
|
337
341
|
for (const [d, g] of o)
|
|
338
|
-
if (d.toLowerCase() ===
|
|
342
|
+
if (d.toLowerCase() === B) return g;
|
|
339
343
|
return () => null;
|
|
340
344
|
} };
|
|
341
345
|
}
|
|
342
|
-
function
|
|
343
|
-
const e = z(!1), o =
|
|
346
|
+
function qt(n) {
|
|
347
|
+
const e = z(!1), o = S(() => {
|
|
344
348
|
var y;
|
|
345
|
-
const f =
|
|
349
|
+
const f = Ae(n.layoutFormProps);
|
|
346
350
|
if (!f || !Object.keys(f).length) return !1;
|
|
347
351
|
const p = f.isBtnHiden, b = f.isBtnHidden;
|
|
348
352
|
return !!((y = p != null ? p : b) != null && y);
|
|
349
|
-
}), t =
|
|
353
|
+
}), t = S(() => {
|
|
350
354
|
var p;
|
|
351
355
|
return {
|
|
352
356
|
type: "flex",
|
|
353
357
|
gutter: 20,
|
|
354
358
|
...((p = n.layoutFormProps) == null ? void 0 : p.rowLayProps) || {}
|
|
355
359
|
};
|
|
356
|
-
}), i =
|
|
360
|
+
}), i = S(() => Ae(n.layoutFormProps)), l = S(() => {
|
|
357
361
|
var f;
|
|
358
362
|
return (f = n.layoutFormProps) == null ? void 0 : f.setOptions;
|
|
359
|
-
}), c =
|
|
360
|
-
() =>
|
|
361
|
-
),
|
|
363
|
+
}), c = S(
|
|
364
|
+
() => Ct(n.formItemList || [])
|
|
365
|
+
), B = () => {
|
|
362
366
|
var y;
|
|
363
|
-
const f =
|
|
367
|
+
const f = Ae(n.layoutFormProps);
|
|
364
368
|
if (!f || !Object.keys(f).length) return 0;
|
|
365
369
|
const p = f.minfoldRows, b = f.minFoldRows;
|
|
366
370
|
return Number((y = p != null ? p : b) != null ? y : 0) || 0;
|
|
367
|
-
},
|
|
368
|
-
const f =
|
|
371
|
+
}, k = S(() => {
|
|
372
|
+
const f = B();
|
|
369
373
|
return f > 0 && f < c.value.rowNum;
|
|
370
|
-
}), d =
|
|
371
|
-
var
|
|
372
|
-
const { rowNum: f, columnRow: p } = c.value, b = p[f - 1] || [], y = Number((
|
|
374
|
+
}), d = S(() => {
|
|
375
|
+
var j;
|
|
376
|
+
const { rowNum: f, columnRow: p } = c.value, b = p[f - 1] || [], y = Number((j = Ae(n.layoutFormProps)) == null ? void 0 : j.btnColSpan) || 0, L = 24 - b.reduce(
|
|
373
377
|
(N, M) => {
|
|
374
378
|
var V;
|
|
375
379
|
return N + (((V = n.formItemList[M]) == null ? void 0 : V.span) || 24);
|
|
376
380
|
},
|
|
377
381
|
0
|
|
378
382
|
);
|
|
379
|
-
return !e.value && y <=
|
|
380
|
-
}), g =
|
|
383
|
+
return !e.value && y <= L ? L : 24;
|
|
384
|
+
}), g = S(() => {
|
|
381
385
|
var b, y;
|
|
382
|
-
const f =
|
|
386
|
+
const f = B(), { columnNodeIndex: p } = c.value;
|
|
383
387
|
if (e.value) {
|
|
384
388
|
const _ = (y = (b = p[f - 1]) != null ? b : p[p.length - 1]) != null ? y : 9999;
|
|
385
|
-
return (n.formItemList || []).map((
|
|
386
|
-
...
|
|
387
|
-
isFold:
|
|
389
|
+
return (n.formItemList || []).map((L, j) => ({
|
|
390
|
+
...L,
|
|
391
|
+
isFold: j > _
|
|
388
392
|
}));
|
|
389
393
|
}
|
|
390
394
|
return (n.formItemList || []).map((_) => ({ ..._, isFold: !1 }));
|
|
391
395
|
});
|
|
392
|
-
return
|
|
393
|
-
|
|
396
|
+
return de(
|
|
397
|
+
k,
|
|
394
398
|
(f) => {
|
|
395
399
|
e.value = f;
|
|
396
400
|
},
|
|
@@ -402,7 +406,7 @@ function Ot(n) {
|
|
|
402
406
|
formLayout: i,
|
|
403
407
|
getSetOptionsStatus: l,
|
|
404
408
|
getRowColsAlgorithm: c,
|
|
405
|
-
isFold:
|
|
409
|
+
isFold: k,
|
|
406
410
|
getBtnColSpan: d,
|
|
407
411
|
formItem: g,
|
|
408
412
|
changeFolded: () => {
|
|
@@ -410,15 +414,15 @@ function Ot(n) {
|
|
|
410
414
|
}
|
|
411
415
|
};
|
|
412
416
|
}
|
|
413
|
-
function
|
|
417
|
+
function Nt(n) {
|
|
414
418
|
return {
|
|
415
|
-
queryTableListMethod: (l, c = {}) =>
|
|
416
|
-
getEveryFormQueryField: (l, c) =>
|
|
417
|
-
formatConfigOut: (l, c,
|
|
418
|
-
configFormField: (l = {}, c) =>
|
|
419
|
+
queryTableListMethod: (l, c = {}) => xt(l, c, n),
|
|
420
|
+
getEveryFormQueryField: (l, c) => kt(l, n, c),
|
|
421
|
+
formatConfigOut: (l, c, B = {}, k) => Bt(l, c, B, k),
|
|
422
|
+
configFormField: (l = {}, c) => St(l, c)
|
|
419
423
|
};
|
|
420
424
|
}
|
|
421
|
-
const
|
|
425
|
+
const Mt = {
|
|
422
426
|
large: "medium",
|
|
423
427
|
default: "small",
|
|
424
428
|
small: "mini",
|
|
@@ -426,13 +430,13 @@ const wt = {
|
|
|
426
430
|
medium: "medium",
|
|
427
431
|
mini: "mini"
|
|
428
432
|
};
|
|
429
|
-
function
|
|
433
|
+
function je(n) {
|
|
430
434
|
if (n == null || n === "") return;
|
|
431
435
|
const e = String(n).trim();
|
|
432
436
|
if (e)
|
|
433
|
-
return
|
|
437
|
+
return Mt[e];
|
|
434
438
|
}
|
|
435
|
-
const
|
|
439
|
+
const Vt = ie({
|
|
436
440
|
name: "RenderDomForm",
|
|
437
441
|
functional: !0,
|
|
438
442
|
props: {
|
|
@@ -444,10 +448,10 @@ const Pt = ae({
|
|
|
444
448
|
render(n, e) {
|
|
445
449
|
const { row: o, index: t, model: i, render: l } = e.props;
|
|
446
450
|
if (typeof l != "function") return null;
|
|
447
|
-
const
|
|
448
|
-
return typeof
|
|
451
|
+
const B = l(n, i || {}, { row: o || {}, index: t });
|
|
452
|
+
return typeof B == "string" ? n("span", B) : B;
|
|
449
453
|
}
|
|
450
|
-
}),
|
|
454
|
+
}), Ut = ie({
|
|
451
455
|
name: "RenderBtn",
|
|
452
456
|
functional: !0,
|
|
453
457
|
props: {
|
|
@@ -462,9 +466,9 @@ const Pt = ae({
|
|
|
462
466
|
const c = l(i, t, o, n) || "";
|
|
463
467
|
return typeof c == "string" ? n("span", c) : c;
|
|
464
468
|
}
|
|
465
|
-
}),
|
|
469
|
+
}), Kt = ie({
|
|
466
470
|
name: "EsForm",
|
|
467
|
-
components: { RenderDomForm:
|
|
471
|
+
components: { RenderDomForm: Vt, RenderBtn: Ut },
|
|
468
472
|
props: {
|
|
469
473
|
/** 表单 model 数据 */
|
|
470
474
|
model: { type: Object, default: () => ({}) },
|
|
@@ -484,169 +488,169 @@ const Pt = ae({
|
|
|
484
488
|
fieldFieldOutput: { type: Function, default: void 0 }
|
|
485
489
|
},
|
|
486
490
|
setup(n, e) {
|
|
487
|
-
var
|
|
488
|
-
const o =
|
|
491
|
+
var Pe, $e, Ce, he, He;
|
|
492
|
+
const o = Ke(), t = () => {
|
|
489
493
|
const m = o == null ? void 0 : o.proxy;
|
|
490
494
|
return (m == null ? void 0 : m.$refs) || {};
|
|
491
|
-
}, i =
|
|
492
|
-
var
|
|
493
|
-
const m = o == null ? void 0 : o.proxy, v = (H = (
|
|
495
|
+
}, i = S(() => {
|
|
496
|
+
var T, H;
|
|
497
|
+
const m = o == null ? void 0 : o.proxy, v = (H = (T = m == null ? void 0 : m.$vnode) == null ? void 0 : T.data) == null ? void 0 : H.model;
|
|
494
498
|
return v && typeof v == "object" && typeof v.callback != "function" ? v : n.model;
|
|
495
|
-
}), l = (
|
|
499
|
+
}), l = ($e = (Pe = ce("$esPlusForm", null)) != null ? Pe : me().EsForm) != null ? $e : {}, c = (he = (Ce = ce("$EsPlus", null)) != null ? Ce : me()) != null ? he : {}, B = (m) => {
|
|
496
500
|
if (!m) return !0;
|
|
497
501
|
const v = c.permission;
|
|
498
502
|
return typeof v == "function" ? v(m) : !0;
|
|
499
|
-
},
|
|
503
|
+
}, k = (m) => m.labelKey && typeof c.t == "function" ? c.t(m.labelKey) : m.label, d = ce("getTableInstantce", null), g = S(() => {
|
|
500
504
|
if (d)
|
|
501
505
|
return typeof d == "function" ? d() : d;
|
|
502
506
|
const m = o == null ? void 0 : o.proxy, v = m == null ? void 0 : m.getTableInstantce;
|
|
503
507
|
return typeof v == "function" ? v() : v;
|
|
504
|
-
}), a =
|
|
508
|
+
}), a = S(() => {
|
|
505
509
|
const m = g.value;
|
|
506
510
|
return !!(m && Object.keys(m).length);
|
|
507
511
|
}), f = (m) => m ? m.startsWith("el-icon-") ? m : `el-icon-${m.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase()}` : void 0, p = (m) => {
|
|
508
|
-
const { icon: v, ...
|
|
509
|
-
if (
|
|
510
|
-
const H =
|
|
511
|
-
H !== void 0 && (
|
|
512
|
+
const { icon: v, ...T } = m;
|
|
513
|
+
if (T.size !== void 0) {
|
|
514
|
+
const H = je(T.size);
|
|
515
|
+
H !== void 0 && (T.size = H);
|
|
512
516
|
} else
|
|
513
|
-
|
|
514
|
-
return
|
|
517
|
+
T.size = "mini";
|
|
518
|
+
return T;
|
|
515
519
|
}, b = (m) => {
|
|
516
520
|
const v = m.disabled;
|
|
517
521
|
return typeof v == "function" ? !!v() : !!v;
|
|
518
|
-
}, y = z({}), _ = z(n.formItemList || []), { formInputComponents:
|
|
522
|
+
}, y = z({}), _ = z(n.formItemList || []), { formInputComponents: L } = Dt(), j = (l == null ? void 0 : l.$httpRequest) || void 0, N = n.fieldFieldOutput || (l == null ? void 0 : l.fieldFieldOutput), { getEveryFormQueryField: M } = Nt(j), V = z(
|
|
519
523
|
((He = n.layoutFormProps) == null ? void 0 : He.fromLayProps) || {}
|
|
520
|
-
),
|
|
524
|
+
), W = S(() => {
|
|
521
525
|
const v = {
|
|
522
526
|
size: "mini",
|
|
523
527
|
...V.value || {},
|
|
524
528
|
model: i.value,
|
|
525
529
|
rules: n.rules,
|
|
526
530
|
validateOnRuleChange: !1
|
|
527
|
-
},
|
|
528
|
-
return
|
|
529
|
-
}),
|
|
530
|
-
|
|
531
|
+
}, T = je(v.size);
|
|
532
|
+
return T !== void 0 && (v.size = T), (v.labelWidth === void 0 || v.labelWidth === "" || v.labelWidth === null) && (v.labelWidth = "auto"), v;
|
|
533
|
+
}), U = z(/* @__PURE__ */ new Set());
|
|
534
|
+
de(
|
|
531
535
|
() => n.formItemList,
|
|
532
536
|
async (m) => {
|
|
533
|
-
const v = Array.isArray(m) ? m : [],
|
|
534
|
-
(
|
|
537
|
+
const v = Array.isArray(m) ? m : [], T = v.filter(
|
|
538
|
+
(F) => F && F.isInitRun !== !1 && !U.value.has(F.prop)
|
|
535
539
|
);
|
|
536
|
-
if (!
|
|
537
|
-
_.value = v.map((
|
|
538
|
-
var
|
|
539
|
-
if (!
|
|
540
|
-
const $ = _.value.find((
|
|
541
|
-
return (
|
|
542
|
-
}).filter((
|
|
540
|
+
if (!T.length) {
|
|
541
|
+
_.value = v.map((F) => {
|
|
542
|
+
var D;
|
|
543
|
+
if (!F) return null;
|
|
544
|
+
const $ = _.value.find((X) => X && X.prop === F.prop);
|
|
545
|
+
return (D = $ == null ? void 0 : $.dataOptions) != null && D.length ? { ...F, dataOptions: $.dataOptions } : F;
|
|
546
|
+
}).filter((F) => !!F);
|
|
543
547
|
return;
|
|
544
548
|
}
|
|
545
|
-
const H = await M(
|
|
546
|
-
|
|
547
|
-
var
|
|
548
|
-
if (!
|
|
549
|
-
const $ = H.find((
|
|
549
|
+
const H = await M(T, N);
|
|
550
|
+
T.forEach((F) => U.value.add(F.prop)), _.value = v.map((F) => {
|
|
551
|
+
var X;
|
|
552
|
+
if (!F) return null;
|
|
553
|
+
const $ = H.find((ee) => ee && ee.prop === F.prop), D = _.value.find((ee) => ee && ee.prop === F.prop);
|
|
550
554
|
return $ ? {
|
|
551
|
-
...
|
|
555
|
+
...F,
|
|
552
556
|
dataOptions: $.listData
|
|
553
|
-
} : (
|
|
554
|
-
}).filter((
|
|
557
|
+
} : (X = D == null ? void 0 : D.dataOptions) != null && X.length ? { ...F, dataOptions: D.dataOptions } : F;
|
|
558
|
+
}).filter((F) => !!F);
|
|
555
559
|
},
|
|
556
560
|
{ immediate: !0, deep: !0 }
|
|
557
561
|
);
|
|
558
|
-
const J =
|
|
562
|
+
const J = S(() => {
|
|
559
563
|
const v = (_.value || []).map(($) => $ ? { ...$, dataOptions: $.dataOptions || [] } : null).filter(($) => {
|
|
560
564
|
if (!$) return !1;
|
|
561
|
-
const
|
|
562
|
-
return
|
|
565
|
+
const D = $.isHiden, X = $.isHidden, ee = typeof D == "function" ? D : typeof X == "function" ? X : null;
|
|
566
|
+
return ee ? !ee(i.value, $, W.value) : !0;
|
|
563
567
|
}), H = v.filter(($) => !$.span).length;
|
|
564
|
-
let
|
|
568
|
+
let F = 6;
|
|
565
569
|
if (H > 0) {
|
|
566
|
-
const $ = v.reduce((
|
|
567
|
-
$ === 0 ? H === 1 ?
|
|
570
|
+
const $ = v.reduce((X, ee) => X + (ee.span || 0), 0), D = 24 - ($ % 24 || ($ ? 24 : 0));
|
|
571
|
+
$ === 0 ? H === 1 ? F = 24 : H === 2 ? F = 12 : H === 3 ? F = 8 : F = 6 : (F = D >= H ? Math.floor(D / H) : 6, F > 12 && (F = 12), F < 4 && (F = 6));
|
|
568
572
|
}
|
|
569
|
-
return v.map(($) => ({ ...$, span: $.span ||
|
|
570
|
-
}),
|
|
573
|
+
return v.map(($) => ({ ...$, span: $.span || F }));
|
|
574
|
+
}), R = qt({
|
|
571
575
|
layoutFormProps: n.layoutFormProps,
|
|
572
576
|
get formItemList() {
|
|
573
577
|
return J.value;
|
|
574
578
|
}
|
|
575
579
|
}), {
|
|
576
|
-
folded:
|
|
580
|
+
folded: r,
|
|
577
581
|
isBtnHidden: u,
|
|
578
582
|
rowLayout: h,
|
|
579
583
|
formLayout: w,
|
|
580
584
|
getRowColsAlgorithm: A,
|
|
581
585
|
isFold: x,
|
|
582
|
-
getBtnColSpan:
|
|
586
|
+
getBtnColSpan: E,
|
|
583
587
|
formItem: Q,
|
|
584
|
-
changeFolded:
|
|
585
|
-
} =
|
|
586
|
-
|
|
588
|
+
changeFolded: q
|
|
589
|
+
} = R;
|
|
590
|
+
de(
|
|
587
591
|
w,
|
|
588
592
|
(m) => {
|
|
589
593
|
V.value = m;
|
|
590
594
|
},
|
|
591
595
|
{ immediate: !0 }
|
|
592
596
|
);
|
|
593
|
-
const
|
|
597
|
+
const se = S(() => ({
|
|
594
598
|
colRightBtn: n.configBtn.filter((m) => m.direction === "right" || !m.direction),
|
|
595
599
|
colLeftBtn: n.configBtn.filter((m) => m.direction === "left")
|
|
596
|
-
})),
|
|
597
|
-
var H,
|
|
598
|
-
const v = t().formRef,
|
|
599
|
-
(
|
|
600
|
-
},
|
|
601
|
-
var
|
|
600
|
+
})), re = S(() => typeof n.renderBtn == "function"), ne = (m) => {
|
|
601
|
+
var H, F;
|
|
602
|
+
const v = t().formRef, T = (H = g.value) == null ? void 0 : H.httpRequestInstance;
|
|
603
|
+
(F = m.click) == null || F.call(m, i.value, v, T);
|
|
604
|
+
}, _e = (m, v, T) => {
|
|
605
|
+
var F, $, D;
|
|
602
606
|
const H = g.value;
|
|
603
|
-
|
|
607
|
+
T === "query" ? a.value && ((F = H == null ? void 0 : H.httpRequestInstance) == null || F.call(H, m)) : T === "rest" && v && (a.value && (($ = H == null ? void 0 : H.httpRequestInstance) == null || $.call(H, m)), (D = v.resetFields) == null || D.call(v));
|
|
604
608
|
}, De = (m) => {
|
|
605
|
-
var
|
|
609
|
+
var T, H, F;
|
|
606
610
|
const v = t().formRef;
|
|
607
611
|
if (m.triggerEvent && ["query", "rest"].includes(m.key || ""))
|
|
608
|
-
|
|
612
|
+
_e(i.value, v, m.key);
|
|
609
613
|
else {
|
|
610
|
-
m.key === "rest" && v && ((
|
|
614
|
+
m.key === "rest" && v && ((T = v.resetFields) == null || T.call(v));
|
|
611
615
|
const $ = (H = g.value) == null ? void 0 : H.httpRequestInstance;
|
|
612
|
-
(
|
|
616
|
+
(F = m.click) == null || F.call(m, i.value, v, $);
|
|
613
617
|
}
|
|
614
|
-
},
|
|
618
|
+
}, qe = (m) => {
|
|
615
619
|
if (a.value) {
|
|
616
|
-
const { style: v, ...
|
|
617
|
-
return { style: { marginBottom: "10px", ...v || {} }, ...
|
|
620
|
+
const { style: v, ...T } = m;
|
|
621
|
+
return { style: { marginBottom: "10px", ...v || {} }, ...T };
|
|
618
622
|
}
|
|
619
623
|
return m;
|
|
620
|
-
},
|
|
621
|
-
const m =
|
|
624
|
+
}, fe = () => t().formRef, Ie = () => {
|
|
625
|
+
const m = fe();
|
|
622
626
|
return m ? new Promise((v) => {
|
|
623
627
|
try {
|
|
624
|
-
const
|
|
628
|
+
const T = m.validate((H) => {
|
|
625
629
|
v(!!H);
|
|
626
630
|
});
|
|
627
|
-
|
|
628
|
-
} catch (
|
|
631
|
+
T && typeof T.then == "function" && T.then(v).catch(() => v(!1));
|
|
632
|
+
} catch (T) {
|
|
629
633
|
v(!1);
|
|
630
634
|
}
|
|
631
635
|
}) : Promise.resolve(!1);
|
|
632
|
-
},
|
|
636
|
+
}, Re = () => {
|
|
633
637
|
var m;
|
|
634
|
-
return (m =
|
|
635
|
-
}, ge = (m) => {
|
|
636
|
-
var v;
|
|
637
|
-
return (v = de()) == null ? void 0 : v.clearValidate(m);
|
|
638
|
+
return (m = fe()) == null ? void 0 : m.resetFields();
|
|
638
639
|
}, Oe = (m) => {
|
|
639
640
|
var v;
|
|
640
|
-
return (v =
|
|
641
|
-
},
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
641
|
+
return (v = fe()) == null ? void 0 : v.clearValidate(m);
|
|
642
|
+
}, we = (m) => {
|
|
643
|
+
var v;
|
|
644
|
+
return (v = fe()) == null ? void 0 : v.validateField(m);
|
|
645
|
+
}, ye = async (m) => {
|
|
646
|
+
const T = J.value.filter((F) => F && m.includes(F.prop));
|
|
647
|
+
if (!T.length) return;
|
|
648
|
+
(await M(T, N)).forEach((F) => {
|
|
649
|
+
if (!F) return;
|
|
650
|
+
const $ = _.value.findIndex((D) => D && D.prop === F.prop);
|
|
647
651
|
$ !== -1 && (_.value[$] = {
|
|
648
652
|
..._.value[$],
|
|
649
|
-
dataOptions:
|
|
653
|
+
dataOptions: F.listData
|
|
650
654
|
});
|
|
651
655
|
});
|
|
652
656
|
};
|
|
@@ -655,24 +659,24 @@ const Pt = ae({
|
|
|
655
659
|
const m = o == null ? void 0 : o.proxy, v = m == null ? void 0 : m.bodyFormInstance;
|
|
656
660
|
v == null || v(y.value);
|
|
657
661
|
}), typeof e.expose == "function" && e.expose({
|
|
658
|
-
formItmeRequestInstance:
|
|
659
|
-
getFormRef:
|
|
660
|
-
validate:
|
|
661
|
-
resetFields:
|
|
662
|
-
clearValidate:
|
|
663
|
-
validateField:
|
|
662
|
+
formItmeRequestInstance: ye,
|
|
663
|
+
getFormRef: fe,
|
|
664
|
+
validate: Ie,
|
|
665
|
+
resetFields: Re,
|
|
666
|
+
clearValidate: Oe,
|
|
667
|
+
validateField: we
|
|
664
668
|
}), {
|
|
665
669
|
// 模板使用
|
|
666
|
-
formProps:
|
|
670
|
+
formProps: W,
|
|
667
671
|
rowLayout: h,
|
|
668
672
|
formItem: Q,
|
|
669
673
|
isBtnHidden: u,
|
|
670
674
|
isFold: x,
|
|
671
|
-
folded:
|
|
672
|
-
getBtnColSpan:
|
|
673
|
-
isRenderBtn:
|
|
674
|
-
colRightLeftList:
|
|
675
|
-
formInputComponents:
|
|
675
|
+
folded: r,
|
|
676
|
+
getBtnColSpan: E,
|
|
677
|
+
isRenderBtn: re,
|
|
678
|
+
colRightLeftList: se,
|
|
679
|
+
formInputComponents: L,
|
|
676
680
|
formInstance: y,
|
|
677
681
|
// 注意:不要在 setup return 中暴露与 props 同名的 key(configBtn / model /
|
|
678
682
|
// btnColSpanRow / renderBtn)——Vue 2 已自动把 props 挂到 vm 实例,
|
|
@@ -680,36 +684,36 @@ const Pt = ae({
|
|
|
680
684
|
// 模板中的 :model 引用 resolvedModel(用于解析 v-model 兼容),其它 props 直接使用名称。
|
|
681
685
|
resolvedModel: i,
|
|
682
686
|
getRowColsAlgorithm: A,
|
|
683
|
-
changeFolded:
|
|
687
|
+
changeFolded: q,
|
|
684
688
|
// 方法
|
|
685
|
-
checkPermission:
|
|
686
|
-
translateLabel:
|
|
689
|
+
checkPermission: B,
|
|
690
|
+
translateLabel: k,
|
|
687
691
|
getCompIcon: f,
|
|
688
692
|
filterOptions: p,
|
|
689
693
|
resolveDisabled: b,
|
|
690
|
-
handleBtnClick:
|
|
694
|
+
handleBtnClick: ne,
|
|
691
695
|
clickBtn: De,
|
|
692
|
-
initFormItemOptions:
|
|
696
|
+
initFormItemOptions: qe,
|
|
693
697
|
noop: () => {
|
|
694
698
|
},
|
|
695
699
|
// expose 公开方法(供 $refs.<esForm>.validate() 直接调用,不经过 ctx.expose)
|
|
696
|
-
formItmeRequestInstance:
|
|
697
|
-
getFormRef:
|
|
698
|
-
validate:
|
|
699
|
-
resetFields:
|
|
700
|
-
clearValidate:
|
|
701
|
-
validateField:
|
|
700
|
+
formItmeRequestInstance: ye,
|
|
701
|
+
getFormRef: fe,
|
|
702
|
+
validate: Ie,
|
|
703
|
+
resetFields: Re,
|
|
704
|
+
clearValidate: Oe,
|
|
705
|
+
validateField: we
|
|
702
706
|
};
|
|
703
707
|
}
|
|
704
708
|
});
|
|
705
|
-
function
|
|
706
|
-
var
|
|
707
|
-
return e && (
|
|
709
|
+
function ge(n, e, o, t, i, l, c, B) {
|
|
710
|
+
var k = typeof n == "function" ? n.options : n;
|
|
711
|
+
return e && (k.render = e, k.staticRenderFns = o, k._compiled = !0), l && (k._scopeId = "data-v-" + l), {
|
|
708
712
|
exports: n,
|
|
709
|
-
options:
|
|
713
|
+
options: k
|
|
710
714
|
};
|
|
711
715
|
}
|
|
712
|
-
var
|
|
716
|
+
var Wt = function() {
|
|
713
717
|
var e = this, o = e._self._c;
|
|
714
718
|
return e._self._setupProxy, o("el-form", e._b({ ref: "formRef", staticClass: "es-form" }, "el-form", e.formProps, !1), [o("div", { staticClass: "flex-center" }, [o("el-row", e._b({}, "el-row", e.rowLayout, !1), [e._l(e.formItem, function(t, i) {
|
|
715
719
|
return [o("el-col", { directives: [{ name: "show", rawName: "v-show", value: !t.isFold, expression: "!item.isFold" }], key: t.prop || i, attrs: { span: t.span } }, [o("el-form-item", e._b({ attrs: { label: e.translateLabel(t), prop: t.prop }, nativeOn: { click: function(l) {
|
|
@@ -728,19 +732,19 @@ var Lt = function() {
|
|
|
728
732
|
return e.handleBtnClick(t);
|
|
729
733
|
} } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")]) : e._e()];
|
|
730
734
|
}), e.isFold ? o("el-button", { staticStyle: { "padding-left": "0", border: "none" }, attrs: { type: "text", icon: e.folded ? "el-icon-arrow-down" : "el-icon-arrow-up" }, on: { click: e.changeFolded } }, [e._v(" " + e._s(e.folded ? "展开" : "收起") + " ")]) : e._e()], 2)]) : e._e()], 1)]], 2)], 1)]);
|
|
731
|
-
},
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
+
}, Qt = [], Jt = /* @__PURE__ */ ge(
|
|
736
|
+
Kt,
|
|
737
|
+
Wt,
|
|
738
|
+
Qt,
|
|
735
739
|
!1,
|
|
736
740
|
null,
|
|
737
741
|
"4a462026"
|
|
738
742
|
);
|
|
739
|
-
const
|
|
740
|
-
|
|
741
|
-
n.component(
|
|
743
|
+
const be = Jt.exports;
|
|
744
|
+
be.install = function(n) {
|
|
745
|
+
n.component(be.name || "EsForm", be);
|
|
742
746
|
};
|
|
743
|
-
const
|
|
747
|
+
const Zt = ie({
|
|
744
748
|
name: "RenderDomTb",
|
|
745
749
|
props: {
|
|
746
750
|
row: { type: Object, default: () => ({}) },
|
|
@@ -751,19 +755,19 @@ const zt = ae({
|
|
|
751
755
|
setup(n) {
|
|
752
756
|
return () => {
|
|
753
757
|
const { row: e, index: o, dataKey: t, render: i } = n;
|
|
754
|
-
if (!e) return
|
|
758
|
+
if (!e) return ue("span", "-");
|
|
755
759
|
const l = t ? e[t] : null;
|
|
756
760
|
try {
|
|
757
|
-
const c = i(
|
|
758
|
-
return typeof c == "string" ?
|
|
761
|
+
const c = i(ue, { value: l, row: e, index: o });
|
|
762
|
+
return typeof c == "string" ? ue("span", c) : c;
|
|
759
763
|
} catch (c) {
|
|
760
|
-
return
|
|
764
|
+
return ue("span", "-");
|
|
761
765
|
}
|
|
762
766
|
};
|
|
763
767
|
}
|
|
764
|
-
}),
|
|
768
|
+
}), Gt = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), Yt = ie({
|
|
765
769
|
name: "EsTableColumnItem",
|
|
766
|
-
components: { RenderDomTb:
|
|
770
|
+
components: { RenderDomTb: Zt },
|
|
767
771
|
props: {
|
|
768
772
|
cols: {
|
|
769
773
|
type: Object,
|
|
@@ -772,25 +776,25 @@ const zt = ae({
|
|
|
772
776
|
},
|
|
773
777
|
setup() {
|
|
774
778
|
var o, t;
|
|
775
|
-
const n = (t = (o =
|
|
779
|
+
const n = (t = (o = ce("$EsPlus", null)) != null ? o : me()) != null ? t : {};
|
|
776
780
|
return {
|
|
777
781
|
columnBindAttr: (i) => {
|
|
778
782
|
const l = {};
|
|
779
783
|
for (const c in i)
|
|
780
784
|
if (!(c === "groups" || c === "scopedSlots" || c === "render"))
|
|
781
785
|
if (c.includes("-")) {
|
|
782
|
-
const
|
|
783
|
-
let
|
|
784
|
-
for (let d = 1; d <
|
|
785
|
-
|
|
786
|
-
l[
|
|
786
|
+
const B = c.split("-");
|
|
787
|
+
let k = B[0];
|
|
788
|
+
for (let d = 1; d < B.length; d++)
|
|
789
|
+
k += Gt(B[d]);
|
|
790
|
+
l[k] = i[c];
|
|
787
791
|
} else c === "key" ? (l.prop = i[c], l[c] = i[c]) : c === "label" && i.labelKey && typeof n.t == "function" ? l.label = n.t(i.labelKey) : l[c] = i[c];
|
|
788
792
|
return l.align || (l.align = "center"), l;
|
|
789
793
|
}
|
|
790
794
|
};
|
|
791
795
|
}
|
|
792
796
|
});
|
|
793
|
-
var
|
|
797
|
+
var Xt = function() {
|
|
794
798
|
var e = this, o = e._self._c;
|
|
795
799
|
return e._self._setupProxy, e.cols.groups && Array.isArray(e.cols.groups) ? o("el-table-column", e._b({}, "el-table-column", e.columnBindAttr(e.cols), !1), e._l(e.cols.groups, function(t, i) {
|
|
796
800
|
return o("el-table-column", e._b({ key: t.prop || t.key || i, scopedSlots: e._u([t.render && typeof t.render == "function" ? { key: "default", fn: function(l) {
|
|
@@ -803,15 +807,15 @@ var jt = function() {
|
|
|
803
807
|
} }]) }, "el-table-column", e.columnBindAttr(e.cols), !1)) : e.cols.scopedSlots && e.cols.scopedSlots.customRender ? o("el-table-column", e._b({ scopedSlots: e._u([{ key: "default", fn: function(t) {
|
|
804
808
|
return [t && t.row ? e._t(e.cols.scopedSlots.customRender, null, null, Object.assign({}, e.cols, { row: t.row, column: t.column, scope: t })) : o("span", [e._v("-")])];
|
|
805
809
|
} }], null, !0) }, "el-table-column", e.columnBindAttr(e.cols), !1)) : e.cols.ellipsis && typeof e.cols.ellipsis == "boolean" ? o("el-table-column", e._b({ attrs: { "show-overflow-tooltip": "" } }, "el-table-column", e.columnBindAttr(e.cols), !1)) : o("el-table-column", e._b({}, "el-table-column", e.columnBindAttr(e.cols), !1));
|
|
806
|
-
},
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
+
}, en = [], tn = /* @__PURE__ */ ge(
|
|
811
|
+
Yt,
|
|
812
|
+
Xt,
|
|
813
|
+
en,
|
|
810
814
|
!1,
|
|
811
815
|
null,
|
|
812
816
|
null
|
|
813
817
|
);
|
|
814
|
-
const
|
|
818
|
+
const nn = tn.exports, ft = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-${n.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase()}` : void 0, on = ie({
|
|
815
819
|
name: "RenderDomTbBtn",
|
|
816
820
|
props: {
|
|
817
821
|
render: { type: Function, required: !0 }
|
|
@@ -826,9 +830,9 @@ const Mt = Nt.exports, st = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-$
|
|
|
826
830
|
}
|
|
827
831
|
};
|
|
828
832
|
}
|
|
829
|
-
}),
|
|
833
|
+
}), sn = ie({
|
|
830
834
|
name: "EsTableBtns",
|
|
831
|
-
components: { RenderDom:
|
|
835
|
+
components: { RenderDom: on },
|
|
832
836
|
props: {
|
|
833
837
|
leftText: { type: String, default: "" },
|
|
834
838
|
btnConfig: {
|
|
@@ -842,18 +846,18 @@ const Mt = Nt.exports, st = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-$
|
|
|
842
846
|
},
|
|
843
847
|
setup(n) {
|
|
844
848
|
var a, f;
|
|
845
|
-
const e = (f = (a =
|
|
849
|
+
const e = (f = (a = ce("$EsPlus", null)) != null ? a : me()) != null ? f : {}, o = (p, b) => {
|
|
846
850
|
if (!b) return !0;
|
|
847
851
|
const y = e.permission;
|
|
848
852
|
return typeof y == "function" ? y(b) : !0;
|
|
849
853
|
}, t = (p) => p.map((b) => {
|
|
850
854
|
const y = { ...b };
|
|
851
855
|
return o([], b.permissionValue) ? typeof b.isHide == "function" ? y.isHide = b.isHide() : y.isHide = b.isHide || !1 : y.isHide = !0, y;
|
|
852
|
-
}), i =
|
|
853
|
-
(n.btnConfig || []).filter((p) =>
|
|
854
|
-
).filter((p) => !p.isHide)), l =
|
|
855
|
-
(n.btnConfig || []).filter((p) =>
|
|
856
|
-
).filter((p) => !p.isHide)), c =
|
|
856
|
+
}), i = S(() => t(
|
|
857
|
+
(n.btnConfig || []).filter((p) => nt(p) === "left")
|
|
858
|
+
).filter((p) => !p.isHide)), l = S(() => t(
|
|
859
|
+
(n.btnConfig || []).filter((p) => nt(p) === "right")
|
|
860
|
+
).filter((p) => !p.isHide)), c = S(() => !!n.leftText || i.value.length > 0 || l.value.length > 0);
|
|
857
861
|
return {
|
|
858
862
|
processedBtnLeft: i,
|
|
859
863
|
processedBtnRight: l,
|
|
@@ -863,51 +867,51 @@ const Mt = Nt.exports, st = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-$
|
|
|
863
867
|
display: "inline-block",
|
|
864
868
|
marginLeft: p !== 0 ? "8px" : "0px"
|
|
865
869
|
}),
|
|
866
|
-
getCompIcon:
|
|
870
|
+
getCompIcon: ft,
|
|
867
871
|
filterOptions: (p) => {
|
|
868
872
|
const {
|
|
869
873
|
render: b,
|
|
870
874
|
click: y,
|
|
871
875
|
icon: _,
|
|
872
|
-
permissionValue:
|
|
873
|
-
code:
|
|
876
|
+
permissionValue: L,
|
|
877
|
+
code: j,
|
|
874
878
|
isHide: N,
|
|
875
879
|
name: M,
|
|
876
880
|
size: V,
|
|
877
|
-
...
|
|
881
|
+
...W
|
|
878
882
|
} = p;
|
|
879
|
-
return
|
|
883
|
+
return W;
|
|
880
884
|
},
|
|
881
|
-
resolveBtnSize: (p) =>
|
|
885
|
+
resolveBtnSize: (p) => je(p.size) || "mini"
|
|
882
886
|
};
|
|
883
887
|
}
|
|
884
888
|
});
|
|
885
|
-
var
|
|
889
|
+
var rn = function() {
|
|
886
890
|
var e = this, o = e._self._c;
|
|
887
891
|
return e._self._setupProxy, e.showContainer ? o("div", { staticClass: "flex-float btns" }, [o("div", { staticClass: "left-text" }, [e._v(" " + e._s(e.leftText) + " ")]), o("div", { staticClass: "btn-container_block" }, [o("div", { staticClass: "btn-left" }, [e._l(e.processedBtnLeft, function(t, i) {
|
|
888
892
|
return [t.isHide ? e._e() : o("div", { key: t.name || i, style: e.buttonContainerStyle(i) }, [t.render && typeof t.render == "function" ? o("render-dom", { attrs: { render: t.render } }) : o("el-button", e._b({ attrs: { type: t.type || "", size: e.resolveBtnSize(t), icon: e.getCompIcon(t.icon), loading: t.loading || !1, disabled: e.getDisabledState(t) }, on: { click: () => t.click && t.click(e.instance) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")])], 1)];
|
|
889
893
|
})], 2), o("div", { staticClass: "btn-right" }, [e._l(e.processedBtnRight, function(t, i) {
|
|
890
894
|
return [t.isHide ? e._e() : o("div", { key: t.name || i, style: e.buttonContainerStyle(i) }, [t.render && typeof t.render == "function" ? o("render-dom", { attrs: { render: t.render } }) : o("el-button", e._b({ attrs: { type: t.type || "", size: e.resolveBtnSize(t), icon: e.getCompIcon(t.icon), loading: t.loading || !1, disabled: e.getDisabledState(t) }, on: { click: () => t.click && t.click(e.instance) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")])], 1)];
|
|
891
895
|
})], 2)])]) : e._e();
|
|
892
|
-
},
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
+
}, an = [], ln = /* @__PURE__ */ ge(
|
|
897
|
+
sn,
|
|
898
|
+
rn,
|
|
899
|
+
an,
|
|
896
900
|
!1,
|
|
897
901
|
null,
|
|
898
902
|
"2b641efd"
|
|
899
903
|
);
|
|
900
|
-
const
|
|
901
|
-
function
|
|
902
|
-
const l = z(400), c = z(null),
|
|
903
|
-
var y, _,
|
|
904
|
-
const f = ((y = e.value) == null ? void 0 : y.offsetHeight) || 0, p = ((
|
|
904
|
+
const cn = ln.exports;
|
|
905
|
+
function un(n, e, o, t, i) {
|
|
906
|
+
const l = z(400), c = z(null), B = (f) => Math.sign(f) === -1, k = () => {
|
|
907
|
+
var y, _, L, j;
|
|
908
|
+
const f = ((y = e.value) == null ? void 0 : y.offsetHeight) || 0, p = ((L = (_ = o.value) == null ? void 0 : _.$el) == null ? void 0 : L.offsetHeight) || 0, b = ((j = t.value) == null ? void 0 : j.offsetHeight) || 0;
|
|
905
909
|
return Math.round(b + f + p);
|
|
906
910
|
}, d = () => {
|
|
907
|
-
var V,
|
|
911
|
+
var V, W, U, J, R;
|
|
908
912
|
const f = n.value;
|
|
909
913
|
if (!f) return;
|
|
910
|
-
const p = typeof i.tabHeight == "number" ? i.tabHeight : i.heightType === "height" ? ((V = f.parentElement) == null ? void 0 : V.offsetHeight) || f.offsetHeight : parseInt(i.tabHeight, 10) || 450, b = isNaN(p) ? 450 : p, y = b -
|
|
914
|
+
const p = typeof i.tabHeight == "number" ? i.tabHeight : i.heightType === "height" ? ((V = f.parentElement) == null ? void 0 : V.offsetHeight) || f.offsetHeight : parseInt(i.tabHeight, 10) || 450, b = isNaN(p) ? 450 : p, y = b - k(), _ = B(y) ? k() + 300 : b, L = ((W = t.value) == null ? void 0 : W.offsetHeight) || 0, j = ((U = e.value) == null ? void 0 : U.offsetHeight) || 0, N = ((R = (J = o.value) == null ? void 0 : J.$el) == null ? void 0 : R.offsetHeight) || 0, M = Math.floor(_) - Math.round(L + j + N);
|
|
911
915
|
l.value !== M && (l.value = M);
|
|
912
916
|
}, g = () => {
|
|
913
917
|
Fe(() => {
|
|
@@ -923,10 +927,10 @@ function Zt(n, e, o, t, i) {
|
|
|
923
927
|
}, a = () => {
|
|
924
928
|
c.value && (c.value.disconnect(), c.value = null);
|
|
925
929
|
};
|
|
926
|
-
return
|
|
930
|
+
return Ue(() => g()), jt(() => a()), { tableHeight: l, resizeObservers: d, startObserver: g, stopObserver: a };
|
|
927
931
|
}
|
|
928
|
-
function
|
|
929
|
-
const e =
|
|
932
|
+
function dn(n) {
|
|
933
|
+
const e = Ft(), o = z([]), t = z({}), i = z(!1), l = () => {
|
|
930
934
|
o.value = [...e.multipleSelection], t.value = { ...e.selectionsByPage }, i.value = e.isInitChange;
|
|
931
935
|
};
|
|
932
936
|
return {
|
|
@@ -934,26 +938,26 @@ function Gt(n) {
|
|
|
934
938
|
selectionsByPage: t,
|
|
935
939
|
isInitChange: i,
|
|
936
940
|
handleSelectionChange: (d, g) => {
|
|
937
|
-
e.isInitChange && n || (
|
|
941
|
+
e.isInitChange && n || (Ot(e, d, g, n), l());
|
|
938
942
|
},
|
|
939
943
|
clearAllSelection: (d) => {
|
|
940
|
-
d ?
|
|
944
|
+
d ? Rt(e, d) : (e.multipleSelection = [], e.selectionsByPage = {}), l();
|
|
941
945
|
},
|
|
942
946
|
initSelection: (d, g) => {
|
|
943
947
|
if (e.isInitChange = !0, l(), !g) {
|
|
944
948
|
e.isInitChange = !1, l();
|
|
945
949
|
return;
|
|
946
950
|
}
|
|
947
|
-
n ?
|
|
948
|
-
|
|
949
|
-
}
|
|
951
|
+
Fe(n ? () => {
|
|
952
|
+
It(e, d, g, n), e.isInitChange = !1, l();
|
|
953
|
+
} : () => {
|
|
950
954
|
var a;
|
|
951
955
|
(a = g.clearSelection) == null || a.call(g), e.isInitChange = !1, l();
|
|
952
956
|
});
|
|
953
957
|
}
|
|
954
958
|
};
|
|
955
959
|
}
|
|
956
|
-
const
|
|
960
|
+
const rt = {
|
|
957
961
|
multiSelect: !1,
|
|
958
962
|
expand: !1,
|
|
959
963
|
snIndex: !1,
|
|
@@ -963,7 +967,7 @@ const et = {
|
|
|
963
967
|
headerCellStyle: { background: "#f5f7fa" },
|
|
964
968
|
highlightCurrentRow: !0,
|
|
965
969
|
cachePageSelection: !0
|
|
966
|
-
},
|
|
970
|
+
}, fn = /* @__PURE__ */ new Set([
|
|
967
971
|
"multiSelect",
|
|
968
972
|
"expand",
|
|
969
973
|
"snIndex",
|
|
@@ -987,7 +991,7 @@ const et = {
|
|
|
987
991
|
"estimatedRowHeight",
|
|
988
992
|
"overscanCount",
|
|
989
993
|
"rowClassName"
|
|
990
|
-
]),
|
|
994
|
+
]), pn = (n) => n.toLowerCase().replace(/(\s|^)[a-z]/g, (e) => e.toUpperCase()), mn = (n) => {
|
|
991
995
|
const e = {};
|
|
992
996
|
for (const o in n)
|
|
993
997
|
if (!(o === "groups" || o === "scopedSlots" || o === "render"))
|
|
@@ -995,16 +999,16 @@ const et = {
|
|
|
995
999
|
const t = o.split("-");
|
|
996
1000
|
let i = t[0];
|
|
997
1001
|
for (let l = 1; l < t.length; l++)
|
|
998
|
-
i +=
|
|
1002
|
+
i += pn(t[l]);
|
|
999
1003
|
e[i] = n[o];
|
|
1000
1004
|
} else o === "key" && (e.prop = n[o]), e[o] = n[o];
|
|
1001
1005
|
return e.align || (e.align = "center"), e;
|
|
1002
|
-
},
|
|
1006
|
+
}, at = (n) => {
|
|
1003
1007
|
const e = ["total", "pageSize", "current", "tableData"];
|
|
1004
|
-
return
|
|
1005
|
-
},
|
|
1008
|
+
return pe(n) ? Object.keys(n).every((o) => e.find((t) => t === o) && n[o] && typeof n[o] == "string") : !1;
|
|
1009
|
+
}, gn = ie({
|
|
1006
1010
|
name: "EsTable",
|
|
1007
|
-
components: { ColumnItem:
|
|
1011
|
+
components: { ColumnItem: nn, TableBtns: cn },
|
|
1008
1012
|
// 关闭自动 attrs 继承,避免 fallthrough 重复绑定
|
|
1009
1013
|
inheritAttrs: !1,
|
|
1010
1014
|
props: {
|
|
@@ -1024,7 +1028,7 @@ const et = {
|
|
|
1024
1028
|
},
|
|
1025
1029
|
options: {
|
|
1026
1030
|
type: Object,
|
|
1027
|
-
default: () => ({ ...
|
|
1031
|
+
default: () => ({ ...rt })
|
|
1028
1032
|
},
|
|
1029
1033
|
pagination: {
|
|
1030
1034
|
type: Object,
|
|
@@ -1039,33 +1043,33 @@ const et = {
|
|
|
1039
1043
|
"change-table-sort"
|
|
1040
1044
|
],
|
|
1041
1045
|
setup(n, { emit: e, slots: o, attrs: t, expose: i }) {
|
|
1042
|
-
var
|
|
1043
|
-
const l =
|
|
1046
|
+
var Qe, Je, Ze, Ge;
|
|
1047
|
+
const l = Ke(), c = (Je = (Qe = ce(
|
|
1044
1048
|
"$esPlusTable",
|
|
1045
1049
|
null
|
|
1046
|
-
)) != null ?
|
|
1047
|
-
if (!
|
|
1048
|
-
const
|
|
1049
|
-
return typeof
|
|
1050
|
+
)) != null ? Qe : me().EsTable) != null ? Je : {}, B = (Ge = (Ze = ce("$EsPlus", null)) != null ? Ze : me()) != null ? Ge : {}, k = (s) => {
|
|
1051
|
+
if (!s) return !0;
|
|
1052
|
+
const O = B.permission;
|
|
1053
|
+
return typeof O == "function" ? O(s) : !0;
|
|
1050
1054
|
};
|
|
1051
1055
|
(n.options.virtual === !0 || n.options.engine === "virtual") && console.warn(
|
|
1052
1056
|
"[@es-plus/vue2] 虚拟滚动 (virtual: true) 在 Vue 2 + Element UI 下不可用,已降级为普通 el-table 渲染。如需虚拟滚动请使用 Vue 3 + Element Plus 版本(@es-plus/vue3)。"
|
|
1053
1057
|
);
|
|
1054
|
-
const d = z(null), g = z(null), a = z(null), f = z(null), p = z(null), b = z(`table_${Math.random().toString(36).substring(2, 12)}`), y = z([]), _ =
|
|
1055
|
-
|
|
1058
|
+
const d = z(null), g = z(null), a = z(null), f = z(null), p = z(null), b = z(`table_${Math.random().toString(36).substring(2, 12)}`), y = z([]), _ = S(() => y.value && y.value.length ? y.value : n.dataSource), L = z([...n.columns]);
|
|
1059
|
+
de(
|
|
1056
1060
|
() => n.columns,
|
|
1057
|
-
(
|
|
1058
|
-
|
|
1061
|
+
(s) => {
|
|
1062
|
+
L.value = [...s];
|
|
1059
1063
|
},
|
|
1060
1064
|
{ deep: !0 }
|
|
1061
1065
|
);
|
|
1062
|
-
const
|
|
1063
|
-
const
|
|
1064
|
-
!
|
|
1065
|
-
},
|
|
1066
|
-
}),
|
|
1067
|
-
() => typeof
|
|
1068
|
-
),
|
|
1066
|
+
const j = z(!1), N = z(!1), M = z(!1), V = () => {
|
|
1067
|
+
const s = l == null ? void 0 : l.proxy;
|
|
1068
|
+
!s || !s.$refs || (p.value = s.$refs.tableContainerEl || null, a.value = s.$refs.headBarRef || null, f.value = s.$refs.paginationRef || null);
|
|
1069
|
+
}, W = ce("bodyFormInstance", () => {
|
|
1070
|
+
}), U = ce("getVisibleShow", !1), J = S(
|
|
1071
|
+
() => typeof U == "function" ? U() : U
|
|
1072
|
+
), R = z({
|
|
1069
1073
|
pageSize: 10,
|
|
1070
1074
|
current: 1,
|
|
1071
1075
|
total: 0,
|
|
@@ -1073,20 +1077,20 @@ const et = {
|
|
|
1073
1077
|
size: "small",
|
|
1074
1078
|
isSmall: !0,
|
|
1075
1079
|
...n.pagination
|
|
1076
|
-
}),
|
|
1077
|
-
const
|
|
1078
|
-
return
|
|
1079
|
-
}), h =
|
|
1080
|
-
if (n.options.configTableOut &&
|
|
1080
|
+
}), r = z(null), u = S(() => {
|
|
1081
|
+
const s = n.options.entryQuery;
|
|
1082
|
+
return s && pe(s) && Object.keys(s).length ? s : {};
|
|
1083
|
+
}), h = S(() => {
|
|
1084
|
+
if (n.options.configTableOut && pe(n.options.configTableOut) && Object.keys(n.options.configTableOut).length && at(n.options.configTableOut))
|
|
1081
1085
|
return n.options.configTableOut;
|
|
1082
1086
|
if (c != null && c.configQueryFieldOutput && typeof c.configQueryFieldOutput == "function") {
|
|
1083
|
-
const
|
|
1087
|
+
const s = c.configQueryFieldOutput({
|
|
1084
1088
|
total: "records",
|
|
1085
1089
|
pageSize: "pageSize",
|
|
1086
1090
|
current: "pageNo",
|
|
1087
1091
|
tableData: "rows"
|
|
1088
1092
|
});
|
|
1089
|
-
if (
|
|
1093
|
+
if (at(s)) return s;
|
|
1090
1094
|
}
|
|
1091
1095
|
return {
|
|
1092
1096
|
total: "records",
|
|
@@ -1094,126 +1098,136 @@ const et = {
|
|
|
1094
1098
|
current: "pageNo",
|
|
1095
1099
|
tableData: "rows"
|
|
1096
1100
|
};
|
|
1097
|
-
}), w =
|
|
1098
|
-
const
|
|
1099
|
-
if (!
|
|
1100
|
-
const
|
|
1101
|
+
}), w = S(() => {
|
|
1102
|
+
const s = l == null ? void 0 : l.proxy;
|
|
1103
|
+
if (!s || !s.$children) return {};
|
|
1104
|
+
const O = s.$children.find((C) => {
|
|
1101
1105
|
var I;
|
|
1102
1106
|
return ((I = C == null ? void 0 : C.$options) == null ? void 0 : I.name) === "EsForm";
|
|
1103
1107
|
});
|
|
1104
|
-
return
|
|
1105
|
-
}), A =
|
|
1106
|
-
const
|
|
1107
|
-
if (typeof
|
|
1108
|
-
const C =
|
|
1108
|
+
return O ? (r.value = O, W(O), O) : {};
|
|
1109
|
+
}), A = S(() => {
|
|
1110
|
+
const s = o.default;
|
|
1111
|
+
if (typeof s == "function") {
|
|
1112
|
+
const C = s();
|
|
1109
1113
|
return Array.isArray(C) ? C.length > 0 : !!C;
|
|
1110
1114
|
}
|
|
1111
|
-
const
|
|
1112
|
-
return Array.isArray(
|
|
1113
|
-
}), x =
|
|
1115
|
+
const O = o.default;
|
|
1116
|
+
return Array.isArray(O) && O.length > 0;
|
|
1117
|
+
}), x = S(
|
|
1114
1118
|
() => n.options.heightType || "auto"
|
|
1115
|
-
),
|
|
1116
|
-
[x.value]:
|
|
1117
|
-
})),
|
|
1119
|
+
), E = S(() => typeof n.options.tabHeight == "number" ? `${n.options.tabHeight}px` : x.value === "height" && typeof n.options.height == "number" ? `${n.options.height}px` : "100%"), Q = S(() => ({
|
|
1120
|
+
[x.value]: E.value
|
|
1121
|
+
})), q = S(() => n.headBarClass ? {
|
|
1118
1122
|
type: typeof n.headBarClass == "string" ? "string" : "object",
|
|
1119
1123
|
value: n.headBarClass
|
|
1120
|
-
} : { type: "string", value: "" }),
|
|
1121
|
-
const
|
|
1122
|
-
return
|
|
1123
|
-
}),
|
|
1124
|
-
const
|
|
1125
|
-
return
|
|
1126
|
-
}),
|
|
1127
|
-
const
|
|
1128
|
-
return
|
|
1129
|
-
}),
|
|
1124
|
+
} : { type: "string", value: "" }), se = S(() => {
|
|
1125
|
+
const s = q.value;
|
|
1126
|
+
return s.type === "object" && s.value && typeof s.value == "object" ? s.value : {};
|
|
1127
|
+
}), re = S(() => {
|
|
1128
|
+
const s = q.value;
|
|
1129
|
+
return s.type === "string" ? s.value : "";
|
|
1130
|
+
}), ne = S(() => {
|
|
1131
|
+
const s = c == null ? void 0 : c.paginationLayout;
|
|
1132
|
+
return s ? typeof s == "function" ? s() : s : null;
|
|
1133
|
+
}), _e = S(
|
|
1134
|
+
() => {
|
|
1135
|
+
var s;
|
|
1136
|
+
return ((s = ne.value) == null ? void 0 : s.layout) || "prev, pager, next, jumper, sizes, ->, total";
|
|
1137
|
+
}
|
|
1138
|
+
), De = S(
|
|
1139
|
+
() => {
|
|
1140
|
+
var s;
|
|
1141
|
+
return ((s = ne.value) == null ? void 0 : s.pageSizes) || R.value.pageSizes;
|
|
1142
|
+
}
|
|
1143
|
+
), qe = S(
|
|
1130
1144
|
() => {
|
|
1131
|
-
var
|
|
1132
|
-
return ((
|
|
1145
|
+
var s, O;
|
|
1146
|
+
return (O = (s = ne.value) == null ? void 0 : s.isSmall) != null ? O : R.value.isSmall;
|
|
1133
1147
|
}
|
|
1134
|
-
),
|
|
1148
|
+
), fe = S(
|
|
1135
1149
|
() => {
|
|
1136
|
-
var
|
|
1137
|
-
return ((
|
|
1150
|
+
var s, O;
|
|
1151
|
+
return (O = (s = ne.value) == null ? void 0 : s.background) != null ? O : !0;
|
|
1138
1152
|
}
|
|
1139
|
-
),
|
|
1153
|
+
), Ie = S(
|
|
1140
1154
|
() => {
|
|
1141
|
-
var
|
|
1142
|
-
return (
|
|
1155
|
+
var s;
|
|
1156
|
+
return ((s = ne.value) == null ? void 0 : s.prevText) || "";
|
|
1143
1157
|
}
|
|
1144
|
-
),
|
|
1158
|
+
), Re = S(
|
|
1145
1159
|
() => {
|
|
1146
|
-
var
|
|
1147
|
-
return (
|
|
1160
|
+
var s;
|
|
1161
|
+
return ((s = ne.value) == null ? void 0 : s.nextText) || "";
|
|
1148
1162
|
}
|
|
1149
|
-
),
|
|
1163
|
+
), Oe = S(() => ({
|
|
1150
1164
|
position: x.value === "height" ? "absolute" : "static",
|
|
1151
1165
|
bottom: "0px",
|
|
1152
1166
|
left: "0px",
|
|
1153
1167
|
// z-index 必须高于 element-loading 蒙层(默认 2000),否则请求加载过程中分页会被蒙层遮挡。
|
|
1154
1168
|
zIndex: 2001,
|
|
1155
1169
|
background: "#fff"
|
|
1156
|
-
})),
|
|
1157
|
-
() => !!n.options.actionUrl || n.options.apiParams &&
|
|
1158
|
-
),
|
|
1159
|
-
const
|
|
1160
|
-
if (
|
|
1170
|
+
})), we = S(() => n.options.loading || j.value), ye = S(
|
|
1171
|
+
() => !!n.options.actionUrl || n.options.apiParams && pe(n.options.apiParams) && Object.keys(n.options.apiParams).length > 0
|
|
1172
|
+
), Pe = S(() => {
|
|
1173
|
+
const s = L.value.filter((C) => !C.hidCol);
|
|
1174
|
+
if (s.forEach((C) => {
|
|
1161
1175
|
C.prop !== "operate" && C.key !== "operate" && (C.prop || C.key) && !C.formatter && (C.formatter = (P) => {
|
|
1162
1176
|
const I = P[C.prop] || P[C.key];
|
|
1163
1177
|
return I == null || I === "" ? C.emptyPlaceholder || "-" : I;
|
|
1164
1178
|
}), (C.prop === "operate" || C.key === "operate") && C.btns && !C.render && (C.render = (P, { row: I }) => {
|
|
1165
|
-
var
|
|
1166
|
-
return
|
|
1167
|
-
(
|
|
1168
|
-
(
|
|
1179
|
+
var ae;
|
|
1180
|
+
return ue("div", [
|
|
1181
|
+
(ae = C.btns) == null ? void 0 : ae.filter((Z) => k(Z.permissionValue)).map(
|
|
1182
|
+
(Z) => (
|
|
1169
1183
|
// Element UI text 按钮:type="text" 而非 text 属性
|
|
1170
|
-
|
|
1184
|
+
ue(
|
|
1171
1185
|
"el-button",
|
|
1172
1186
|
{
|
|
1173
1187
|
props: {
|
|
1174
1188
|
type: "text"
|
|
1175
1189
|
},
|
|
1176
1190
|
attrs: {
|
|
1177
|
-
...
|
|
1191
|
+
...Z.type ? { "data-btn-type": Z.type } : {}
|
|
1178
1192
|
},
|
|
1179
1193
|
on: {
|
|
1180
1194
|
click: () => {
|
|
1181
|
-
var
|
|
1182
|
-
return (
|
|
1195
|
+
var le;
|
|
1196
|
+
return (le = Z.clickEvent) == null ? void 0 : le.call(Z, I);
|
|
1183
1197
|
}
|
|
1184
1198
|
}
|
|
1185
1199
|
},
|
|
1186
|
-
|
|
1200
|
+
Z.name
|
|
1187
1201
|
)
|
|
1188
1202
|
)
|
|
1189
1203
|
)
|
|
1190
1204
|
]);
|
|
1191
1205
|
});
|
|
1192
|
-
}),
|
|
1206
|
+
}), s.length > 0 && s.every((C) => C.width && !C.minWidth)) {
|
|
1193
1207
|
let C = -1;
|
|
1194
|
-
for (let P =
|
|
1195
|
-
const I =
|
|
1208
|
+
for (let P = s.length - 1; P >= 0; P--) {
|
|
1209
|
+
const I = s[P];
|
|
1196
1210
|
if (!I.fixed && I.prop !== "operate" && I.key !== "operate") {
|
|
1197
1211
|
C = P;
|
|
1198
1212
|
break;
|
|
1199
1213
|
}
|
|
1200
1214
|
}
|
|
1201
|
-
if (C === -1 && (C =
|
|
1202
|
-
const P =
|
|
1215
|
+
if (C === -1 && (C = s.length - 1), C >= 0) {
|
|
1216
|
+
const P = s[C];
|
|
1203
1217
|
P.minWidth = P.width, delete P.width;
|
|
1204
1218
|
}
|
|
1205
1219
|
}
|
|
1206
|
-
return
|
|
1207
|
-
}),
|
|
1208
|
-
const
|
|
1220
|
+
return s;
|
|
1221
|
+
}), $e = S(() => {
|
|
1222
|
+
const s = mn({ ...rt, ...n.options }), { align: O, ...C } = s, P = {};
|
|
1209
1223
|
for (const I in C)
|
|
1210
|
-
|
|
1224
|
+
fn.has(I) || (P[I] = C[I]);
|
|
1211
1225
|
if (P.size !== void 0) {
|
|
1212
|
-
const I =
|
|
1226
|
+
const I = je(P.size);
|
|
1213
1227
|
I !== void 0 && (P.size = I);
|
|
1214
1228
|
}
|
|
1215
1229
|
return P;
|
|
1216
|
-
}), { tableHeight:
|
|
1230
|
+
}), { tableHeight: Ce, resizeObservers: he } = un(
|
|
1217
1231
|
p,
|
|
1218
1232
|
a,
|
|
1219
1233
|
g,
|
|
@@ -1222,174 +1236,174 @@ const et = {
|
|
|
1222
1236
|
heightType: x.value,
|
|
1223
1237
|
tabHeight: n.options.tabHeight
|
|
1224
1238
|
}
|
|
1225
|
-
),
|
|
1226
|
-
const
|
|
1227
|
-
return n.options.rowkey && (
|
|
1239
|
+
), He = S(() => {
|
|
1240
|
+
const s = { ...$e.value, ...t };
|
|
1241
|
+
return n.options.rowkey && (s.rowKey = n.options.rowkey), x.value === "height" ? s.height = Ce.value : x.value === "maxHeight" && (s.maxHeight = Ce.value), s;
|
|
1228
1242
|
}), {
|
|
1229
|
-
multipleSelection:
|
|
1230
|
-
handleSelectionChange:
|
|
1231
|
-
initSelection:
|
|
1232
|
-
clearAllSelection:
|
|
1233
|
-
} =
|
|
1234
|
-
|
|
1243
|
+
multipleSelection: m,
|
|
1244
|
+
handleSelectionChange: v,
|
|
1245
|
+
initSelection: T,
|
|
1246
|
+
clearAllSelection: H
|
|
1247
|
+
} = dn(n.options.rowkey), F = (s) => {
|
|
1248
|
+
v(s, R.value.current || 1);
|
|
1235
1249
|
};
|
|
1236
|
-
|
|
1250
|
+
de(J, async (s, O) => {
|
|
1237
1251
|
var C, P;
|
|
1238
|
-
|
|
1252
|
+
s && s !== O && (n.options.actionUrl && await Te(), (P = (C = d.value) == null ? void 0 : C.doLayout) == null || P.call(C));
|
|
1239
1253
|
});
|
|
1240
|
-
let
|
|
1241
|
-
n.pagination && Object.keys(n.pagination).length && (
|
|
1242
|
-
const
|
|
1243
|
-
const
|
|
1244
|
-
|
|
1254
|
+
let $ = JSON.stringify(n.pagination || {});
|
|
1255
|
+
n.pagination && Object.keys(n.pagination).length && (R.value = { ...R.value, ...n.pagination }, M.value = n.pagination.total !== void 0);
|
|
1256
|
+
const D = () => {
|
|
1257
|
+
const s = { ...R.value };
|
|
1258
|
+
$ = JSON.stringify(s), e("update:pagination", s);
|
|
1245
1259
|
};
|
|
1246
|
-
|
|
1260
|
+
de(
|
|
1247
1261
|
() => n.pagination,
|
|
1248
|
-
(
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1262
|
+
(s) => {
|
|
1263
|
+
const O = JSON.stringify(s || {});
|
|
1264
|
+
O !== $ && ($ = O, R.value = { ...R.value, ...s }, M.value = s.total !== void 0);
|
|
1251
1265
|
}
|
|
1252
|
-
),
|
|
1266
|
+
), de(
|
|
1253
1267
|
() => n.dataSource,
|
|
1254
|
-
(
|
|
1255
|
-
|
|
1268
|
+
(s) => {
|
|
1269
|
+
T(s, d.value);
|
|
1256
1270
|
}
|
|
1257
1271
|
);
|
|
1258
|
-
let
|
|
1259
|
-
|
|
1260
|
-
Array.isArray(
|
|
1261
|
-
}),
|
|
1262
|
-
V(),
|
|
1272
|
+
let X = null;
|
|
1273
|
+
de(y, (s) => {
|
|
1274
|
+
Array.isArray(s) && s !== X && (X = s, e("update:dataSource", s));
|
|
1275
|
+
}), Ue(() => {
|
|
1276
|
+
V(), ye.value && n.options.isInitRun !== !1 && Te(), Fe(() => {
|
|
1263
1277
|
V(), w.value, typeof requestAnimationFrame != "undefined" ? requestAnimationFrame(() => {
|
|
1264
|
-
V(),
|
|
1265
|
-
}) :
|
|
1278
|
+
V(), he();
|
|
1279
|
+
}) : he();
|
|
1266
1280
|
});
|
|
1267
1281
|
});
|
|
1268
|
-
const
|
|
1282
|
+
const ee = (s, O) => {
|
|
1269
1283
|
const C = [
|
|
1270
1284
|
{ eventName: "brcb", isReturn: !0 },
|
|
1271
1285
|
{ eventName: "qrcb", isReturn: !0 }
|
|
1272
|
-
], P = C.findIndex((I) => I.eventName ===
|
|
1273
|
-
if (n.options.listenToCallBack && n.options.listenToCallBack[
|
|
1274
|
-
return n.options.listenToCallBack[
|
|
1275
|
-
},
|
|
1286
|
+
], P = C.findIndex((I) => I.eventName === s);
|
|
1287
|
+
if (n.options.listenToCallBack && n.options.listenToCallBack[s] && P !== -1 && C[P].isReturn)
|
|
1288
|
+
return n.options.listenToCallBack[s](O);
|
|
1289
|
+
}, Ne = (s, O) => {
|
|
1276
1290
|
const C = h.value;
|
|
1277
|
-
if (
|
|
1291
|
+
if (pe(C) && Object.keys(C).length) {
|
|
1278
1292
|
const P = {};
|
|
1279
|
-
Object.entries(C).forEach(([I,
|
|
1280
|
-
var
|
|
1281
|
-
if (!
|
|
1282
|
-
const
|
|
1283
|
-
I === "tableData" ? y.value = Array.isArray(
|
|
1284
|
-
}), Object.keys(P).length && (
|
|
1293
|
+
Object.entries(C).forEach(([I, ae]) => {
|
|
1294
|
+
var Se;
|
|
1295
|
+
if (!O.includes(I)) return;
|
|
1296
|
+
const le = (Se = s[ae]) != null ? Se : wt(s, ae);
|
|
1297
|
+
I === "tableData" ? y.value = Array.isArray(le) ? le : [] : P[I] = typeof le == "number" ? le : parseInt(le, 10) || 0;
|
|
1298
|
+
}), Object.keys(P).length && (R.value = { ...R.value, ...P });
|
|
1285
1299
|
}
|
|
1286
|
-
},
|
|
1287
|
-
var
|
|
1288
|
-
const { success: C, fail: P } =
|
|
1289
|
-
if (!
|
|
1290
|
-
const
|
|
1291
|
-
...
|
|
1292
|
-
...
|
|
1300
|
+
}, Me = (s, O = {}) => {
|
|
1301
|
+
var et, tt;
|
|
1302
|
+
const { success: C, fail: P } = O, I = ((et = n.options) == null ? void 0 : et.apiParams) || {}, ae = ((tt = n.options) == null ? void 0 : tt.actionUrl) || I.url || "";
|
|
1303
|
+
if (!ae || !Object.keys(I).length) return;
|
|
1304
|
+
const Z = w.value, le = Z && Z.props && Z.props.model ? { ...Z.props.model } : u.value || {}, Se = ee("brcb", {
|
|
1305
|
+
...le,
|
|
1306
|
+
...s,
|
|
1293
1307
|
...I.model || {}
|
|
1294
|
-
}),
|
|
1295
|
-
I != null && I.method && (
|
|
1296
|
-
const
|
|
1297
|
-
if (!
|
|
1298
|
-
|
|
1308
|
+
}), vt = pe(Se) ? Se : { ...le, ...I.model || {}, ...s }, Ye = { ...I.options || {} };
|
|
1309
|
+
I != null && I.method && (Ye.method = I == null ? void 0 : I.method);
|
|
1310
|
+
const Xe = async (bt) => {
|
|
1311
|
+
if (!j.value) {
|
|
1312
|
+
j.value = !0;
|
|
1299
1313
|
try {
|
|
1300
|
-
const
|
|
1301
|
-
url:
|
|
1302
|
-
formParams:
|
|
1314
|
+
const ve = await bt({
|
|
1315
|
+
url: ae,
|
|
1316
|
+
formParams: vt,
|
|
1303
1317
|
headers: I.headers || {},
|
|
1304
|
-
...
|
|
1305
|
-
...
|
|
1306
|
-
}),
|
|
1307
|
-
|
|
1308
|
-
} catch (
|
|
1309
|
-
typeof P == "function" && P(
|
|
1318
|
+
...Ye,
|
|
1319
|
+
...s
|
|
1320
|
+
}), _t = ee("qrcb", ve) || ve;
|
|
1321
|
+
pe(ve) && Object.keys(ve).length && typeof C == "function" && C(_t);
|
|
1322
|
+
} catch (ve) {
|
|
1323
|
+
typeof P == "function" && P(ve);
|
|
1310
1324
|
} finally {
|
|
1311
|
-
|
|
1325
|
+
j.value = !1;
|
|
1312
1326
|
}
|
|
1313
1327
|
}
|
|
1314
1328
|
};
|
|
1315
|
-
n.options.httpRequest ?
|
|
1316
|
-
},
|
|
1317
|
-
|
|
1329
|
+
n.options.httpRequest ? Xe(n.options.httpRequest) : c.$httpRequest && Xe(c.$httpRequest);
|
|
1330
|
+
}, Te = (s) => new Promise((O, C) => {
|
|
1331
|
+
R.value = { ...R.value, current: 1 }, Me(
|
|
1318
1332
|
{
|
|
1319
|
-
...
|
|
1320
|
-
pageIndex:
|
|
1321
|
-
pageSize:
|
|
1333
|
+
...s || {},
|
|
1334
|
+
pageIndex: R.value.current,
|
|
1335
|
+
pageSize: R.value.pageSize
|
|
1322
1336
|
},
|
|
1323
1337
|
{
|
|
1324
1338
|
success: (P) => {
|
|
1325
|
-
|
|
1339
|
+
Ne(P, ["total", "tableData"]), Object.keys(n.pagination).length && D(), O(P);
|
|
1326
1340
|
},
|
|
1327
1341
|
fail: (P) => {
|
|
1328
1342
|
C(P);
|
|
1329
1343
|
}
|
|
1330
1344
|
}
|
|
1331
1345
|
);
|
|
1332
|
-
}),
|
|
1333
|
-
|
|
1346
|
+
}), pt = () => {
|
|
1347
|
+
Me(
|
|
1334
1348
|
{
|
|
1335
|
-
pageIndex:
|
|
1336
|
-
pageSize:
|
|
1349
|
+
pageIndex: R.value.current,
|
|
1350
|
+
pageSize: R.value.pageSize
|
|
1337
1351
|
},
|
|
1338
1352
|
{
|
|
1339
|
-
success: (
|
|
1340
|
-
|
|
1353
|
+
success: (s) => {
|
|
1354
|
+
Ne(s, ["total", "tableData"]), D(), e("pagination-current-change", R.value);
|
|
1341
1355
|
}
|
|
1342
1356
|
}
|
|
1343
1357
|
);
|
|
1344
|
-
},
|
|
1345
|
-
|
|
1358
|
+
}, mt = () => {
|
|
1359
|
+
Me(
|
|
1346
1360
|
{
|
|
1347
|
-
pageIndex:
|
|
1348
|
-
pageSize:
|
|
1361
|
+
pageIndex: R.value.current,
|
|
1362
|
+
pageSize: R.value.pageSize
|
|
1349
1363
|
},
|
|
1350
1364
|
{
|
|
1351
|
-
success: (
|
|
1352
|
-
|
|
1365
|
+
success: (s) => {
|
|
1366
|
+
Ne(s, ["total", "tableData"]), D();
|
|
1353
1367
|
}
|
|
1354
1368
|
}
|
|
1355
1369
|
);
|
|
1356
|
-
},
|
|
1357
|
-
|
|
1358
|
-
},
|
|
1359
|
-
|
|
1360
|
-
},
|
|
1361
|
-
e("change-table-sort",
|
|
1370
|
+
}, gt = (s) => {
|
|
1371
|
+
R.value = { ...R.value, pageSize: s, current: 1 }, ye.value ? mt() : (D(), e("size-change", R.value, s));
|
|
1372
|
+
}, yt = (s) => {
|
|
1373
|
+
R.value = { ...R.value, current: s }, ye.value ? pt() : (D(), e("pagination-current-change", R.value));
|
|
1374
|
+
}, ht = (s) => {
|
|
1375
|
+
e("change-table-sort", s);
|
|
1362
1376
|
};
|
|
1363
|
-
|
|
1377
|
+
dt("getTableInstantce", () => ({
|
|
1364
1378
|
tableRef: d,
|
|
1365
|
-
toggleSelection: (
|
|
1366
|
-
var
|
|
1367
|
-
|
|
1368
|
-
var I,
|
|
1369
|
-
(
|
|
1370
|
-
}) : (C = (
|
|
1379
|
+
toggleSelection: (s) => {
|
|
1380
|
+
var O, C;
|
|
1381
|
+
s ? s.forEach((P) => {
|
|
1382
|
+
var I, ae;
|
|
1383
|
+
(ae = (I = d.value) == null ? void 0 : I.toggleRowSelection) == null || ae.call(I, P);
|
|
1384
|
+
}) : (C = (O = d.value) == null ? void 0 : O.clearSelection) == null || C.call(O);
|
|
1371
1385
|
},
|
|
1372
|
-
clearAllSelection: () =>
|
|
1386
|
+
clearAllSelection: () => H(d.value),
|
|
1373
1387
|
refsInstance: () => d.value,
|
|
1374
|
-
httpRequestInstance:
|
|
1388
|
+
httpRequestInstance: Te
|
|
1375
1389
|
}));
|
|
1376
|
-
const
|
|
1377
|
-
httpRequestInstance:
|
|
1378
|
-
getSelectionRows: () =>
|
|
1390
|
+
const We = {
|
|
1391
|
+
httpRequestInstance: Te,
|
|
1392
|
+
getSelectionRows: () => m.value,
|
|
1379
1393
|
clearSelection: () => {
|
|
1380
|
-
var
|
|
1381
|
-
return (
|
|
1394
|
+
var s, O;
|
|
1395
|
+
return (O = (s = d.value) == null ? void 0 : s.clearSelection) == null ? void 0 : O.call(s);
|
|
1382
1396
|
},
|
|
1383
|
-
clearAllSelection: () =>
|
|
1397
|
+
clearAllSelection: () => H(d.value),
|
|
1384
1398
|
refresh: () => {
|
|
1385
|
-
var
|
|
1386
|
-
return (
|
|
1399
|
+
var s, O;
|
|
1400
|
+
return (O = (s = d.value) == null ? void 0 : s.doLayout) == null ? void 0 : O.call(s);
|
|
1387
1401
|
},
|
|
1388
1402
|
// virtual 滚动占位(保持 API 一致,Vue 2 版本无效)
|
|
1389
|
-
scrollToRow: (
|
|
1403
|
+
scrollToRow: (s) => {
|
|
1390
1404
|
}
|
|
1391
1405
|
};
|
|
1392
|
-
return typeof i == "function" && i(
|
|
1406
|
+
return typeof i == "function" && i(We), {
|
|
1393
1407
|
// refs
|
|
1394
1408
|
tableRef: d,
|
|
1395
1409
|
tbBtnRef: g,
|
|
@@ -1399,39 +1413,41 @@ const et = {
|
|
|
1399
1413
|
tableData: y,
|
|
1400
1414
|
effectiveDataSource: _,
|
|
1401
1415
|
// state
|
|
1402
|
-
loadStatus:
|
|
1403
|
-
paginationConfig:
|
|
1404
|
-
formInstance:
|
|
1416
|
+
loadStatus: we,
|
|
1417
|
+
paginationConfig: R,
|
|
1418
|
+
formInstance: r,
|
|
1405
1419
|
// computeds
|
|
1406
|
-
filteredColumns:
|
|
1407
|
-
tableBindAttrs:
|
|
1420
|
+
filteredColumns: Pe,
|
|
1421
|
+
tableBindAttrs: He,
|
|
1408
1422
|
hasDefaultSlot: A,
|
|
1409
1423
|
heightType: x,
|
|
1410
|
-
tabHeight:
|
|
1411
|
-
slotStyles:
|
|
1412
|
-
slotStyleValue:
|
|
1413
|
-
slotClassValue:
|
|
1424
|
+
tabHeight: E,
|
|
1425
|
+
slotStyles: q,
|
|
1426
|
+
slotStyleValue: se,
|
|
1427
|
+
slotClassValue: re,
|
|
1414
1428
|
slotState: N,
|
|
1415
1429
|
showPagination: M,
|
|
1416
1430
|
containerStyle: Q,
|
|
1417
|
-
paginationStyle:
|
|
1418
|
-
layout:
|
|
1431
|
+
paginationStyle: Oe,
|
|
1432
|
+
layout: _e,
|
|
1419
1433
|
paginationPageSizes: De,
|
|
1420
|
-
paginationIsSmall:
|
|
1421
|
-
paginationBackground:
|
|
1434
|
+
paginationIsSmall: qe,
|
|
1435
|
+
paginationBackground: fe,
|
|
1436
|
+
paginationPrevText: Ie,
|
|
1437
|
+
paginationNextText: Re,
|
|
1422
1438
|
// handlers
|
|
1423
|
-
handleTableSelectionChange:
|
|
1424
|
-
changeTableSort:
|
|
1425
|
-
handleSizeChange:
|
|
1426
|
-
handleIndexChange:
|
|
1439
|
+
handleTableSelectionChange: F,
|
|
1440
|
+
changeTableSort: ht,
|
|
1441
|
+
handleSizeChange: gt,
|
|
1442
|
+
handleIndexChange: yt,
|
|
1427
1443
|
// exposed methods (also accessible via $refs.tableRef.xxx in Vue 2)
|
|
1428
|
-
...
|
|
1444
|
+
...We,
|
|
1429
1445
|
instance: l,
|
|
1430
|
-
resizeObservers:
|
|
1446
|
+
resizeObservers: he
|
|
1431
1447
|
};
|
|
1432
1448
|
}
|
|
1433
1449
|
});
|
|
1434
|
-
var
|
|
1450
|
+
var yn = function() {
|
|
1435
1451
|
var e = this, o = e._self._c;
|
|
1436
1452
|
return e._self._setupProxy, o("div", { ref: "tableContainerEl", staticClass: "table_component", style: e.containerStyle }, [o("div", { staticClass: "table_containers" }, [e.showHeaderBar ? o("div", { ref: "headBarRef", staticClass: "btn-slot", class: e.slotClassValue, style: e.slotStyleValue }, [e.hasDefaultSlot ? o("div", { staticClass: "headerBar", style: { paddingBottom: e.hasDefaultSlot ? "10px" : "0px" } }, [e._t("default")], 2) : e._e()]) : e._e(), o("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.loadStatus, expression: "loadStatus" }], staticClass: "page-loading-con tableContainer", attrs: { "element-loading-background": "rgba(0, 0, 0, 0.03)", "element-loading-text": "努力加载中..." } }, [o("div", { staticClass: "table_inner_containers" }, [e.options.configBtn && e.options.configBtn.length || e.options.leftText ? o("table-btns", { ref: "tbBtnRef", attrs: { instance: { tableRef: e.instance, formInstance: e.formInstance }, "btn-config": e.options.configBtn, "left-text": e.options.leftText } }) : e._e(), o("el-table", e._b({ key: e.tableId, ref: "tableRef", staticClass: "el-dp_tables", staticStyle: { width: "100%" }, attrs: { id: e.tableId, data: e.effectiveDataSource }, on: { "sort-change": e.changeTableSort, "selection-change": e.handleTableSelectionChange }, scopedSlots: e._u([{ key: "empty", fn: function() {
|
|
1437
1453
|
return [o("div", { staticClass: "ant-empty ant-empty-normal" }, [o("div", { staticClass: "ant-empty-image" }, [o("svg", { staticClass: "ant-empty-img-simple", attrs: { width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg" } }, [o("g", { attrs: { transform: "translate(0 1)", fill: "none", "fill-rule": "evenodd" } }, [o("ellipse", { staticClass: "ant-empty-img-simple-ellipse", attrs: { cx: "32", cy: "33", rx: "32", ry: "7" } }), o("g", { staticClass: "ant-empty-img-simple-g", attrs: { "fill-rule": "nonzero" } }, [o("path", { attrs: { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" } }), o("path", { staticClass: "ant-empty-img-simple-path", attrs: { d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" } })])])])]), o("div", { staticClass: "ant-empty-description" }, [e._v("暂无数据")])])];
|
|
@@ -1448,7 +1464,7 @@ var nn = function() {
|
|
|
1448
1464
|
})
|
|
1449
1465
|
)];
|
|
1450
1466
|
} } : null], null, !0) });
|
|
1451
|
-
}), 1)], 1)]), e.showPagination ? o("div", { ref: "paginationRef", staticClass: "pagination_page" }, [o("el-pagination", { staticStyle: { padding: "0", margin: "10px 0", "text-align": "center" }, attrs: { background: e.paginationBackground, size: e.paginationIsSmall ? "small" : e.paginationConfig.size, total: e.paginationConfig.total, "page-size": e.paginationConfig.pageSize, "page-sizes": e.paginationPageSizes, "current-page": e.paginationConfig.current, layout: e.layout }, on: { "update:pageSize": function(t) {
|
|
1467
|
+
}), 1)], 1)]), e.showPagination ? o("div", { ref: "paginationRef", staticClass: "pagination_page" }, [o("el-pagination", { staticStyle: { padding: "0", margin: "10px 0", "text-align": "center" }, attrs: { background: e.paginationBackground, size: e.paginationIsSmall ? "small" : e.paginationConfig.size, total: e.paginationConfig.total, "page-size": e.paginationConfig.pageSize, "page-sizes": e.paginationPageSizes, "current-page": e.paginationConfig.current, layout: e.layout, "prev-text": e.paginationPrevText, "next-text": e.paginationNextText }, on: { "update:pageSize": function(t) {
|
|
1452
1468
|
return e.$set(e.paginationConfig, "pageSize", t);
|
|
1453
1469
|
}, "update:page-size": function(t) {
|
|
1454
1470
|
return e.$set(e.paginationConfig, "pageSize", t);
|
|
@@ -1457,19 +1473,19 @@ var nn = function() {
|
|
|
1457
1473
|
}, "update:current-page": function(t) {
|
|
1458
1474
|
return e.$set(e.paginationConfig, "current", t);
|
|
1459
1475
|
}, "size-change": e.handleSizeChange, "current-change": e.handleIndexChange } })], 1) : e._e()])]);
|
|
1460
|
-
},
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1476
|
+
}, hn = [], vn = /* @__PURE__ */ ge(
|
|
1477
|
+
gn,
|
|
1478
|
+
yn,
|
|
1479
|
+
hn,
|
|
1464
1480
|
!1,
|
|
1465
1481
|
null,
|
|
1466
|
-
"
|
|
1482
|
+
"8e292dd6"
|
|
1467
1483
|
);
|
|
1468
|
-
const
|
|
1469
|
-
|
|
1470
|
-
n.component(
|
|
1484
|
+
const ke = vn.exports;
|
|
1485
|
+
ke.install = function(n) {
|
|
1486
|
+
n.component(ke.name || "EsTable", ke);
|
|
1471
1487
|
};
|
|
1472
|
-
const
|
|
1488
|
+
const bn = ie({
|
|
1473
1489
|
name: "RenderJsx",
|
|
1474
1490
|
props: {
|
|
1475
1491
|
refs: { type: [Function, Object], default: null },
|
|
@@ -1481,43 +1497,43 @@ const rn = ae({
|
|
|
1481
1497
|
components: { type: Object, default: () => ({}) }
|
|
1482
1498
|
},
|
|
1483
1499
|
setup(n) {
|
|
1484
|
-
const e = n.refs && typeof n.refs == "object" ? n.refs :
|
|
1500
|
+
const e = n.refs && typeof n.refs == "object" ? n.refs : ze({});
|
|
1485
1501
|
let o = null;
|
|
1486
1502
|
function t() {
|
|
1487
1503
|
if (!o) return;
|
|
1488
1504
|
const i = o.componentInstance;
|
|
1489
1505
|
i && (e.currentRef = i);
|
|
1490
1506
|
}
|
|
1491
|
-
return
|
|
1507
|
+
return Ue(() => t()), Et(() => t()), () => {
|
|
1492
1508
|
const { instance: i } = n, l = {
|
|
1493
1509
|
...i,
|
|
1494
|
-
registerRef: (
|
|
1495
|
-
d != null && (e[
|
|
1510
|
+
registerRef: (k, d) => {
|
|
1511
|
+
d != null && (e[k] = d);
|
|
1496
1512
|
},
|
|
1497
1513
|
getRefs: () => e
|
|
1498
|
-
}, c = n.render,
|
|
1499
|
-
return typeof
|
|
1514
|
+
}, c = n.render, B = c && typeof c == "function" ? c(ue, l, n.components || {}) : "";
|
|
1515
|
+
return typeof B == "string" || typeof B == "number" ? (o = null, ue(
|
|
1500
1516
|
"span",
|
|
1501
1517
|
{
|
|
1502
1518
|
ref: "currentRef"
|
|
1503
1519
|
// Vue 2 的函数式 ref 通过 v-bind 不可直接传,用以下方式赋值
|
|
1504
1520
|
},
|
|
1505
|
-
[String(
|
|
1506
|
-
)) :
|
|
1521
|
+
[String(B)]
|
|
1522
|
+
)) : B && typeof B == "object" && "tag" in B ? B.componentOptions ? (o = B, B) : (o = null, ue("div", [B])) : (o = null, ue("div", [String(B || "")]));
|
|
1507
1523
|
};
|
|
1508
1524
|
}
|
|
1509
|
-
}),
|
|
1510
|
-
var
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1525
|
+
}), _n = null, Cn = null;
|
|
1526
|
+
var Sn = /* @__PURE__ */ ge(
|
|
1527
|
+
bn,
|
|
1528
|
+
_n,
|
|
1529
|
+
Cn,
|
|
1514
1530
|
!1,
|
|
1515
1531
|
null,
|
|
1516
1532
|
null
|
|
1517
1533
|
);
|
|
1518
|
-
const
|
|
1534
|
+
const Bn = Sn.exports, kn = ie({
|
|
1519
1535
|
name: "EsDialog",
|
|
1520
|
-
components: { RenderJsx:
|
|
1536
|
+
components: { RenderJsx: Bn },
|
|
1521
1537
|
inheritAttrs: !1,
|
|
1522
1538
|
props: {
|
|
1523
1539
|
title: { type: String, default: "" },
|
|
@@ -1547,101 +1563,101 @@ const un = cn.exports, dn = ae({
|
|
|
1547
1563
|
emits: ["update:visible", "closed", "submit"],
|
|
1548
1564
|
setup(n, { emit: e, attrs: o, slots: t, expose: i }) {
|
|
1549
1565
|
var w, A;
|
|
1550
|
-
const l =
|
|
1566
|
+
const l = Ke(), c = z(null), B = ze({}), k = z(!1), d = l, g = (A = (w = ce("$EsPlus", null)) != null ? w : me()) != null ? A : {}, a = (x) => {
|
|
1551
1567
|
if (!x) return !0;
|
|
1552
|
-
const
|
|
1553
|
-
return typeof
|
|
1568
|
+
const E = g.permission;
|
|
1569
|
+
return typeof E == "function" ? E(x) : !0;
|
|
1554
1570
|
}, f = (x) => {
|
|
1555
1571
|
const {
|
|
1556
|
-
icon:
|
|
1572
|
+
icon: E,
|
|
1557
1573
|
click: Q,
|
|
1558
|
-
permissionValue:
|
|
1559
|
-
name:
|
|
1560
|
-
disabled:
|
|
1561
|
-
key:
|
|
1562
|
-
...
|
|
1574
|
+
permissionValue: q,
|
|
1575
|
+
name: se,
|
|
1576
|
+
disabled: re,
|
|
1577
|
+
key: ne,
|
|
1578
|
+
..._e
|
|
1563
1579
|
} = x;
|
|
1564
|
-
return
|
|
1580
|
+
return _e;
|
|
1565
1581
|
}, p = (x) => {
|
|
1566
|
-
const
|
|
1567
|
-
return typeof
|
|
1582
|
+
const E = x.disabled;
|
|
1583
|
+
return typeof E == "function" ? E() : !!E;
|
|
1568
1584
|
}, b = () => {
|
|
1569
1585
|
setTimeout(() => {
|
|
1570
|
-
|
|
1586
|
+
k.value && (k.value = !1);
|
|
1571
1587
|
}, 500);
|
|
1572
1588
|
}, y = () => {
|
|
1573
|
-
o != null && o.fullscreen || (
|
|
1574
|
-
}, _ =
|
|
1589
|
+
o != null && o.fullscreen || (k.value = !k.value);
|
|
1590
|
+
}, _ = S({
|
|
1575
1591
|
get: () => n.visible || !1,
|
|
1576
1592
|
set: (x) => {
|
|
1577
1593
|
e("update:visible", x), x || (e("closed", x), b());
|
|
1578
1594
|
}
|
|
1579
|
-
}),
|
|
1595
|
+
}), L = () => {
|
|
1580
1596
|
_.value = !1, e("closed", !1), b();
|
|
1581
|
-
},
|
|
1597
|
+
}, j = () => {
|
|
1582
1598
|
e("closed", !1), b();
|
|
1583
1599
|
}, N = () => {
|
|
1584
1600
|
}, M = (x) => {
|
|
1585
1601
|
x();
|
|
1586
|
-
}, V =
|
|
1602
|
+
}, V = S(() => ({ ...o })), W = S(() => k.value ? "dialogFull" : n.maxHeight ? "dialogShadow" : "dialogAuto"), U = () => {
|
|
1587
1603
|
const x = typeof window != "undefined" ? window.innerHeight : 800;
|
|
1588
1604
|
return Math.max(x - 135, 200);
|
|
1589
|
-
}, J =
|
|
1590
|
-
const x =
|
|
1591
|
-
return
|
|
1605
|
+
}, J = S(() => {
|
|
1606
|
+
const x = U();
|
|
1607
|
+
return k.value ? { height: x + "px" } : n.maxHeight ? {
|
|
1592
1608
|
maxHeight: typeof n.maxHeight == "number" ? `${n.maxHeight}px` : n.maxHeight
|
|
1593
1609
|
} : { maxHeight: x + "px" };
|
|
1594
|
-
}),
|
|
1595
|
-
renderBodyRefs:
|
|
1596
|
-
renderBodyRefsObject:
|
|
1610
|
+
}), R = S(() => ({
|
|
1611
|
+
renderBodyRefs: B.currentRef,
|
|
1612
|
+
renderBodyRefsObject: B,
|
|
1597
1613
|
lyFormInstance: c,
|
|
1598
1614
|
dialogInstance: d,
|
|
1599
|
-
getRefs: () =>
|
|
1600
|
-
})),
|
|
1601
|
-
const
|
|
1602
|
-
typeof
|
|
1603
|
-
close:
|
|
1604
|
-
getRefs: (Q) => Q ?
|
|
1615
|
+
getRefs: () => B
|
|
1616
|
+
})), r = (x) => {
|
|
1617
|
+
const E = x.click;
|
|
1618
|
+
typeof E == "function" && E(B.currentRef, {
|
|
1619
|
+
close: L,
|
|
1620
|
+
getRefs: (Q) => Q ? B[Q] || null : B,
|
|
1605
1621
|
dialogInstance: d
|
|
1606
1622
|
});
|
|
1607
1623
|
};
|
|
1608
|
-
|
|
1624
|
+
dt("bodyFormInstance", (x) => {
|
|
1609
1625
|
c.value = x;
|
|
1610
1626
|
});
|
|
1611
|
-
const u =
|
|
1627
|
+
const u = S(() => ({
|
|
1612
1628
|
...n.components
|
|
1613
1629
|
})), h = {
|
|
1614
|
-
closed:
|
|
1630
|
+
closed: L
|
|
1615
1631
|
};
|
|
1616
1632
|
return typeof i == "function" && i(h), {
|
|
1617
1633
|
// state
|
|
1618
1634
|
dialogVisible: _,
|
|
1619
|
-
isFullscreen:
|
|
1635
|
+
isFullscreen: k,
|
|
1620
1636
|
lyFormInstance: c,
|
|
1621
|
-
renderBodyRefsObject:
|
|
1637
|
+
renderBodyRefsObject: B,
|
|
1622
1638
|
// computeds
|
|
1623
1639
|
filteredAttrs: V,
|
|
1624
|
-
initDialogCls:
|
|
1640
|
+
initDialogCls: W,
|
|
1625
1641
|
initDialogHeight: J,
|
|
1626
|
-
getCurrentInstanceModel:
|
|
1642
|
+
getCurrentInstanceModel: R,
|
|
1627
1643
|
dialogComponents: u,
|
|
1628
1644
|
// methods
|
|
1629
|
-
handleClose:
|
|
1645
|
+
handleClose: L,
|
|
1630
1646
|
handleFullscreen: y,
|
|
1631
|
-
handleBtnClick:
|
|
1632
|
-
onDialogClose:
|
|
1647
|
+
handleBtnClick: r,
|
|
1648
|
+
onDialogClose: j,
|
|
1633
1649
|
onDialogClosed: N,
|
|
1634
1650
|
beforeCloseHandler: M,
|
|
1635
1651
|
checkPermission: a,
|
|
1636
1652
|
filterOptions: f,
|
|
1637
1653
|
getDisabled: p,
|
|
1638
|
-
getCompIcon:
|
|
1654
|
+
getCompIcon: ft,
|
|
1639
1655
|
// exposed
|
|
1640
1656
|
...h
|
|
1641
1657
|
};
|
|
1642
1658
|
}
|
|
1643
1659
|
});
|
|
1644
|
-
var
|
|
1660
|
+
var xn = function() {
|
|
1645
1661
|
var e = this, o = e._self._c;
|
|
1646
1662
|
return e._self._setupProxy, o("div", { staticClass: "dp-dialog_wrapper" }, [o("el-dialog", e._b({ class: ["dg-dialog", e.initDialogCls], attrs: { visible: e.dialogVisible, width: typeof e.width == "number" ? e.width + "px" : e.width, "show-close": !1, fullscreen: e.filteredAttrs && e.filteredAttrs.fullscreen != null ? e.filteredAttrs.fullscreen : e.isFullscreen, "append-to-body": e.appendToBody, "modal-append-to-body": e.modalAppendToBody, "close-on-click-modal": e.closeOnClickModal, "close-on-press-escape": e.closeOnPressEscape, "destroy-on-close": e.destroyOnClose, "before-close": e.beforeCloseHandler }, on: { "update:visible": function(t) {
|
|
1647
1663
|
e.dialogVisible = t;
|
|
@@ -1652,15 +1668,15 @@ var fn = function() {
|
|
|
1652
1668
|
return [e.checkPermission(t.permissionValue) ? o("el-button", e._b({ key: t.key || i, attrs: { size: "small", icon: e.getCompIcon(t.icon), disabled: e.getDisabled(t) }, on: { click: () => e.handleBtnClick(t) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")]) : e._e()];
|
|
1653
1669
|
})] : e._e()], 2)];
|
|
1654
1670
|
}, proxy: !0 }], null, !0) }, "el-dialog", e.filteredAttrs, !1), [o("div", { staticClass: "dialog_body_layouts", style: e.initDialogHeight }, [e.render && typeof e.render == "function" ? o("render-jsx", { attrs: { refs: e.renderBodyRefsObject, instance: e.getCurrentInstanceModel, render: e.render, components: e.dialogComponents } }) : e._e()], 1)])], 1);
|
|
1655
|
-
},
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1671
|
+
}, Fn = [], In = /* @__PURE__ */ ge(
|
|
1672
|
+
kn,
|
|
1673
|
+
xn,
|
|
1674
|
+
Fn,
|
|
1659
1675
|
!1,
|
|
1660
1676
|
null,
|
|
1661
1677
|
"1f2694c2"
|
|
1662
1678
|
);
|
|
1663
|
-
const
|
|
1679
|
+
const xe = In.exports, Rn = (n) => typeof n == "string" ? document.querySelector(n) || document.body : n instanceof HTMLElement ? n : document.body, On = (n) => {
|
|
1664
1680
|
const e = {}, o = {};
|
|
1665
1681
|
return Object.entries(n).forEach(([t, i]) => {
|
|
1666
1682
|
if (t.startsWith("on") && typeof i == "function" && t.length > 2) {
|
|
@@ -1669,14 +1685,14 @@ const ke = mn.exports, gn = (n) => typeof n == "string" ? document.querySelector
|
|
|
1669
1685
|
} else
|
|
1670
1686
|
o[t] = i;
|
|
1671
1687
|
}), { propsData: o, events: e };
|
|
1672
|
-
},
|
|
1673
|
-
const { propsData: t, events: i } =
|
|
1674
|
-
return Object.entries(i).forEach(([
|
|
1675
|
-
c.$on(
|
|
1676
|
-
}), c.$mount(),
|
|
1688
|
+
}, lt = (n, e, o) => {
|
|
1689
|
+
const { propsData: t, events: i } = On(e), l = ct.extend(n), c = new l({ propsData: t });
|
|
1690
|
+
return Object.entries(i).forEach(([k, d]) => {
|
|
1691
|
+
c.$on(k, d);
|
|
1692
|
+
}), c.$mount(), Rn(o).appendChild(c.$el), c;
|
|
1677
1693
|
};
|
|
1678
1694
|
function Ee(n, e = {}) {
|
|
1679
|
-
if (n = n ||
|
|
1695
|
+
if (n = n || xe, Object.assign({ onlyInstance: !1 }, e).onlyInstance) {
|
|
1680
1696
|
let t = null;
|
|
1681
1697
|
const i = () => {
|
|
1682
1698
|
t && (t.visible = !1, setTimeout(() => {
|
|
@@ -1684,12 +1700,12 @@ function Ee(n, e = {}) {
|
|
|
1684
1700
|
}, 300));
|
|
1685
1701
|
}, l = (c) => {
|
|
1686
1702
|
c.visible === void 0 && (c.visible = !0);
|
|
1687
|
-
const
|
|
1703
|
+
const B = c.onClosed, k = c.onSubmit;
|
|
1688
1704
|
return c.onClosed = (...d) => {
|
|
1689
|
-
|
|
1705
|
+
B == null || B(...d), i();
|
|
1690
1706
|
}, c.onSubmit = (d = i) => {
|
|
1691
|
-
|
|
1692
|
-
}, t =
|
|
1707
|
+
k == null || k(d);
|
|
1708
|
+
}, t = lt(n, c, c.appendTo), t;
|
|
1693
1709
|
};
|
|
1694
1710
|
return l.close = i, l;
|
|
1695
1711
|
} else {
|
|
@@ -1698,32 +1714,32 @@ function Ee(n, e = {}) {
|
|
|
1698
1714
|
t && (t.visible = !1);
|
|
1699
1715
|
}, l = () => {
|
|
1700
1716
|
t && (t.$destroy(), t.$el && t.$el.parentNode && t.$el.parentNode.removeChild(t.$el), t = null);
|
|
1701
|
-
}, c = (
|
|
1717
|
+
}, c = (B) => {
|
|
1702
1718
|
if (t)
|
|
1703
|
-
return Object.entries(
|
|
1719
|
+
return Object.entries(B).forEach(([a, f]) => {
|
|
1704
1720
|
a.startsWith("on") || (t[a] = f);
|
|
1705
1721
|
}), t.visible = !0, t;
|
|
1706
|
-
const
|
|
1722
|
+
const k = {
|
|
1707
1723
|
visible: !0,
|
|
1708
1724
|
width: "50%",
|
|
1709
1725
|
destroyOnClose: !0,
|
|
1710
|
-
...
|
|
1711
|
-
}, d =
|
|
1712
|
-
return
|
|
1726
|
+
...B
|
|
1727
|
+
}, d = k.onClosed, g = k.onSubmit;
|
|
1728
|
+
return k.onClosed = () => {
|
|
1713
1729
|
d == null || d(), i();
|
|
1714
|
-
},
|
|
1730
|
+
}, k.onSubmit = (a = i) => {
|
|
1715
1731
|
g == null || g(a);
|
|
1716
|
-
}, t =
|
|
1732
|
+
}, t = lt(n, k, k.appendTo), t;
|
|
1717
1733
|
};
|
|
1718
1734
|
return c.close = i, c.destroy = l, c;
|
|
1719
1735
|
}
|
|
1720
1736
|
}
|
|
1721
|
-
|
|
1722
|
-
n.component(
|
|
1737
|
+
xe.install = function(n) {
|
|
1738
|
+
n.component(xe.name || "EsDialog", xe), n.prototype.$useDialog = Ee;
|
|
1723
1739
|
};
|
|
1724
|
-
const
|
|
1740
|
+
const wn = ie({
|
|
1725
1741
|
name: "EsCrudPage",
|
|
1726
|
-
components: { EsForm:
|
|
1742
|
+
components: { EsForm: be, EsTable: ke },
|
|
1727
1743
|
inheritAttrs: !1,
|
|
1728
1744
|
props: {
|
|
1729
1745
|
schema: { type: Object, required: !0 },
|
|
@@ -1747,63 +1763,63 @@ const hn = ae({
|
|
|
1747
1763
|
"dialog-open"
|
|
1748
1764
|
],
|
|
1749
1765
|
setup(n, { emit: e, expose: o }) {
|
|
1750
|
-
const t = z(null), i = z(null), l = z([]), c =
|
|
1751
|
-
|
|
1766
|
+
const t = z(null), i = z(null), l = z([]), c = ze({});
|
|
1767
|
+
de(
|
|
1752
1768
|
() => n.schema.formItems,
|
|
1753
|
-
(
|
|
1754
|
-
|
|
1769
|
+
(r) => {
|
|
1770
|
+
r && r.forEach((u) => {
|
|
1755
1771
|
u.prop && !(u.prop in c) && (c[u.prop] = "");
|
|
1756
1772
|
});
|
|
1757
1773
|
},
|
|
1758
1774
|
{ immediate: !0 }
|
|
1759
1775
|
);
|
|
1760
|
-
const
|
|
1776
|
+
const B = z({
|
|
1761
1777
|
current: 1,
|
|
1762
1778
|
pageSize: 10,
|
|
1763
1779
|
total: 0,
|
|
1764
1780
|
...n.schema.pagination || {}
|
|
1765
|
-
}),
|
|
1781
|
+
}), k = S(() => {
|
|
1766
1782
|
var w, A;
|
|
1767
1783
|
if (n.schema.dialogs) return n.schema.dialogs;
|
|
1768
1784
|
if (!((w = n.schema.dialogFormItems) != null && w.length)) return {};
|
|
1769
|
-
const
|
|
1785
|
+
const r = {
|
|
1770
1786
|
width: ((A = n.schema.dialogOptions) == null ? void 0 : A.width) || "600px",
|
|
1771
1787
|
formItems: n.schema.dialogFormItems,
|
|
1772
1788
|
...n.schema.dialogOptions || {}
|
|
1773
1789
|
}, u = {}, h = n.schema.actions || ["add", "edit", "delete"];
|
|
1774
|
-
return h.includes("add") && (u.add = { ...
|
|
1775
|
-
}), d =
|
|
1790
|
+
return h.includes("add") && (u.add = { ...r, title: "新增" }), h.includes("edit") && (u.edit = { ...r, title: "编辑" }), h.includes("view") && (u.view = { ...r, title: "查看", isHiddenFooter: !0 }), u;
|
|
1791
|
+
}), d = S(() => {
|
|
1776
1792
|
if (n.schema.toolbarBtns) return n.schema.toolbarBtns;
|
|
1777
1793
|
if (n.schema.dialogs || n.schema.operationColumn !== void 0) return [];
|
|
1778
|
-
const
|
|
1779
|
-
return
|
|
1794
|
+
const r = n.schema.actions || ["add", "edit", "delete"], u = [];
|
|
1795
|
+
return r.includes("add") && u.push({
|
|
1780
1796
|
name: "新增",
|
|
1781
1797
|
type: "primary",
|
|
1782
1798
|
key: "add",
|
|
1783
1799
|
icon: "Plus",
|
|
1784
1800
|
dialogKey: "add"
|
|
1785
|
-
}),
|
|
1801
|
+
}), r.includes("export") && u.push({
|
|
1786
1802
|
name: "导出",
|
|
1787
1803
|
key: "export",
|
|
1788
1804
|
icon: "Download",
|
|
1789
1805
|
actionType: "export"
|
|
1790
|
-
}),
|
|
1806
|
+
}), r.includes("import") && u.push({
|
|
1791
1807
|
name: "导入",
|
|
1792
1808
|
key: "import",
|
|
1793
1809
|
icon: "Upload",
|
|
1794
1810
|
actionType: "import"
|
|
1795
1811
|
}), u;
|
|
1796
|
-
}), g =
|
|
1812
|
+
}), g = S(
|
|
1797
1813
|
() => {
|
|
1798
1814
|
var A;
|
|
1799
1815
|
if (n.schema.operationColumn !== void 0) return n.schema.operationColumn;
|
|
1800
|
-
const
|
|
1816
|
+
const r = n.schema.actions || ["add", "edit", "delete"];
|
|
1801
1817
|
if ((A = n.schema.columns) == null ? void 0 : A.some(
|
|
1802
1818
|
(x) => x.prop === "action" || x.prop === "operate" || x.btns
|
|
1803
1819
|
)) return;
|
|
1804
|
-
if (
|
|
1820
|
+
if (r.filter((x) => ["edit", "delete", "view"].includes(x)).length === 0) return !1;
|
|
1805
1821
|
const w = [];
|
|
1806
|
-
return
|
|
1822
|
+
return r.includes("view") && w.push({ name: "查看", type: "primary", key: "view", dialogKey: "view" }), r.includes("edit") && w.push({ name: "编辑", type: "primary", key: "edit", dialogKey: "edit" }), r.includes("delete") && w.push({
|
|
1807
1823
|
name: "删除",
|
|
1808
1824
|
type: "danger",
|
|
1809
1825
|
key: "delete",
|
|
@@ -1815,35 +1831,35 @@ const hn = ae({
|
|
|
1815
1831
|
btns: w
|
|
1816
1832
|
};
|
|
1817
1833
|
}
|
|
1818
|
-
), a =
|
|
1834
|
+
), a = S(() => {
|
|
1819
1835
|
if (n.schema.queryBtns) return n.schema.queryBtns;
|
|
1820
|
-
const
|
|
1836
|
+
const r = [
|
|
1821
1837
|
{ name: "查询", type: "primary", key: "query", triggerEvent: !0 },
|
|
1822
1838
|
{ name: "重置", key: "rest", triggerEvent: !0 }
|
|
1823
1839
|
], u = d.value.map((h) => {
|
|
1824
1840
|
const w = { ...h };
|
|
1825
1841
|
return w.click || (w.click = () => _(h)), w;
|
|
1826
1842
|
});
|
|
1827
|
-
return [...
|
|
1828
|
-
}), f =
|
|
1829
|
-
const
|
|
1830
|
-
if (u === !1 || u === void 0) return
|
|
1843
|
+
return [...r, ...u];
|
|
1844
|
+
}), f = S(() => {
|
|
1845
|
+
const r = [...n.schema.columns || []], u = g.value;
|
|
1846
|
+
if (u === !1 || u === void 0) return r;
|
|
1831
1847
|
const h = u.btns.map((w) => ({
|
|
1832
1848
|
name: w.name,
|
|
1833
1849
|
type: w.type,
|
|
1834
1850
|
permissionValue: w.permissionValue,
|
|
1835
|
-
clickEvent: (A) =>
|
|
1851
|
+
clickEvent: (A) => L(w, A)
|
|
1836
1852
|
}));
|
|
1837
|
-
return
|
|
1853
|
+
return r.push({
|
|
1838
1854
|
prop: "operate",
|
|
1839
1855
|
label: u.label || "操作",
|
|
1840
1856
|
width: u.width || h.length * 80 + 20,
|
|
1841
1857
|
fixed: u.fixed || "right",
|
|
1842
1858
|
btns: h
|
|
1843
|
-
}),
|
|
1844
|
-
}), p =
|
|
1845
|
-
var
|
|
1846
|
-
return (
|
|
1859
|
+
}), r;
|
|
1860
|
+
}), p = S(() => {
|
|
1861
|
+
var r;
|
|
1862
|
+
return (r = n.schema.tableBtns) != null && r.length ? n.schema.tableBtns.map((u) => ({
|
|
1847
1863
|
name: u.name,
|
|
1848
1864
|
type: u.type,
|
|
1849
1865
|
size: u.size || "small",
|
|
@@ -1854,82 +1870,82 @@ const hn = ae({
|
|
|
1854
1870
|
disabled: u.disabled,
|
|
1855
1871
|
click: () => _(u)
|
|
1856
1872
|
})) : [];
|
|
1857
|
-
}), b =
|
|
1858
|
-
const
|
|
1873
|
+
}), b = S(() => {
|
|
1874
|
+
const r = {
|
|
1859
1875
|
border: !0,
|
|
1860
1876
|
isInitRun: n.autoLoad,
|
|
1861
1877
|
...n.schema.tableOptions || {}
|
|
1862
1878
|
};
|
|
1863
|
-
n.httpRequest && (
|
|
1879
|
+
n.httpRequest && (r.httpRequest = n.httpRequest);
|
|
1864
1880
|
const u = p.value;
|
|
1865
1881
|
if (u.length > 0) {
|
|
1866
|
-
const h =
|
|
1867
|
-
|
|
1882
|
+
const h = r.configBtn || [];
|
|
1883
|
+
r.configBtn = [...h, ...u];
|
|
1868
1884
|
}
|
|
1869
|
-
return
|
|
1870
|
-
}), y =
|
|
1871
|
-
const
|
|
1872
|
-
if (
|
|
1885
|
+
return r;
|
|
1886
|
+
}), y = S(() => {
|
|
1887
|
+
const r = n.schema.formLayout;
|
|
1888
|
+
if (r)
|
|
1873
1889
|
return {
|
|
1874
1890
|
rowLayProps: { gutter: 16 },
|
|
1875
1891
|
formLayProps: {
|
|
1876
|
-
labelBtnWidth:
|
|
1877
|
-
...
|
|
1892
|
+
labelBtnWidth: r.labelWidth,
|
|
1893
|
+
...r.minFoldRows ? { minFoldRows: r.minFoldRows } : {}
|
|
1878
1894
|
}
|
|
1879
1895
|
};
|
|
1880
1896
|
});
|
|
1881
|
-
async function _(
|
|
1882
|
-
const u =
|
|
1883
|
-
if (
|
|
1884
|
-
const h = typeof
|
|
1897
|
+
async function _(r) {
|
|
1898
|
+
const u = r.key || r.actionType || "";
|
|
1899
|
+
if (r.confirm) {
|
|
1900
|
+
const h = typeof r.confirm == "string" ? r.confirm : "确定执行此操作吗?";
|
|
1885
1901
|
try {
|
|
1886
|
-
await
|
|
1902
|
+
await ot.confirm(h, "提示", { type: "warning" });
|
|
1887
1903
|
} catch (w) {
|
|
1888
1904
|
return;
|
|
1889
1905
|
}
|
|
1890
1906
|
}
|
|
1891
|
-
if (
|
|
1892
|
-
u === "add" && e("add"), N(
|
|
1907
|
+
if (r.dialogKey) {
|
|
1908
|
+
u === "add" && e("add"), N(r.dialogKey);
|
|
1893
1909
|
return;
|
|
1894
1910
|
}
|
|
1895
|
-
u === "export" ||
|
|
1911
|
+
u === "export" || r.actionType === "export" ? e("export", { ...c }) : u === "add" && e("add"), e("btn-click", u, { ...c });
|
|
1896
1912
|
}
|
|
1897
|
-
async function
|
|
1898
|
-
const h =
|
|
1899
|
-
if (
|
|
1900
|
-
const w = typeof
|
|
1913
|
+
async function L(r, u) {
|
|
1914
|
+
const h = r.key || "";
|
|
1915
|
+
if (r.confirm) {
|
|
1916
|
+
const w = typeof r.confirm == "string" ? r.confirm : "确定执行此操作吗?";
|
|
1901
1917
|
try {
|
|
1902
|
-
await
|
|
1918
|
+
await ot.confirm(w, "提示", { type: "warning" });
|
|
1903
1919
|
} catch (A) {
|
|
1904
1920
|
return;
|
|
1905
1921
|
}
|
|
1906
1922
|
}
|
|
1907
|
-
if (
|
|
1908
|
-
|
|
1923
|
+
if (r.click) {
|
|
1924
|
+
r.click(u, { refresh: U, getSelectedRows: J, openDialog: N });
|
|
1909
1925
|
return;
|
|
1910
1926
|
}
|
|
1911
|
-
if (
|
|
1912
|
-
N(
|
|
1927
|
+
if (r.dialogKey) {
|
|
1928
|
+
N(r.dialogKey, u);
|
|
1913
1929
|
return;
|
|
1914
1930
|
}
|
|
1915
1931
|
h === "edit" ? e("edit", u) : h === "delete" ? e("delete", u) : h === "view" && e("view", u), e("btn-click", h, u);
|
|
1916
1932
|
}
|
|
1917
|
-
const
|
|
1918
|
-
function N(
|
|
1933
|
+
const j = /* @__PURE__ */ new Map();
|
|
1934
|
+
function N(r, u) {
|
|
1919
1935
|
var Q;
|
|
1920
|
-
const h =
|
|
1936
|
+
const h = k.value[r];
|
|
1921
1937
|
if (!h) return;
|
|
1922
|
-
e("dialog-open",
|
|
1938
|
+
e("dialog-open", r, u);
|
|
1923
1939
|
const w = Ee();
|
|
1924
|
-
|
|
1925
|
-
const A =
|
|
1926
|
-
h.formItems && h.formItems.forEach((
|
|
1927
|
-
var
|
|
1928
|
-
|
|
1940
|
+
j.set(r, w);
|
|
1941
|
+
const A = ze({});
|
|
1942
|
+
h.formItems && h.formItems.forEach((q) => {
|
|
1943
|
+
var se;
|
|
1944
|
+
q.prop && (A[q.prop] = (se = u == null ? void 0 : u[q.prop]) != null ? se : "");
|
|
1929
1945
|
});
|
|
1930
1946
|
const x = typeof h.title == "function" ? h.title(u) : h.title || "";
|
|
1931
1947
|
(Q = h.onOpen) == null || Q.call(h, u);
|
|
1932
|
-
const
|
|
1948
|
+
const E = V(r, h, A, u || {});
|
|
1933
1949
|
w({
|
|
1934
1950
|
title: x,
|
|
1935
1951
|
width: h.width || "600px",
|
|
@@ -1938,14 +1954,14 @@ const hn = ae({
|
|
|
1938
1954
|
fullscreen: h.fullscreen,
|
|
1939
1955
|
isHiddenFooter: h.isHiddenFooter,
|
|
1940
1956
|
// 用户自定义 render
|
|
1941
|
-
render: h.render ? (
|
|
1957
|
+
render: h.render ? (q, se) => h.render(q, {
|
|
1942
1958
|
row: u || {},
|
|
1943
1959
|
model: A,
|
|
1944
|
-
registerRef:
|
|
1945
|
-
close: () => M(
|
|
1946
|
-
refresh:
|
|
1947
|
-
}) : h.formItems ? (
|
|
1948
|
-
const
|
|
1960
|
+
registerRef: se.registerRef,
|
|
1961
|
+
close: () => M(r),
|
|
1962
|
+
refresh: U
|
|
1963
|
+
}) : h.formItems ? (q, { registerRef: se }) => {
|
|
1964
|
+
const re = q(be, {
|
|
1949
1965
|
props: {
|
|
1950
1966
|
model: A,
|
|
1951
1967
|
formItemList: h.formItems,
|
|
@@ -1960,75 +1976,75 @@ const hn = ae({
|
|
|
1960
1976
|
// Vue 2 函数式 ref:通过 RenderJsx 暴露的 registerRef 注册
|
|
1961
1977
|
ref: "dialogForm"
|
|
1962
1978
|
});
|
|
1963
|
-
return
|
|
1964
|
-
|
|
1965
|
-
}),
|
|
1979
|
+
return re && re.data && (re.data.hook = re.data.hook || {}, re.data.hook.insert = (ne) => {
|
|
1980
|
+
ne.componentInstance && se("dialogForm", ne.componentInstance);
|
|
1981
|
+
}), re;
|
|
1966
1982
|
} : void 0,
|
|
1967
|
-
configBtn:
|
|
1983
|
+
configBtn: E,
|
|
1968
1984
|
// useDialog 的 onClosed 通过 extractEventHandlers 转为 'closed' 事件
|
|
1969
1985
|
onClosed: () => {
|
|
1970
|
-
var
|
|
1971
|
-
|
|
1986
|
+
var q;
|
|
1987
|
+
j.delete(r), (q = h.onClose) == null || q.call(h);
|
|
1972
1988
|
}
|
|
1973
1989
|
});
|
|
1974
1990
|
}
|
|
1975
|
-
function M(
|
|
1976
|
-
const u =
|
|
1977
|
-
u && (u.close(),
|
|
1991
|
+
function M(r) {
|
|
1992
|
+
const u = j.get(r);
|
|
1993
|
+
u && (u.close(), j.delete(r));
|
|
1978
1994
|
}
|
|
1979
|
-
function V(
|
|
1995
|
+
function V(r, u, h, w) {
|
|
1980
1996
|
if (!u.isHiddenFooter)
|
|
1981
1997
|
return u.configBtn ? u.configBtn.map((A) => A.action === "cancel" ? {
|
|
1982
1998
|
...A,
|
|
1983
|
-
click: (x, { close:
|
|
1984
|
-
e("dialog-cancel",
|
|
1999
|
+
click: (x, { close: E }) => {
|
|
2000
|
+
e("dialog-cancel", r), E();
|
|
1985
2001
|
}
|
|
1986
2002
|
} : A.action === "confirm" ? {
|
|
1987
2003
|
...A,
|
|
1988
|
-
click: async (x, { close:
|
|
1989
|
-
await
|
|
2004
|
+
click: async (x, { close: E, getRefs: Q }) => {
|
|
2005
|
+
await W(r, u, h, w, E, Q);
|
|
1990
2006
|
}
|
|
1991
2007
|
} : A) : [
|
|
1992
2008
|
{
|
|
1993
2009
|
name: "取消",
|
|
1994
2010
|
click: (A, { close: x }) => {
|
|
1995
|
-
e("dialog-cancel",
|
|
2011
|
+
e("dialog-cancel", r), x();
|
|
1996
2012
|
}
|
|
1997
2013
|
},
|
|
1998
2014
|
{
|
|
1999
2015
|
name: "确定",
|
|
2000
2016
|
type: "primary",
|
|
2001
|
-
click: async (A, { close: x, getRefs:
|
|
2002
|
-
await
|
|
2017
|
+
click: async (A, { close: x, getRefs: E }) => {
|
|
2018
|
+
await W(r, u, h, w, x, E);
|
|
2003
2019
|
}
|
|
2004
2020
|
}
|
|
2005
2021
|
];
|
|
2006
2022
|
}
|
|
2007
|
-
async function
|
|
2023
|
+
async function W(r, u, h, w, A, x) {
|
|
2008
2024
|
var Q;
|
|
2009
2025
|
if ((Q = u.formItems) != null && Q.length) {
|
|
2010
|
-
const
|
|
2011
|
-
|
|
2026
|
+
const q = x("dialogForm");
|
|
2027
|
+
q != null && q.validate && await q.validate();
|
|
2012
2028
|
}
|
|
2013
|
-
const
|
|
2029
|
+
const E = { close: A, refresh: U, getRefs: x, row: w };
|
|
2014
2030
|
if (u.onConfirm)
|
|
2015
|
-
await u.onConfirm(h,
|
|
2031
|
+
await u.onConfirm(h, E);
|
|
2016
2032
|
else {
|
|
2017
|
-
const
|
|
2018
|
-
e("btn-click",
|
|
2033
|
+
const q = r === "add" ? "add-confirm" : r === "edit" ? "edit-confirm" : `${r}-confirm`;
|
|
2034
|
+
e("btn-click", q, h), A(), U();
|
|
2019
2035
|
}
|
|
2020
|
-
e("dialog-confirm",
|
|
2036
|
+
e("dialog-confirm", r, h);
|
|
2021
2037
|
}
|
|
2022
|
-
function
|
|
2023
|
-
var
|
|
2024
|
-
(u = (
|
|
2038
|
+
function U() {
|
|
2039
|
+
var r, u;
|
|
2040
|
+
(u = (r = t.value) == null ? void 0 : r.httpRequestInstance) == null || u.call(r);
|
|
2025
2041
|
}
|
|
2026
2042
|
function J() {
|
|
2027
|
-
var
|
|
2028
|
-
return ((u = (
|
|
2043
|
+
var r, u;
|
|
2044
|
+
return ((u = (r = t.value) == null ? void 0 : r.getSelectionRows) == null ? void 0 : u.call(r)) || [];
|
|
2029
2045
|
}
|
|
2030
|
-
const
|
|
2031
|
-
refresh:
|
|
2046
|
+
const R = {
|
|
2047
|
+
refresh: U,
|
|
2032
2048
|
getSelectedRows: J,
|
|
2033
2049
|
tableRef: t,
|
|
2034
2050
|
formRef: i,
|
|
@@ -2036,24 +2052,24 @@ const hn = ae({
|
|
|
2036
2052
|
openDialog: N,
|
|
2037
2053
|
closeDialog: M
|
|
2038
2054
|
};
|
|
2039
|
-
return typeof o == "function" && o(
|
|
2055
|
+
return typeof o == "function" && o(R), {
|
|
2040
2056
|
// refs
|
|
2041
2057
|
tableRef: t,
|
|
2042
2058
|
formRef: i,
|
|
2043
2059
|
tableData: l,
|
|
2044
2060
|
queryModel: c,
|
|
2045
|
-
paginationState:
|
|
2061
|
+
paginationState: B,
|
|
2046
2062
|
// computeds
|
|
2047
2063
|
mergedColumns: f,
|
|
2048
2064
|
mergedOptions: b,
|
|
2049
2065
|
mergedFormBtns: a,
|
|
2050
2066
|
formLayoutProps: y,
|
|
2051
2067
|
// exposed
|
|
2052
|
-
...
|
|
2068
|
+
...R
|
|
2053
2069
|
};
|
|
2054
2070
|
}
|
|
2055
2071
|
});
|
|
2056
|
-
var
|
|
2072
|
+
var Pn = function() {
|
|
2057
2073
|
var e = this, o = e._self._c;
|
|
2058
2074
|
return e._self._setupProxy, o("div", { staticClass: "es-crud-page" }, [o("es-table", e._b({ ref: "tableRef", attrs: { columns: e.mergedColumns, options: e.mergedOptions, "data-source": e.tableData, pagination: e.paginationState }, on: { "update:dataSource": function(t) {
|
|
2059
2075
|
e.tableData = t;
|
|
@@ -2066,60 +2082,64 @@ var vn = function() {
|
|
|
2066
2082
|
return [e._t(i, null, null, l || {})];
|
|
2067
2083
|
} };
|
|
2068
2084
|
})], null, !0) }, "es-table", e.$attrs, !1), [e.schema.formItems && e.schema.formItems.length ? o("es-form", { ref: "formRef", attrs: { model: e.queryModel, "form-item-list": e.schema.formItems, "config-btn": e.mergedFormBtns, "layout-form-props": e.formLayoutProps } }) : e._e()], 1)], 1);
|
|
2069
|
-
},
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2085
|
+
}, $n = [], Hn = /* @__PURE__ */ ge(
|
|
2086
|
+
wn,
|
|
2087
|
+
Pn,
|
|
2088
|
+
$n,
|
|
2073
2089
|
!1,
|
|
2074
2090
|
null,
|
|
2075
2091
|
"ad1d1cb8"
|
|
2076
2092
|
);
|
|
2077
|
-
const
|
|
2078
|
-
|
|
2093
|
+
const Le = Hn.exports;
|
|
2094
|
+
Le.install = function(n) {
|
|
2079
2095
|
n.component(
|
|
2080
|
-
|
|
2081
|
-
|
|
2096
|
+
Le.name || "EsCrudPage",
|
|
2097
|
+
Le
|
|
2082
2098
|
);
|
|
2083
2099
|
};
|
|
2084
|
-
const
|
|
2100
|
+
const Tn = [be, ke, xe, Le], An = (n) => {
|
|
2085
2101
|
const e = { ...n };
|
|
2086
2102
|
for (const o of ["EsTable", "EsForm", "EsDialog"]) {
|
|
2087
2103
|
const t = e[o];
|
|
2088
2104
|
if (!t || typeof t != "object") continue;
|
|
2089
2105
|
const i = t.methods;
|
|
2090
2106
|
if (i && typeof i == "object") {
|
|
2091
|
-
const { methods: c, ...
|
|
2092
|
-
e[o] = { ...i, ...
|
|
2107
|
+
const { methods: c, ...B } = t;
|
|
2108
|
+
e[o] = { ...i, ...B };
|
|
2093
2109
|
}
|
|
2094
2110
|
const l = e[o];
|
|
2095
2111
|
typeof l.configQueryfieldOutput == "function" && typeof l.configQueryFieldOutput != "function" && (l.configQueryFieldOutput = l.configQueryfieldOutput);
|
|
2096
2112
|
}
|
|
2097
2113
|
return e;
|
|
2098
|
-
},
|
|
2099
|
-
const o =
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2114
|
+
}, Ln = (n, e = {}) => {
|
|
2115
|
+
const o = n.__composition_api_installed__ === !0;
|
|
2116
|
+
ut ? o && console.warn(
|
|
2117
|
+
'[@es-plus/vue2] Vue 2.7+ detected together with @vue/composition-api plugin already installed. This causes setup() to run twice (once natively, once via the polyfill\'s data() wrapper) and will produce "setup binding ... already declared" warnings. Remove `Vue.use(VueCompositionAPI)` from your main.js — Vue 2.7 has Composition API natively.'
|
|
2118
|
+
) : !o && st && n.use(st);
|
|
2119
|
+
const t = An(e);
|
|
2120
|
+
Pt(t), t.skipComponentRegistration || Tn.forEach((i) => {
|
|
2121
|
+
const l = i.name;
|
|
2122
|
+
l && n.component(l, i);
|
|
2123
|
+
}), t.globalProperties !== !1 && (n.prototype.$useDialog = Ee), n.mixin({
|
|
2104
2124
|
provide: {
|
|
2105
2125
|
$EsPlus: {
|
|
2106
2126
|
useDialog: Ee,
|
|
2107
|
-
...
|
|
2127
|
+
...t
|
|
2108
2128
|
}
|
|
2109
2129
|
}
|
|
2110
2130
|
});
|
|
2111
|
-
},
|
|
2112
|
-
version: "1.0
|
|
2113
|
-
install:
|
|
2131
|
+
}, Dn = {
|
|
2132
|
+
version: "1.1.0",
|
|
2133
|
+
install: Ln
|
|
2114
2134
|
};
|
|
2115
2135
|
export {
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2136
|
+
Le as EsCrudPage,
|
|
2137
|
+
xe as EsDialog,
|
|
2138
|
+
be as EsForm,
|
|
2139
|
+
ke as EsTable,
|
|
2140
|
+
Mn as configureEsPlus,
|
|
2141
|
+
Dn as default,
|
|
2142
|
+
Ln as install,
|
|
2123
2143
|
Ee as useDialog
|
|
2124
2144
|
};
|
|
2125
2145
|
//# sourceMappingURL=es-plus-vue2.js.map
|