mwl-components 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EasyButton/index.vue.d.ts +17 -0
- package/dist/EasyFormH/index.vue.d.ts +623 -0
- package/dist/EasyTableH/index.vue.d.ts +114 -0
- package/dist/EasyTableH/tableColumnItem.vue.d.ts +19 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +242 -212
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { configProviderContextKey as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as M, useAttrs as X, ref as Y, resolveComponent as d, createBlock as p, openBlock as r, mergeProps as P, withCtx as i, renderSlot as C, useSlots as V, normalizeClass as Z, createSlots as L, createElementVNode as I, createElementBlock as x, createCommentVNode as E, toDisplayString as $, watch as ee, nextTick as te, computed as O, unref as B, normalizeStyle as U, createTextVNode as j, createVNode as N, mergeModels as ne, useModel as oe, getCurrentInstance as K, Fragment as D, renderList as W, resolveDynamicComponent as H, h as z, inject as ae, onMounted as le, onUnmounted as re, withDirectives as G, vShow as J, normalizeProps as se, guardReactiveProps as ue } from "vue";
|
|
2
|
+
import { configProviderContextKey as ce } from "element-plus";
|
|
3
|
+
const ie = /* @__PURE__ */ M({
|
|
4
|
+
name: "EasyButton",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "index",
|
|
7
|
+
setup(e) {
|
|
8
|
+
const { onClick: n, ...t } = X(), s = Y(!1), c = async () => {
|
|
9
|
+
console.log("Button clicked"), s.value = !0;
|
|
10
|
+
try {
|
|
11
|
+
await n?.();
|
|
12
|
+
} catch (u) {
|
|
13
|
+
console.error("Error in button onClick handler:", u);
|
|
14
|
+
} finally {
|
|
15
|
+
s.value = !1;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return (u, g) => {
|
|
19
|
+
const o = d("el-button");
|
|
20
|
+
return r(), p(o, P(t, {
|
|
21
|
+
loading: s.value,
|
|
22
|
+
onClick: c
|
|
23
|
+
}), {
|
|
24
|
+
default: i(() => [
|
|
25
|
+
C(u.$slots, "default")
|
|
26
|
+
]),
|
|
27
|
+
_: 3
|
|
28
|
+
}, 16, ["loading"]);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}), de = { class: "card-header" }, me = {
|
|
4
32
|
key: 0,
|
|
5
33
|
class: "card-header__message"
|
|
6
|
-
},
|
|
34
|
+
}, pe = /* @__PURE__ */ M({
|
|
7
35
|
name: "ContentWarp",
|
|
8
36
|
__name: "index",
|
|
9
37
|
props: {
|
|
@@ -11,44 +39,44 @@ const ce = { class: "card-header" }, ie = {
|
|
|
11
39
|
message: String
|
|
12
40
|
},
|
|
13
41
|
setup(e) {
|
|
14
|
-
const
|
|
15
|
-
return (s,
|
|
16
|
-
const
|
|
17
|
-
return r(), p(
|
|
18
|
-
class:
|
|
42
|
+
const n = V(), t = Y("content-wrap");
|
|
43
|
+
return (s, c) => {
|
|
44
|
+
const u = d("ElCard");
|
|
45
|
+
return r(), p(u, {
|
|
46
|
+
class: Z([t.value]),
|
|
19
47
|
shadow: "never"
|
|
20
48
|
}, L({
|
|
21
49
|
default: i(() => [
|
|
22
|
-
|
|
50
|
+
C(s.$slots, "default", {}, void 0, !0)
|
|
23
51
|
]),
|
|
24
52
|
_: 2
|
|
25
53
|
}, [
|
|
26
54
|
e.title ? {
|
|
27
55
|
name: "header",
|
|
28
56
|
fn: i(() => [
|
|
29
|
-
I("div",
|
|
30
|
-
I("span", null,
|
|
31
|
-
e.message ? (r(),
|
|
57
|
+
I("div", de, [
|
|
58
|
+
I("span", null, $(e.title), 1),
|
|
59
|
+
e.message ? (r(), x("span", me, $(e.message), 1)) : E("", !0)
|
|
32
60
|
])
|
|
33
61
|
]),
|
|
34
62
|
key: "0"
|
|
35
63
|
} : void 0,
|
|
36
|
-
|
|
64
|
+
n.footer ? {
|
|
37
65
|
name: "footer",
|
|
38
66
|
fn: i(() => [
|
|
39
|
-
|
|
67
|
+
C(s.$slots, "footer", {}, void 0, !0)
|
|
40
68
|
]),
|
|
41
69
|
key: "1"
|
|
42
70
|
} : void 0
|
|
43
71
|
]), 1032, ["class"]);
|
|
44
72
|
};
|
|
45
73
|
}
|
|
46
|
-
}),
|
|
74
|
+
}), F = (e, n) => {
|
|
47
75
|
const t = e.__vccOpts || e;
|
|
48
|
-
for (const [s,
|
|
49
|
-
t[s] =
|
|
76
|
+
for (const [s, c] of n)
|
|
77
|
+
t[s] = c;
|
|
50
78
|
return t;
|
|
51
|
-
},
|
|
79
|
+
}, fe = /* @__PURE__ */ F(pe, [["__scopeId", "data-v-fdaaba5e"]]), ge = { class: "dialog-header" }, he = /* @__PURE__ */ M({
|
|
52
80
|
name: "Dialog",
|
|
53
81
|
__name: "index",
|
|
54
82
|
props: {
|
|
@@ -74,62 +102,62 @@ const ce = { class: "card-header" }, ie = {
|
|
|
74
102
|
}
|
|
75
103
|
},
|
|
76
104
|
setup(e) {
|
|
77
|
-
const
|
|
78
|
-
s.value = !
|
|
79
|
-
},
|
|
80
|
-
|
|
105
|
+
const n = V(), t = e, s = Y(t.fullscreen), c = () => {
|
|
106
|
+
s.value = !B(s);
|
|
107
|
+
}, u = Y(t.maxHeight);
|
|
108
|
+
ee(
|
|
81
109
|
() => s.value,
|
|
82
|
-
async (
|
|
83
|
-
if (await
|
|
84
|
-
const
|
|
85
|
-
|
|
110
|
+
async (o) => {
|
|
111
|
+
if (await te(), o) {
|
|
112
|
+
const a = document.documentElement.offsetHeight;
|
|
113
|
+
u.value = `${a - 55 - 40 - (n.footer ? 63 : 0)}px`;
|
|
86
114
|
} else
|
|
87
|
-
|
|
115
|
+
u.value = t.maxHeight;
|
|
88
116
|
},
|
|
89
117
|
{
|
|
90
118
|
immediate: !0
|
|
91
119
|
}
|
|
92
120
|
);
|
|
93
|
-
const g =
|
|
121
|
+
const g = O(() => {
|
|
94
122
|
if (t.maxHeight)
|
|
95
123
|
return {
|
|
96
|
-
height:
|
|
124
|
+
height: B(u)
|
|
97
125
|
};
|
|
98
126
|
});
|
|
99
|
-
return (
|
|
100
|
-
const f =
|
|
101
|
-
return r(), p(h,
|
|
127
|
+
return (o, a) => {
|
|
128
|
+
const f = d("FullScreen"), k = d("el-icon"), _ = d("ElScrollbar"), h = d("ElDialog");
|
|
129
|
+
return r(), p(h, P({
|
|
102
130
|
"close-on-click-modal": !1,
|
|
103
131
|
"destroy-on-close": "",
|
|
104
132
|
draggable: "",
|
|
105
133
|
"lock-scroll": "",
|
|
106
134
|
class: "custom-dialog",
|
|
107
135
|
"append-to-body": ""
|
|
108
|
-
},
|
|
136
|
+
}, o.$attrs, {
|
|
109
137
|
fullscreen: s.value,
|
|
110
138
|
width: e.width
|
|
111
139
|
}), L({
|
|
112
140
|
default: i(() => [
|
|
113
|
-
e.scroll ? (r(), p(
|
|
141
|
+
e.scroll ? (r(), p(_, {
|
|
114
142
|
key: 0,
|
|
115
143
|
style: U(g.value)
|
|
116
144
|
}, {
|
|
117
145
|
default: i(() => [
|
|
118
|
-
|
|
146
|
+
C(o.$slots, "default")
|
|
119
147
|
]),
|
|
120
148
|
_: 3
|
|
121
|
-
}, 8, ["style"])) :
|
|
149
|
+
}, 8, ["style"])) : C(o.$slots, "default", { key: 1 })
|
|
122
150
|
]),
|
|
123
151
|
_: 2
|
|
124
152
|
}, [
|
|
125
153
|
e.title ? {
|
|
126
154
|
name: "header",
|
|
127
155
|
fn: i(() => [
|
|
128
|
-
I("div",
|
|
129
|
-
|
|
130
|
-
j(
|
|
156
|
+
I("div", ge, [
|
|
157
|
+
C(o.$slots, "title", {}, () => [
|
|
158
|
+
j($(e.title), 1)
|
|
131
159
|
]),
|
|
132
|
-
I("div", { onClick:
|
|
160
|
+
I("div", { onClick: c }, [
|
|
133
161
|
N(k, { class: "fullScreen" }, {
|
|
134
162
|
default: i(() => [
|
|
135
163
|
N(f)
|
|
@@ -141,37 +169,37 @@ const ce = { class: "card-header" }, ie = {
|
|
|
141
169
|
]),
|
|
142
170
|
key: "0"
|
|
143
171
|
} : void 0,
|
|
144
|
-
|
|
172
|
+
n.footer ? {
|
|
145
173
|
name: "footer",
|
|
146
174
|
fn: i(() => [
|
|
147
|
-
|
|
175
|
+
C(o.$slots, "footer")
|
|
148
176
|
]),
|
|
149
177
|
key: "1"
|
|
150
178
|
} : void 0
|
|
151
179
|
]), 1040, ["fullscreen", "width"]);
|
|
152
180
|
};
|
|
153
181
|
}
|
|
154
|
-
}),
|
|
155
|
-
let
|
|
156
|
-
if (e.label && typeof e.label == "function" && (
|
|
157
|
-
return `请选择${
|
|
182
|
+
}), ye = { key: 1 }, be = (e) => {
|
|
183
|
+
let n = e.label;
|
|
184
|
+
if (e.label && typeof e.label == "function" && (n = e.label()), e.type.indexOf("select") > -1 || e.type.indexOf("cascader") > -1 || e.type.indexOf("date") > -1)
|
|
185
|
+
return `请选择${n}`;
|
|
158
186
|
if (e.type.indexOf("text") > -1 || e.type.indexOf("number") > -1)
|
|
159
|
-
return `请输入${
|
|
160
|
-
},
|
|
187
|
+
return `请输入${n}`;
|
|
188
|
+
}, T = {
|
|
161
189
|
valueFormat: "YYYY-MM-DD HH:mm:ss",
|
|
162
190
|
format: "YYYY-MM-DD HH:mm:ss"
|
|
163
|
-
},
|
|
164
|
-
const { options:
|
|
191
|
+
}, ve = (e) => {
|
|
192
|
+
const { options: n } = e;
|
|
165
193
|
return {
|
|
166
|
-
default: () =>
|
|
194
|
+
default: () => n?.map((t) => z(d("el-option"), {
|
|
167
195
|
label: t.label,
|
|
168
196
|
value: t.value,
|
|
169
197
|
key: t.value
|
|
170
198
|
}))
|
|
171
199
|
};
|
|
172
|
-
},
|
|
200
|
+
}, A = {
|
|
173
201
|
clearable: !0
|
|
174
|
-
},
|
|
202
|
+
}, ke = [
|
|
175
203
|
{
|
|
176
204
|
type: "slider",
|
|
177
205
|
component: "el-slider"
|
|
@@ -180,14 +208,14 @@ const ce = { class: "card-header" }, ie = {
|
|
|
180
208
|
type: "text",
|
|
181
209
|
component: "el-input",
|
|
182
210
|
attrs: {
|
|
183
|
-
...
|
|
211
|
+
...A
|
|
184
212
|
}
|
|
185
213
|
},
|
|
186
214
|
{
|
|
187
215
|
type: "textarea",
|
|
188
216
|
component: "el-input",
|
|
189
217
|
attrs: {
|
|
190
|
-
...
|
|
218
|
+
...A
|
|
191
219
|
}
|
|
192
220
|
},
|
|
193
221
|
{
|
|
@@ -205,10 +233,10 @@ const ce = { class: "card-header" }, ie = {
|
|
|
205
233
|
type: "checkbox",
|
|
206
234
|
component: "el-checkbox-group",
|
|
207
235
|
slots: (e) => {
|
|
208
|
-
const { options:
|
|
236
|
+
const { options: n } = e;
|
|
209
237
|
return {
|
|
210
|
-
default: () =>
|
|
211
|
-
|
|
238
|
+
default: () => n?.map((t) => z(
|
|
239
|
+
d("el-checkbox"),
|
|
212
240
|
{
|
|
213
241
|
value: t.value
|
|
214
242
|
},
|
|
@@ -223,10 +251,10 @@ const ce = { class: "card-header" }, ie = {
|
|
|
223
251
|
type: "radio",
|
|
224
252
|
component: "el-radio-group",
|
|
225
253
|
slots: (e) => {
|
|
226
|
-
const { options:
|
|
254
|
+
const { options: n } = e;
|
|
227
255
|
return {
|
|
228
|
-
default: () =>
|
|
229
|
-
|
|
256
|
+
default: () => n?.map((t) => z(
|
|
257
|
+
d("el-radio"),
|
|
230
258
|
{
|
|
231
259
|
value: t.value
|
|
232
260
|
},
|
|
@@ -240,7 +268,7 @@ const ce = { class: "card-header" }, ie = {
|
|
|
240
268
|
{
|
|
241
269
|
type: "select",
|
|
242
270
|
component: "el-select",
|
|
243
|
-
slots:
|
|
271
|
+
slots: ve
|
|
244
272
|
},
|
|
245
273
|
{
|
|
246
274
|
type: "select-v2",
|
|
@@ -250,7 +278,7 @@ const ce = { class: "card-header" }, ie = {
|
|
|
250
278
|
type: "tree-select",
|
|
251
279
|
component: "el-tree-select",
|
|
252
280
|
attrs: {
|
|
253
|
-
...
|
|
281
|
+
...A,
|
|
254
282
|
checkStrictly: !0,
|
|
255
283
|
//是否严格的遵循父子不互相关联的做法,默认为 false
|
|
256
284
|
renderAfterExpand: !0
|
|
@@ -271,7 +299,7 @@ const ce = { class: "card-header" }, ie = {
|
|
|
271
299
|
component: "el-date-picker",
|
|
272
300
|
attrs: {
|
|
273
301
|
showConfirm: !1,
|
|
274
|
-
...
|
|
302
|
+
...T
|
|
275
303
|
}
|
|
276
304
|
},
|
|
277
305
|
{
|
|
@@ -300,7 +328,7 @@ const ce = { class: "card-header" }, ie = {
|
|
|
300
328
|
rangeSeparator: "至",
|
|
301
329
|
startPlaceholder: "开始日期",
|
|
302
330
|
endPlaceholder: "结束日期",
|
|
303
|
-
...
|
|
331
|
+
...T
|
|
304
332
|
}
|
|
305
333
|
},
|
|
306
334
|
{
|
|
@@ -318,10 +346,10 @@ const ce = { class: "card-header" }, ie = {
|
|
|
318
346
|
type: "custom",
|
|
319
347
|
component: "el-form-item"
|
|
320
348
|
}
|
|
321
|
-
],
|
|
349
|
+
], _e = /* @__PURE__ */ M({
|
|
322
350
|
name: "EasyForm",
|
|
323
351
|
__name: "index",
|
|
324
|
-
props: /* @__PURE__ */
|
|
352
|
+
props: /* @__PURE__ */ ne({
|
|
325
353
|
inline: {
|
|
326
354
|
type: Boolean,
|
|
327
355
|
default: !0
|
|
@@ -355,90 +383,90 @@ const ce = { class: "card-header" }, ie = {
|
|
|
355
383
|
}),
|
|
356
384
|
emits: ["update:modelValue"],
|
|
357
385
|
setup(e) {
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
},
|
|
361
|
-
if (!
|
|
362
|
-
delete t?.exposeProxy?.[
|
|
386
|
+
const n = oe(e, "modelValue"), t = K(), s = (o) => {
|
|
387
|
+
c(o, "formRef");
|
|
388
|
+
}, c = (o, a) => {
|
|
389
|
+
if (!o) {
|
|
390
|
+
delete t?.exposeProxy?.[a], delete t?.exposed?.[a];
|
|
363
391
|
return;
|
|
364
392
|
}
|
|
365
393
|
t.exposeProxy = {
|
|
366
394
|
...t?.exposed,
|
|
367
|
-
[
|
|
395
|
+
[a]: o
|
|
368
396
|
}, t.exposed = {
|
|
369
397
|
...t?.exposed,
|
|
370
|
-
[
|
|
398
|
+
[a]: o
|
|
371
399
|
};
|
|
372
|
-
},
|
|
373
|
-
const { value: k, component:
|
|
374
|
-
(b) => !!
|
|
375
|
-
),
|
|
376
|
-
if (!
|
|
377
|
-
return new Error(`未找到type为${
|
|
378
|
-
const
|
|
379
|
-
if (
|
|
400
|
+
}, u = V(), g = (o, a, f) => {
|
|
401
|
+
const { value: k, component: _, ...h } = a, m = ke.find(
|
|
402
|
+
(b) => !!o && b.type.indexOf(o) > -1
|
|
403
|
+
), w = m?.component === "el-select" && a.props, y = a.options && !w ? m?.slots?.(a) : {};
|
|
404
|
+
if (!m && !a.component)
|
|
405
|
+
return new Error(`未找到type为${o}的组件且当前也未传递component`);
|
|
406
|
+
const l = H(m?.component || _);
|
|
407
|
+
if (l)
|
|
380
408
|
return z(
|
|
381
|
-
|
|
409
|
+
l,
|
|
382
410
|
{
|
|
383
|
-
...
|
|
411
|
+
...m?.attrs,
|
|
384
412
|
// 这里的ref还是从配置注入吧。不是每次都要用到ref
|
|
385
413
|
// ref: (el: any) => {
|
|
386
414
|
// setRefs(el, formItem.prop)
|
|
387
415
|
// },
|
|
388
416
|
...h,
|
|
389
417
|
//外部传入的 优先级最高
|
|
390
|
-
placeholder: h.placeholder ||
|
|
418
|
+
placeholder: h.placeholder || be(a)
|
|
391
419
|
},
|
|
392
420
|
{ ...y, ...f }
|
|
393
421
|
);
|
|
394
422
|
};
|
|
395
|
-
return (
|
|
396
|
-
const f =
|
|
397
|
-
return r(), p(k,
|
|
398
|
-
model:
|
|
423
|
+
return (o, a) => {
|
|
424
|
+
const f = d("el-form-item"), k = d("el-form");
|
|
425
|
+
return r(), p(k, P({
|
|
426
|
+
model: n.value,
|
|
399
427
|
"label-width": e.labelWidth,
|
|
400
428
|
inline: e.inline,
|
|
401
429
|
"scroll-to-error": !0
|
|
402
|
-
}, { ...
|
|
430
|
+
}, { ...o.$attrs }, {
|
|
403
431
|
ref: s,
|
|
404
432
|
class: "easy-form"
|
|
405
433
|
}), {
|
|
406
434
|
default: i(() => [
|
|
407
|
-
(r(!0),
|
|
408
|
-
h != "custom" && !
|
|
409
|
-
prop:
|
|
435
|
+
(r(!0), x(D, null, W(e.formItems, ({ id: _, type: h, rule: m, width: w, slots: y, ...l }, b) => (r(), x(D, null, [
|
|
436
|
+
h != "custom" && !l.hidden ? (r(), p(f, {
|
|
437
|
+
prop: l.prop,
|
|
410
438
|
key: b,
|
|
411
|
-
"label-width":
|
|
412
|
-
rules:
|
|
413
|
-
required:
|
|
439
|
+
"label-width": l.labelWidth,
|
|
440
|
+
rules: m,
|
|
441
|
+
required: l.required
|
|
414
442
|
}, {
|
|
415
443
|
label: i(() => [
|
|
416
|
-
|
|
444
|
+
l.label && typeof l.label == "function" ? (r(), p(H(l.label), { key: 0 })) : (r(), x("span", ye, $(l.label), 1))
|
|
417
445
|
]),
|
|
418
446
|
default: i(() => [
|
|
419
|
-
|
|
447
|
+
u[l.prop] ? C(o.$slots, l.prop, {
|
|
420
448
|
key: 0,
|
|
421
|
-
item:
|
|
422
|
-
}, void 0, !0) : (r(), p(
|
|
449
|
+
item: l
|
|
450
|
+
}, void 0, !0) : (r(), p(H(g(h, { ...l, type: h }, y)), {
|
|
423
451
|
key: 1,
|
|
424
|
-
modelValue:
|
|
425
|
-
"onUpdate:modelValue": (v) =>
|
|
452
|
+
modelValue: n.value[l.prop],
|
|
453
|
+
"onUpdate:modelValue": (v) => n.value[l.prop] = v,
|
|
426
454
|
modelModifiers: { trim: !0 },
|
|
427
|
-
style: U({ width:
|
|
455
|
+
style: U({ width: w || e.itemWidth })
|
|
428
456
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style"]))
|
|
429
457
|
]),
|
|
430
458
|
_: 2
|
|
431
459
|
}, 1032, ["prop", "label-width", "rules", "required"])) : E("", !0),
|
|
432
|
-
h == "custom" ? (r(),
|
|
433
|
-
y?.[
|
|
460
|
+
h == "custom" ? (r(), x(D, { key: 1 }, [
|
|
461
|
+
y?.[l.prop] ? (r(), p(H(y[l.prop]), { key: 0 })) : C(o.$slots, l.prop, {
|
|
434
462
|
key: 1,
|
|
435
|
-
item: { width:
|
|
463
|
+
item: { width: w, rule: m, ...l }
|
|
436
464
|
}, void 0, !0)
|
|
437
465
|
], 64)) : E("", !0)
|
|
438
466
|
], 64))), 256)),
|
|
439
|
-
|
|
467
|
+
u.append ? (r(), p(f, { key: 0 }, {
|
|
440
468
|
default: i(() => [
|
|
441
|
-
|
|
469
|
+
C(o.$slots, "append", {}, void 0, !0)
|
|
442
470
|
]),
|
|
443
471
|
_: 3
|
|
444
472
|
})) : E("", !0)
|
|
@@ -447,7 +475,7 @@ const ce = { class: "card-header" }, ie = {
|
|
|
447
475
|
}, 16, ["model", "label-width", "inline"]);
|
|
448
476
|
};
|
|
449
477
|
}
|
|
450
|
-
}),
|
|
478
|
+
}), xe = /* @__PURE__ */ F(_e, [["__scopeId", "data-v-ebcd5674"]]), Ce = /* @__PURE__ */ M({
|
|
451
479
|
name: "EasyTable",
|
|
452
480
|
__name: "index",
|
|
453
481
|
props: {
|
|
@@ -486,72 +514,72 @@ const ce = { class: "card-header" }, ie = {
|
|
|
486
514
|
}
|
|
487
515
|
},
|
|
488
516
|
setup(e) {
|
|
489
|
-
const
|
|
517
|
+
const n = ae(ce), t = e, s = O(() => t.buttonWidth.toString().indexOf("px") > -1 ? t.buttonWidth.toString().slice(0, -2) : t.buttonWidth), c = Y(), u = Y("auto");
|
|
490
518
|
let g = K();
|
|
491
|
-
const
|
|
492
|
-
let
|
|
519
|
+
const o = () => {
|
|
520
|
+
let m = "auto";
|
|
493
521
|
if (g?.parent?.attrs?.class?.indexOf("content-wrap") > -1) {
|
|
494
|
-
let
|
|
495
|
-
|
|
522
|
+
let l = t.footerHeight;
|
|
523
|
+
n?.value?.size === "small" ? l = l - 8 : n?.value?.size === "large" && (l = l + 8);
|
|
496
524
|
try {
|
|
497
525
|
const b = g?.refs.tableRef, { top: v } = b?.getBoundingClientRect();
|
|
498
|
-
|
|
526
|
+
m = document.documentElement.clientHeight - v - l - 20;
|
|
499
527
|
} catch {
|
|
500
528
|
}
|
|
501
|
-
return
|
|
529
|
+
return m;
|
|
502
530
|
}
|
|
503
|
-
return
|
|
504
|
-
},
|
|
505
|
-
|
|
506
|
-
|
|
531
|
+
return m;
|
|
532
|
+
}, a = Y(), f = () => {
|
|
533
|
+
a.value && clearTimeout(a.value), a.value = setTimeout(() => {
|
|
534
|
+
u.value = o(), a.value = null;
|
|
507
535
|
}, 100);
|
|
508
536
|
};
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}),
|
|
537
|
+
le(() => {
|
|
538
|
+
u.value = o(), window.addEventListener("resize", f);
|
|
539
|
+
}), re(() => {
|
|
512
540
|
window.removeEventListener("resize", f);
|
|
513
541
|
});
|
|
514
|
-
const k =
|
|
515
|
-
const { slots:
|
|
542
|
+
const k = d("el-table-column"), _ = V(), h = (m) => {
|
|
543
|
+
const { slots: w = {}, children: y = [], ...l } = m;
|
|
516
544
|
if (y && y.length > 0) {
|
|
517
545
|
const b = y.map((v) => h(v));
|
|
518
546
|
return z(
|
|
519
547
|
k,
|
|
520
548
|
{
|
|
521
549
|
align: t.align,
|
|
522
|
-
...
|
|
550
|
+
...l
|
|
523
551
|
},
|
|
524
552
|
// default 插槽默认使用 childrenNode 不能被slots 覆盖
|
|
525
|
-
{ ...
|
|
553
|
+
{ ...w, default: () => b }
|
|
526
554
|
);
|
|
527
555
|
}
|
|
528
556
|
return z(
|
|
529
557
|
k,
|
|
530
558
|
{
|
|
531
559
|
align: t.align,
|
|
532
|
-
...
|
|
560
|
+
...l
|
|
533
561
|
},
|
|
534
562
|
// 最里层的表格列 default 插槽 slots传递的优先级最高 模版直接传递的可被 slots 覆盖
|
|
535
563
|
{
|
|
536
|
-
default: (b) =>
|
|
537
|
-
...
|
|
564
|
+
default: (b) => _[m.prop] && _[m.prop](b),
|
|
565
|
+
...w
|
|
538
566
|
}
|
|
539
567
|
);
|
|
540
568
|
};
|
|
541
|
-
return (
|
|
542
|
-
const y =
|
|
543
|
-
return r(),
|
|
569
|
+
return (m, w) => {
|
|
570
|
+
const y = d("el-button"), l = d("el-table-column"), b = d("el-table");
|
|
571
|
+
return r(), x("div", {
|
|
544
572
|
ref_key: "tableRef",
|
|
545
|
-
ref:
|
|
573
|
+
ref: c
|
|
546
574
|
}, [
|
|
547
|
-
N(b,
|
|
575
|
+
N(b, P({ style: { width: "100%" } }, m.$attrs, {
|
|
548
576
|
data: e.data,
|
|
549
577
|
height: e.height,
|
|
550
|
-
maxHeight: e.maxHeight ? e.maxHeight :
|
|
578
|
+
maxHeight: e.maxHeight ? e.maxHeight : u.value
|
|
551
579
|
}), {
|
|
552
580
|
default: i(() => [
|
|
553
|
-
(r(!0),
|
|
554
|
-
e.buttons && e.buttons.length ? (r(), p(
|
|
581
|
+
(r(!0), x(D, null, W(e.tableColumns, (v, S) => (r(), p(H(h(v)), { key: S }))), 128)),
|
|
582
|
+
e.buttons && e.buttons.length ? (r(), p(l, {
|
|
555
583
|
key: 0,
|
|
556
584
|
align: "center",
|
|
557
585
|
fixed: "right",
|
|
@@ -559,21 +587,21 @@ const ce = { class: "card-header" }, ie = {
|
|
|
559
587
|
width: s.value
|
|
560
588
|
}, {
|
|
561
589
|
default: i((v) => [
|
|
562
|
-
(r(!0),
|
|
590
|
+
(r(!0), x(D, null, W(e.buttons, (S, Q) => G((r(), p(y, P({ ref_for: !0 }, { ...S }, {
|
|
563
591
|
key: Q,
|
|
564
|
-
type:
|
|
592
|
+
type: S.type.includes("del") ? "danger" : "primary",
|
|
565
593
|
onClick: () => {
|
|
566
|
-
|
|
594
|
+
S.click?.(v.row);
|
|
567
595
|
},
|
|
568
|
-
disabled:
|
|
569
|
-
link:
|
|
596
|
+
disabled: S.disabled?.(v.row) || !1,
|
|
597
|
+
link: S.link?.(v.row) || !0
|
|
570
598
|
}), {
|
|
571
599
|
default: i(() => [
|
|
572
|
-
j(
|
|
600
|
+
j($(S.label), 1)
|
|
573
601
|
]),
|
|
574
602
|
_: 2
|
|
575
603
|
}, 1040, ["type", "onClick", "disabled", "link"])), [
|
|
576
|
-
[J,
|
|
604
|
+
[J, S.show?.(v.row) || !0]
|
|
577
605
|
])), 128))
|
|
578
606
|
]),
|
|
579
607
|
_: 1
|
|
@@ -584,7 +612,7 @@ const ce = { class: "card-header" }, ie = {
|
|
|
584
612
|
], 512);
|
|
585
613
|
};
|
|
586
614
|
}
|
|
587
|
-
}),
|
|
615
|
+
}), we = /* @__PURE__ */ F(Ce, [["__scopeId", "data-v-1c87357b"]]), Se = {
|
|
588
616
|
name: "",
|
|
589
617
|
components: {},
|
|
590
618
|
props: {
|
|
@@ -594,13 +622,13 @@ const ce = { class: "card-header" }, ie = {
|
|
|
594
622
|
}
|
|
595
623
|
}
|
|
596
624
|
};
|
|
597
|
-
function
|
|
598
|
-
return t.icon ? (r(), p(
|
|
625
|
+
function Me(e, n, t, s, c, u) {
|
|
626
|
+
return t.icon ? (r(), p(H(t.icon), {
|
|
599
627
|
key: 0,
|
|
600
628
|
class: "menu_icon"
|
|
601
629
|
})) : E("", !0);
|
|
602
630
|
}
|
|
603
|
-
const
|
|
631
|
+
const R = /* @__PURE__ */ F(Se, [["render", Me], ["__scopeId", "data-v-261ce99a"]]), Ye = /* @__PURE__ */ M({
|
|
604
632
|
name: "subMenu",
|
|
605
633
|
__name: "subMenu",
|
|
606
634
|
props: {
|
|
@@ -610,43 +638,43 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
|
|
|
610
638
|
}
|
|
611
639
|
},
|
|
612
640
|
emits: ["handleMenuItemClick"],
|
|
613
|
-
setup(e, { emit:
|
|
614
|
-
const t =
|
|
615
|
-
function s(
|
|
616
|
-
t("handleMenuItemClick",
|
|
641
|
+
setup(e, { emit: n }) {
|
|
642
|
+
const t = n;
|
|
643
|
+
function s(c) {
|
|
644
|
+
t("handleMenuItemClick", c);
|
|
617
645
|
}
|
|
618
|
-
return (
|
|
619
|
-
const g =
|
|
620
|
-
return e.routeData.children && e.routeData.children.length > 0 ? (r(), p(
|
|
646
|
+
return (c, u) => {
|
|
647
|
+
const g = d("subMenu", !0), o = d("el-sub-menu"), a = d("el-menu-item");
|
|
648
|
+
return e.routeData.children && e.routeData.children.length > 0 ? (r(), p(o, {
|
|
621
649
|
key: 0,
|
|
622
650
|
index: e.routeData.path
|
|
623
651
|
}, {
|
|
624
652
|
title: i(() => [
|
|
625
|
-
N(
|
|
653
|
+
N(R, {
|
|
626
654
|
icon: e.routeData.meta.icon
|
|
627
655
|
}, null, 8, ["icon"]),
|
|
628
|
-
I("span", null,
|
|
656
|
+
I("span", null, $(e.routeData.meta.title), 1)
|
|
629
657
|
]),
|
|
630
658
|
default: i(() => [
|
|
631
|
-
(r(!0),
|
|
659
|
+
(r(!0), x(D, null, W(e.routeData.children, (f, k) => (r(), p(g, {
|
|
632
660
|
onHandleMenuItemClick: s,
|
|
633
661
|
routeData: f,
|
|
634
662
|
key: k
|
|
635
663
|
}, null, 8, ["routeData"]))), 128))
|
|
636
664
|
]),
|
|
637
665
|
_: 1
|
|
638
|
-
}, 8, ["index"])) : (r(),
|
|
666
|
+
}, 8, ["index"])) : (r(), x("div", {
|
|
639
667
|
key: 1,
|
|
640
|
-
onClick:
|
|
668
|
+
onClick: u[0] || (u[0] = (f) => s(e.routeData))
|
|
641
669
|
}, [
|
|
642
|
-
N(
|
|
670
|
+
N(a, {
|
|
643
671
|
index: e.routeData.path
|
|
644
672
|
}, {
|
|
645
673
|
title: i(() => [
|
|
646
|
-
I("span", null,
|
|
674
|
+
I("span", null, $(e.routeData.meta.title), 1)
|
|
647
675
|
]),
|
|
648
676
|
default: i(() => [
|
|
649
|
-
N(
|
|
677
|
+
N(R, {
|
|
650
678
|
icon: e.routeData.meta.icon
|
|
651
679
|
}, null, 8, ["icon"])
|
|
652
680
|
]),
|
|
@@ -655,7 +683,7 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
|
|
|
655
683
|
]));
|
|
656
684
|
};
|
|
657
685
|
}
|
|
658
|
-
}),
|
|
686
|
+
}), De = /* @__PURE__ */ M({
|
|
659
687
|
name: "MenuTree",
|
|
660
688
|
__name: "index",
|
|
661
689
|
props: {
|
|
@@ -665,16 +693,16 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
|
|
|
665
693
|
}
|
|
666
694
|
},
|
|
667
695
|
emits: ["handleMenuItemClick"],
|
|
668
|
-
setup(e, { emit:
|
|
669
|
-
const t =
|
|
670
|
-
t("handleMenuItemClick",
|
|
696
|
+
setup(e, { emit: n }) {
|
|
697
|
+
const t = n, s = (c) => {
|
|
698
|
+
t("handleMenuItemClick", c);
|
|
671
699
|
};
|
|
672
|
-
return (
|
|
673
|
-
const g =
|
|
674
|
-
return r(), p(g,
|
|
700
|
+
return (c, u) => {
|
|
701
|
+
const g = d("el-menu");
|
|
702
|
+
return r(), p(g, se(ue(c.$attrs)), {
|
|
675
703
|
default: i(() => [
|
|
676
|
-
(r(!0),
|
|
677
|
-
routeData:
|
|
704
|
+
(r(!0), x(D, null, W(e.menuList, (o) => (r(), p(Ye, {
|
|
705
|
+
routeData: o,
|
|
678
706
|
onHandleMenuItemClick: s
|
|
679
707
|
}, null, 8, ["routeData"]))), 256))
|
|
680
708
|
]),
|
|
@@ -682,7 +710,7 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
|
|
|
682
710
|
}, 16);
|
|
683
711
|
};
|
|
684
712
|
}
|
|
685
|
-
}),
|
|
713
|
+
}), $e = /* @__PURE__ */ M({
|
|
686
714
|
name: "Pagination",
|
|
687
715
|
__name: "index",
|
|
688
716
|
props: {
|
|
@@ -710,33 +738,33 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
|
|
|
710
738
|
onPagination: { type: Function }
|
|
711
739
|
},
|
|
712
740
|
emits: ["update:page", "update:limit", "pagination"],
|
|
713
|
-
setup(e, { emit:
|
|
714
|
-
const t = e, s =
|
|
741
|
+
setup(e, { emit: n }) {
|
|
742
|
+
const t = e, s = n, c = O({
|
|
715
743
|
get() {
|
|
716
744
|
return t.page;
|
|
717
745
|
},
|
|
718
|
-
set(
|
|
719
|
-
s("update:page",
|
|
746
|
+
set(a) {
|
|
747
|
+
s("update:page", a);
|
|
720
748
|
}
|
|
721
|
-
}),
|
|
749
|
+
}), u = O({
|
|
722
750
|
get() {
|
|
723
751
|
return t.limit;
|
|
724
752
|
},
|
|
725
|
-
set(
|
|
726
|
-
s("update:limit",
|
|
753
|
+
set(a) {
|
|
754
|
+
s("update:limit", a);
|
|
727
755
|
}
|
|
728
|
-
}), g = (
|
|
729
|
-
|
|
730
|
-
},
|
|
731
|
-
s("pagination", { page:
|
|
756
|
+
}), g = (a) => {
|
|
757
|
+
c.value * a > t.total && (c.value = 1), s("pagination", { page: c.value, limit: a });
|
|
758
|
+
}, o = (a) => {
|
|
759
|
+
s("pagination", { page: a, limit: u.value });
|
|
732
760
|
};
|
|
733
|
-
return (
|
|
734
|
-
const k =
|
|
761
|
+
return (a, f) => {
|
|
762
|
+
const k = d("el-pagination");
|
|
735
763
|
return G((r(), p(k, {
|
|
736
|
-
"current-page":
|
|
737
|
-
"onUpdate:currentPage": f[0] || (f[0] = (
|
|
738
|
-
"page-size":
|
|
739
|
-
"onUpdate:pageSize": f[1] || (f[1] = (
|
|
764
|
+
"current-page": c.value,
|
|
765
|
+
"onUpdate:currentPage": f[0] || (f[0] = (_) => c.value = _),
|
|
766
|
+
"page-size": u.value,
|
|
767
|
+
"onUpdate:pageSize": f[1] || (f[1] = (_) => u.value = _),
|
|
740
768
|
background: !0,
|
|
741
769
|
"page-sizes": [10, 20, 30, 50, 100],
|
|
742
770
|
"pager-count": e.pagerCount,
|
|
@@ -744,34 +772,36 @@ const B = /* @__PURE__ */ W(Ce, [["render", we], ["__scopeId", "data-v-261ce99a"
|
|
|
744
772
|
class: "pagination",
|
|
745
773
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
746
774
|
onSizeChange: g,
|
|
747
|
-
onCurrentChange:
|
|
775
|
+
onCurrentChange: o
|
|
748
776
|
}, null, 8, ["current-page", "page-size", "pager-count", "total"])), [
|
|
749
777
|
[J, e.total > 0]
|
|
750
778
|
]);
|
|
751
779
|
};
|
|
752
780
|
}
|
|
753
|
-
}),
|
|
754
|
-
|
|
781
|
+
}), He = /* @__PURE__ */ F($e, [["__scopeId", "data-v-1e34e383"]]), Ee = [
|
|
782
|
+
ie,
|
|
755
783
|
fe,
|
|
756
|
-
|
|
784
|
+
he,
|
|
785
|
+
xe,
|
|
757
786
|
// EasyFormH,
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
], q = [],
|
|
762
|
-
|
|
787
|
+
we,
|
|
788
|
+
De,
|
|
789
|
+
He
|
|
790
|
+
], q = [], Ne = (e, n) => {
|
|
791
|
+
Ee.forEach((t) => {
|
|
763
792
|
q.push(t.name), e.component(t.name, t);
|
|
764
793
|
}), console.log("mwl-components", q);
|
|
765
|
-
},
|
|
794
|
+
}, Pe = { install: Ne };
|
|
766
795
|
export {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
De as
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
796
|
+
fe as ContentWarp,
|
|
797
|
+
he as Dialog,
|
|
798
|
+
ie as EasyButton,
|
|
799
|
+
xe as EasyForm,
|
|
800
|
+
we as EasyTable,
|
|
801
|
+
De as MenuTree,
|
|
802
|
+
He as Pagination,
|
|
803
|
+
ke as componentsMap,
|
|
804
|
+
Pe as default,
|
|
805
|
+
be as getPlaceholder,
|
|
806
|
+
Ne as install
|
|
777
807
|
};
|