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