mwl-components 0.0.8 → 0.0.9
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/index.js +180 -180
- package/dist/mwl-components.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as H, useSlots as j, ref as M, resolveComponent as r, createBlock as o, openBlock as a, normalizeClass as G, createSlots as N, withCtx as s, renderSlot as k, createElementVNode as $, createElementBlock as v, createCommentVNode as f, toDisplayString as x, createVNode as U, watch as J, nextTick as K, computed as R, mergeProps as _, normalizeStyle as A, createTextVNode as W, Fragment as V, renderList as D, getCurrentInstance as Q, resolveDirective as X, withDirectives as q, resolveDynamicComponent as Z, normalizeProps as ee, guardReactiveProps as te, vShow as ae } from "vue";
|
|
2
|
+
const le = { class: "flex items-center justify-between" }, ne = { class: "flex items-center" }, oe = { class: "text-16px font-700" }, re = { class: "max-w-200px" }, ue = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "flex justify-end"
|
|
5
|
-
},
|
|
5
|
+
}, de = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "mt-8px flex items-center"
|
|
8
|
-
},
|
|
8
|
+
}, se = /* @__PURE__ */ H({
|
|
9
9
|
name: "ContentWarp",
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
@@ -13,13 +13,13 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
13
13
|
message: String
|
|
14
14
|
},
|
|
15
15
|
setup(t) {
|
|
16
|
-
const u =
|
|
16
|
+
const u = j(), d = M("content-wrap");
|
|
17
17
|
return (c, l) => {
|
|
18
|
-
const
|
|
18
|
+
const m = r("ElIcon"), g = r("ElTooltip"), p = r("ElCard");
|
|
19
19
|
return a(), o(p, {
|
|
20
|
-
class:
|
|
20
|
+
class: G([d.value, "mb-[10px]"]),
|
|
21
21
|
shadow: "never"
|
|
22
|
-
},
|
|
22
|
+
}, N({
|
|
23
23
|
default: s(() => [
|
|
24
24
|
k(c.$slots, "default", {}, void 0, !0)
|
|
25
25
|
]),
|
|
@@ -28,46 +28,46 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
28
28
|
t.title ? {
|
|
29
29
|
name: "header",
|
|
30
30
|
fn: s(() => [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
$("div", le, [
|
|
32
|
+
$("div", ne, [
|
|
33
|
+
$("span", oe, x(t.title), 1),
|
|
34
34
|
t.message ? (a(), o(g, {
|
|
35
35
|
key: 0,
|
|
36
36
|
effect: "dark",
|
|
37
37
|
placement: "right"
|
|
38
38
|
}, {
|
|
39
39
|
content: s(() => [
|
|
40
|
-
|
|
40
|
+
$("div", re, x(t.message), 1)
|
|
41
41
|
]),
|
|
42
42
|
default: s(() => [
|
|
43
|
-
|
|
43
|
+
U(m, {
|
|
44
44
|
size: 14,
|
|
45
45
|
class: "ml-5px",
|
|
46
46
|
icon: "ep:question-filled"
|
|
47
47
|
})
|
|
48
48
|
]),
|
|
49
49
|
_: 1
|
|
50
|
-
})) :
|
|
50
|
+
})) : f("", !0)
|
|
51
51
|
]),
|
|
52
|
-
u.buttonTip ? (a(), v("div",
|
|
52
|
+
u.buttonTip ? (a(), v("div", ue, [
|
|
53
53
|
k(c.$slots, "buttonTip", {}, void 0, !0)
|
|
54
|
-
])) :
|
|
54
|
+
])) : f("", !0)
|
|
55
55
|
]),
|
|
56
|
-
u.descTip ? (a(), v("div",
|
|
56
|
+
u.descTip ? (a(), v("div", de, [
|
|
57
57
|
k(c.$slots, "descTip", {}, void 0, !0)
|
|
58
|
-
])) :
|
|
58
|
+
])) : f("", !0)
|
|
59
59
|
]),
|
|
60
60
|
key: "0"
|
|
61
61
|
} : void 0
|
|
62
62
|
]), 1032, ["class"]);
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
}),
|
|
65
|
+
}), T = (t, u) => {
|
|
66
66
|
const d = t.__vccOpts || t;
|
|
67
67
|
for (const [c, l] of u)
|
|
68
68
|
d[c] = l;
|
|
69
69
|
return d;
|
|
70
|
-
},
|
|
70
|
+
}, ce = /* @__PURE__ */ T(se, [["__scopeId", "data-v-15c93817"]]), ie = { class: "dialog-header" }, me = /* @__PURE__ */ H({
|
|
71
71
|
name: "Dialog",
|
|
72
72
|
__name: "index",
|
|
73
73
|
props: {
|
|
@@ -93,47 +93,47 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
setup(t) {
|
|
96
|
-
const u =
|
|
97
|
-
c.value =
|
|
98
|
-
},
|
|
99
|
-
|
|
96
|
+
const u = j(), d = t, c = M(!1), l = () => {
|
|
97
|
+
c.value = !unref(c);
|
|
98
|
+
}, m = M(d.maxHeight);
|
|
99
|
+
J(
|
|
100
100
|
() => c.value,
|
|
101
101
|
async (p) => {
|
|
102
|
-
if (await
|
|
103
|
-
const
|
|
104
|
-
|
|
102
|
+
if (await K(), p) {
|
|
103
|
+
const i = document.documentElement.offsetHeight;
|
|
104
|
+
m.value = `${i - 55 - 40 - (u.footer ? 63 : 0)}px`;
|
|
105
105
|
} else
|
|
106
|
-
|
|
106
|
+
m.value = d.maxHeight;
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
immediate: !0
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
|
-
const g =
|
|
112
|
+
const g = R(() => {
|
|
113
113
|
if (d.maxHeight)
|
|
114
114
|
return {
|
|
115
|
-
height:
|
|
115
|
+
height: unref(m)
|
|
116
116
|
};
|
|
117
117
|
});
|
|
118
|
-
return console.log(d), (p,
|
|
118
|
+
return console.log(d), (p, i) => {
|
|
119
119
|
const b = r("el-button"), y = r("ElScrollbar"), C = r("ElDialog");
|
|
120
120
|
return a(), o(C, _(p.$attrs, {
|
|
121
121
|
"close-on-click-modal": !1,
|
|
122
|
-
fullscreen:
|
|
122
|
+
fullscreen: c.value,
|
|
123
123
|
width: t.width,
|
|
124
124
|
"destroy-on-close": "",
|
|
125
125
|
draggable: "",
|
|
126
126
|
"lock-scroll": "",
|
|
127
127
|
class: "custom-dialog",
|
|
128
128
|
"append-to-body": ""
|
|
129
|
-
}),
|
|
129
|
+
}), N({
|
|
130
130
|
header: s(() => [
|
|
131
|
-
|
|
131
|
+
$("div", ie, [
|
|
132
132
|
k(p.$slots, "title", {}, () => [
|
|
133
|
-
|
|
133
|
+
W(x(t.title), 1)
|
|
134
134
|
]),
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
$("div", { onClick: l }, [
|
|
136
|
+
U(b, {
|
|
137
137
|
link: "",
|
|
138
138
|
icon: "FullScreen",
|
|
139
139
|
color: "#909399"
|
|
@@ -144,7 +144,7 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
144
144
|
default: s(() => [
|
|
145
145
|
t.scroll ? (a(), o(y, {
|
|
146
146
|
key: 0,
|
|
147
|
-
style:
|
|
147
|
+
style: A(g.value)
|
|
148
148
|
}, {
|
|
149
149
|
default: s(() => [
|
|
150
150
|
k(p.$slots, "default")
|
|
@@ -164,8 +164,8 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
164
164
|
]), 1040, ["fullscreen", "width"]);
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
}),
|
|
168
|
-
...
|
|
167
|
+
}), pe = {}, he = /* @__PURE__ */ H({
|
|
168
|
+
...pe,
|
|
169
169
|
name: "EasyForm",
|
|
170
170
|
__name: "index",
|
|
171
171
|
props: {
|
|
@@ -195,18 +195,18 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
setup(t, { expose: u }) {
|
|
198
|
-
const d =
|
|
198
|
+
const d = M();
|
|
199
199
|
return u({
|
|
200
200
|
resetFields: () => {
|
|
201
201
|
d.value?.resetFields();
|
|
202
202
|
},
|
|
203
203
|
getFormData: async () => {
|
|
204
|
-
const
|
|
205
|
-
return
|
|
204
|
+
const m = await d.value.validate();
|
|
205
|
+
return m || null;
|
|
206
206
|
}
|
|
207
|
-
}), (
|
|
208
|
-
const p = r("el-input"),
|
|
209
|
-
return a(), o(
|
|
207
|
+
}), (m, g) => {
|
|
208
|
+
const p = r("el-input"), i = r("el-input-number"), b = r("el-radio"), y = r("el-radio-group"), C = r("el-checkbox"), S = r("el-checkbox-group"), B = r("el-option"), E = r("el-select"), I = r("el-cascader"), Y = r("el-switch"), w = r("el-date-picker"), P = r("el-form-item"), z = r("el-form");
|
|
209
|
+
return a(), o(z, {
|
|
210
210
|
ref_key: "formRef",
|
|
211
211
|
ref: d,
|
|
212
212
|
model: t.formData,
|
|
@@ -215,15 +215,15 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
215
215
|
"scroll-to-error": ""
|
|
216
216
|
}, {
|
|
217
217
|
default: s(() => [
|
|
218
|
-
(a(!0), v(V, null, D(t.formItems, ({ type:
|
|
219
|
-
|
|
218
|
+
(a(!0), v(V, null, D(t.formItems, ({ type: h, ...e }) => (a(), v(V, null, [
|
|
219
|
+
h != "custom" && !e.hidden ? (a(), o(P, {
|
|
220
220
|
key: 0,
|
|
221
221
|
label: e.label,
|
|
222
222
|
prop: e.prop,
|
|
223
223
|
rules: e.rule
|
|
224
224
|
}, {
|
|
225
225
|
default: s(() => [
|
|
226
|
-
|
|
226
|
+
h == "text" || h == "" ? (a(), o(p, _({
|
|
227
227
|
key: 0,
|
|
228
228
|
placeholder: "请输入" + e.label
|
|
229
229
|
}, { ref_for: !0 }, { ...e }, {
|
|
@@ -231,8 +231,8 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
231
231
|
"onUpdate:modelValue": (n) => t.formData[e.prop] = n,
|
|
232
232
|
"show-word-limit": "",
|
|
233
233
|
style: { width: e.width ? e.width : t.itemWidth }
|
|
234
|
-
}), null, 16, ["placeholder", "modelValue", "onUpdate:modelValue", "style"])) :
|
|
235
|
-
|
|
234
|
+
}), null, 16, ["placeholder", "modelValue", "onUpdate:modelValue", "style"])) : f("", !0),
|
|
235
|
+
h == "textarea" ? (a(), o(p, _({
|
|
236
236
|
key: 1,
|
|
237
237
|
ref_for: !0
|
|
238
238
|
}, { ...e }, {
|
|
@@ -240,16 +240,16 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
240
240
|
"onUpdate:modelValue": (n) => t.formData[e.prop] = n,
|
|
241
241
|
type: "textarea",
|
|
242
242
|
style: { width: e.width ? e.width : t.itemWidth }
|
|
243
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "style"])) :
|
|
244
|
-
|
|
243
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "style"])) : f("", !0),
|
|
244
|
+
h == "number" ? (a(), o(i, _({
|
|
245
245
|
key: 2,
|
|
246
246
|
"controls-position": "right"
|
|
247
247
|
}, { ref_for: !0 }, { ...e }, {
|
|
248
248
|
modelValue: t.formData[e.prop],
|
|
249
249
|
"onUpdate:modelValue": (n) => t.formData[e.prop] = n,
|
|
250
250
|
style: { width: e.width ? e.width : t.itemWidth }
|
|
251
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "style"])) :
|
|
252
|
-
|
|
251
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "style"])) : f("", !0),
|
|
252
|
+
h == "radio" ? (a(), o(y, _({
|
|
253
253
|
key: 3,
|
|
254
254
|
modelValue: t.formData[e.prop],
|
|
255
255
|
"onUpdate:modelValue": (n) => t.formData[e.prop] = n,
|
|
@@ -257,19 +257,19 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
257
257
|
onChange: (n) => e.change && e.change(t.formData[e.prop])
|
|
258
258
|
}, { ref_for: !0 }, { ...e }), {
|
|
259
259
|
default: s(() => [
|
|
260
|
-
(a(!0), v(V, null, D(e.options, (n,
|
|
261
|
-
key:
|
|
260
|
+
(a(!0), v(V, null, D(e.options, (n, F) => (a(), o(b, {
|
|
261
|
+
key: F,
|
|
262
262
|
value: n.value
|
|
263
263
|
}, {
|
|
264
264
|
default: s(() => [
|
|
265
|
-
|
|
265
|
+
W(x(n.label), 1)
|
|
266
266
|
]),
|
|
267
267
|
_: 2
|
|
268
268
|
}, 1032, ["value"]))), 128))
|
|
269
269
|
]),
|
|
270
270
|
_: 2
|
|
271
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "style", "onChange"])) :
|
|
272
|
-
|
|
271
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "style", "onChange"])) : f("", !0),
|
|
272
|
+
h == "checkbox" ? (a(), o(S, _({
|
|
273
273
|
key: 4,
|
|
274
274
|
modelValue: t.formData[e.prop],
|
|
275
275
|
"onUpdate:modelValue": (n) => t.formData[e.prop] = n,
|
|
@@ -277,19 +277,19 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
277
277
|
onChange: (n) => e.change && e.change(t.formData[e.prop])
|
|
278
278
|
}, { ref_for: !0 }, { ...e }), {
|
|
279
279
|
default: s(() => [
|
|
280
|
-
(a(!0), v(V, null, D(e.options, (n,
|
|
281
|
-
key:
|
|
280
|
+
(a(!0), v(V, null, D(e.options, (n, F) => (a(), o(C, {
|
|
281
|
+
key: F,
|
|
282
282
|
value: n.value
|
|
283
283
|
}, {
|
|
284
284
|
default: s(() => [
|
|
285
|
-
|
|
285
|
+
W(x(n.label), 1)
|
|
286
286
|
]),
|
|
287
287
|
_: 2
|
|
288
288
|
}, 1032, ["value"]))), 128))
|
|
289
289
|
]),
|
|
290
290
|
_: 2
|
|
291
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "style", "onChange"])) :
|
|
292
|
-
|
|
291
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "style", "onChange"])) : f("", !0),
|
|
292
|
+
h == "select" || h == "multipleselect" ? (a(), o(E, _({
|
|
293
293
|
key: 5,
|
|
294
294
|
modelValue: t.formData[e.prop],
|
|
295
295
|
"onUpdate:modelValue": (n) => t.formData[e.prop] = n,
|
|
@@ -298,21 +298,21 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
298
298
|
onChange: (n) => e.change && e.change(t.formData[e.prop])
|
|
299
299
|
}, { ref_for: !0 }, { ...e }), {
|
|
300
300
|
default: s(() => [
|
|
301
|
-
(a(!0), v(V, null, D(e.options, (n,
|
|
302
|
-
key:
|
|
301
|
+
(a(!0), v(V, null, D(e.options, (n, F) => (a(), o(B, {
|
|
302
|
+
key: F,
|
|
303
303
|
label: e.defaultProp ? n[e.defaultProp.label] : n.label,
|
|
304
304
|
value: e.defaultProp ? n[e.defaultProp.value] : n.value
|
|
305
305
|
}, null, 8, ["label", "value"]))), 128))
|
|
306
306
|
]),
|
|
307
307
|
_: 2
|
|
308
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "style", "onChange"])) :
|
|
309
|
-
|
|
308
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "style", "onChange"])) : f("", !0),
|
|
309
|
+
h == "cascader" ? (a(), o(I, {
|
|
310
310
|
key: 6,
|
|
311
311
|
modelValue: t.formData[e.prop],
|
|
312
312
|
"onUpdate:modelValue": (n) => t.formData[e.prop] = n,
|
|
313
313
|
options: e.options || [],
|
|
314
314
|
props: e.defaultProp || { label: "label", value: "value" },
|
|
315
|
-
style:
|
|
315
|
+
style: A({ width: e.width ? e.width : t.itemWidth }),
|
|
316
316
|
disabled: e.disabled,
|
|
317
317
|
clearable: e.clearable,
|
|
318
318
|
placeholder: e.placeholder,
|
|
@@ -320,16 +320,16 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
320
320
|
teleported: e.teleported,
|
|
321
321
|
"disabled-date": e.disabledDate,
|
|
322
322
|
onChange: (n) => e.change && e.change(t.formData[e.prop])
|
|
323
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "style", "disabled", "clearable", "placeholder", "popper-class", "teleported", "disabled-date", "onChange"])) :
|
|
324
|
-
|
|
323
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "style", "disabled", "clearable", "placeholder", "popper-class", "teleported", "disabled-date", "onChange"])) : f("", !0),
|
|
324
|
+
h === "switch" ? (a(), o(Y, {
|
|
325
325
|
key: 7,
|
|
326
326
|
modelValue: t.formData[e.prop],
|
|
327
327
|
"onUpdate:modelValue": (n) => t.formData[e.prop] = n,
|
|
328
328
|
disabled: e.disabled,
|
|
329
|
-
style:
|
|
329
|
+
style: A({ width: e.width ? e.width : t.itemWidth }),
|
|
330
330
|
onChange: (n) => e.change && e.change(t.formData[e.prop])
|
|
331
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "style", "onChange"])) :
|
|
332
|
-
|
|
331
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "style", "onChange"])) : f("", !0),
|
|
332
|
+
h == "date" || h == "datetime" || h == "year" || h == "month" ? (a(), o(w, _({
|
|
333
333
|
key: 8,
|
|
334
334
|
style: { width: e.width ? e.width : t.itemWidth },
|
|
335
335
|
modelValue: t.formData[e.prop],
|
|
@@ -341,33 +341,33 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
341
341
|
clearable: e.clearable,
|
|
342
342
|
placeholder: e.placeholder || "请选择",
|
|
343
343
|
"disabled-date": e.disabledDate,
|
|
344
|
-
type:
|
|
344
|
+
type: h,
|
|
345
345
|
onChange: (n) => e.change && e.change(t.formData[e.prop])
|
|
346
|
-
}), null, 16, ["style", "modelValue", "onUpdate:modelValue", "format", "value-format", "disabled", "clearable", "placeholder", "disabled-date", "type", "onChange"])) :
|
|
347
|
-
|
|
346
|
+
}), null, 16, ["style", "modelValue", "onUpdate:modelValue", "format", "value-format", "disabled", "clearable", "placeholder", "disabled-date", "type", "onChange"])) : f("", !0),
|
|
347
|
+
h == "daterange" ? (a(), o(w, {
|
|
348
348
|
key: 9,
|
|
349
349
|
modelValue: t.formData[e.prop],
|
|
350
350
|
"onUpdate:modelValue": (n) => t.formData[e.prop] = n,
|
|
351
351
|
format: e.format || "YYYY-MM-DD HH:mm:ss",
|
|
352
352
|
"value-format": e.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
353
|
-
type:
|
|
353
|
+
type: h,
|
|
354
354
|
disabled: e.disabled,
|
|
355
355
|
"range-separator": "至",
|
|
356
356
|
"start-placeholder": "开始日期",
|
|
357
357
|
"end-placeholder": "结束日期",
|
|
358
358
|
onChange: (n) => e.change && e.change(t.formData[e.prop])
|
|
359
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "format", "value-format", "type", "disabled", "onChange"])) :
|
|
359
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "format", "value-format", "type", "disabled", "onChange"])) : f("", !0)
|
|
360
360
|
]),
|
|
361
361
|
_: 2
|
|
362
|
-
}, 1032, ["label", "prop", "rules"])) :
|
|
363
|
-
|
|
362
|
+
}, 1032, ["label", "prop", "rules"])) : f("", !0),
|
|
363
|
+
h == "custom" ? k(m.$slots, e.prop, {
|
|
364
364
|
key: 1,
|
|
365
365
|
item: e
|
|
366
|
-
}, void 0, !0) :
|
|
366
|
+
}, void 0, !0) : f("", !0)
|
|
367
367
|
], 64))), 256)),
|
|
368
|
-
|
|
368
|
+
U(P, null, {
|
|
369
369
|
default: s(() => [
|
|
370
|
-
k(
|
|
370
|
+
k(m.$slots, "append", {}, void 0, !0)
|
|
371
371
|
]),
|
|
372
372
|
_: 3
|
|
373
373
|
})
|
|
@@ -376,27 +376,27 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
376
376
|
}, 8, ["model", "label-width", "inline"]);
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
}),
|
|
379
|
+
}), fe = /* @__PURE__ */ T(he, [["__scopeId", "data-v-9fb8ae2f"]]), ge = /* @__PURE__ */ H({
|
|
380
380
|
__name: "tableColumnItem",
|
|
381
381
|
props: {
|
|
382
382
|
tableColumn: {}
|
|
383
383
|
},
|
|
384
384
|
setup(t) {
|
|
385
|
-
const u =
|
|
385
|
+
const u = j(), d = t, c = () => {
|
|
386
386
|
const { tableColumn: l } = d;
|
|
387
387
|
return l.children?.length || delete l.children, l;
|
|
388
388
|
};
|
|
389
|
-
return (l,
|
|
389
|
+
return (l, m) => {
|
|
390
390
|
const g = r("el-table-column"), p = r("tableColumnItem", !0);
|
|
391
391
|
return !l.tableColumn.children || l.tableColumn.children?.length == 0 ? (a(), o(g, _({ key: 0 }, { ...c() }, {
|
|
392
392
|
prop: l.tableColumn.prop,
|
|
393
393
|
label: l.tableColumn.label
|
|
394
|
-
}),
|
|
394
|
+
}), N({ _: 2 }, [
|
|
395
395
|
l.tableColumn.prop && u[l.tableColumn.prop] ? {
|
|
396
396
|
name: "default",
|
|
397
|
-
fn: s((
|
|
397
|
+
fn: s((i) => [
|
|
398
398
|
k(l.$slots, l.tableColumn.prop, {
|
|
399
|
-
row:
|
|
399
|
+
row: i.row
|
|
400
400
|
})
|
|
401
401
|
]),
|
|
402
402
|
key: "0"
|
|
@@ -407,15 +407,15 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
407
407
|
label: l.tableColumn.label
|
|
408
408
|
}, {
|
|
409
409
|
default: s(() => [
|
|
410
|
-
(a(!0), v(V, null, D(l.tableColumn.children, (
|
|
410
|
+
(a(!0), v(V, null, D(l.tableColumn.children, (i, b) => (a(), o(p, {
|
|
411
411
|
key: b,
|
|
412
|
-
"table-column": { align:
|
|
413
|
-
},
|
|
412
|
+
"table-column": { align: i.align || l.tableColumn.align, ...i }
|
|
413
|
+
}, N({ _: 2 }, [
|
|
414
414
|
D(u, (y, C) => ({
|
|
415
415
|
name: C,
|
|
416
|
-
fn: s(({ row:
|
|
417
|
-
k(l.$slots, C, { row:
|
|
418
|
-
|
|
416
|
+
fn: s(({ row: S }) => [
|
|
417
|
+
k(l.$slots, C, { row: S }, () => [
|
|
418
|
+
W(x(S[C]), 1)
|
|
419
419
|
])
|
|
420
420
|
])
|
|
421
421
|
}))
|
|
@@ -425,7 +425,7 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
425
425
|
}, 8, ["align", "label"]));
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
}),
|
|
428
|
+
}), be = /* @__PURE__ */ H({
|
|
429
429
|
name: "EasyTable",
|
|
430
430
|
__name: "index",
|
|
431
431
|
props: {
|
|
@@ -460,49 +460,49 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
462
|
setup(t) {
|
|
463
|
-
const u = t, d =
|
|
464
|
-
let g =
|
|
463
|
+
const u = t, d = R(() => (u.buttonWidth.toString().indexOf("px") > -1 ? u.buttonWidth.toString().slice(0, -2) : u.buttonWidth, u.buttonWidth)), c = j(), l = M(), m = M("auto");
|
|
464
|
+
let g = Q();
|
|
465
465
|
const p = () => {
|
|
466
466
|
let y = "auto";
|
|
467
467
|
if (g?.parent?.attrs?.class?.indexOf("content-wrap") > -1) {
|
|
468
468
|
try {
|
|
469
|
-
const
|
|
470
|
-
y = document.documentElement.clientHeight -
|
|
469
|
+
const E = g?.refs.tableRef, { top: I } = E?.getBoundingClientRect();
|
|
470
|
+
y = document.documentElement.clientHeight - I - 65 - 20;
|
|
471
471
|
} catch {
|
|
472
472
|
}
|
|
473
473
|
return y;
|
|
474
474
|
}
|
|
475
475
|
return y;
|
|
476
|
-
},
|
|
477
|
-
|
|
478
|
-
|
|
476
|
+
}, i = M(), b = () => {
|
|
477
|
+
i.value && clearTimeout(i.value), i.value = setTimeout(() => {
|
|
478
|
+
m.value = p(), i.value = null;
|
|
479
479
|
}, 100);
|
|
480
480
|
};
|
|
481
|
-
return
|
|
482
|
-
|
|
483
|
-
}),
|
|
481
|
+
return onMounted(() => {
|
|
482
|
+
m.value = p(), window.addEventListener("resize", b);
|
|
483
|
+
}), onUnmounted(() => {
|
|
484
484
|
window.removeEventListener("resize", b);
|
|
485
485
|
}), (y, C) => {
|
|
486
|
-
const
|
|
486
|
+
const S = r("el-button"), B = r("el-table-column"), E = r("el-table"), I = X("hasPermi");
|
|
487
487
|
return a(), v("div", {
|
|
488
488
|
ref_key: "tableRef",
|
|
489
489
|
ref: l
|
|
490
490
|
}, [
|
|
491
|
-
E
|
|
491
|
+
U(E, _({ style: { width: "100%" } }, y.$attrs, {
|
|
492
492
|
data: t.data,
|
|
493
493
|
height: t.height,
|
|
494
|
-
maxHeight: t.maxHeight ? t.maxHeight :
|
|
494
|
+
maxHeight: t.maxHeight ? t.maxHeight : m.value
|
|
495
495
|
}), {
|
|
496
496
|
default: s(() => [
|
|
497
|
-
(a(!0), v(V, null, D(t.tableColumns, (
|
|
497
|
+
(a(!0), v(V, null, D(t.tableColumns, (Y, w) => (a(), o(ge, {
|
|
498
498
|
key: w,
|
|
499
|
-
"table-column": { align: t.align, ...
|
|
500
|
-
},
|
|
501
|
-
D(c, (
|
|
502
|
-
name:
|
|
503
|
-
fn: s(({ row:
|
|
504
|
-
k(y.$slots,
|
|
505
|
-
|
|
499
|
+
"table-column": { align: t.align, ...Y }
|
|
500
|
+
}, N({ _: 2 }, [
|
|
501
|
+
D(c, (P, z) => ({
|
|
502
|
+
name: z,
|
|
503
|
+
fn: s(({ row: h }) => [
|
|
504
|
+
k(y.$slots, z, { row: h }, () => [
|
|
505
|
+
W(x(h[z]), 1)
|
|
506
506
|
], !0)
|
|
507
507
|
])
|
|
508
508
|
}))
|
|
@@ -512,34 +512,34 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
512
512
|
align: "center",
|
|
513
513
|
fixed: "right",
|
|
514
514
|
label: "操作",
|
|
515
|
-
width:
|
|
515
|
+
width: d.value
|
|
516
516
|
}, {
|
|
517
|
-
default: s((
|
|
518
|
-
(a(!0), v(V, null, D(t.buttons, (w,
|
|
519
|
-
key:
|
|
517
|
+
default: s((Y) => [
|
|
518
|
+
(a(!0), v(V, null, D(t.buttons, (w, P) => q((a(), o(S, {
|
|
519
|
+
key: P,
|
|
520
520
|
type: w.type.includes("del") ? "danger" : "primary",
|
|
521
521
|
onClick: () => {
|
|
522
|
-
w.click?.(
|
|
522
|
+
w.click?.(Y.row);
|
|
523
523
|
},
|
|
524
524
|
link: ""
|
|
525
525
|
}, {
|
|
526
526
|
default: s(() => [
|
|
527
|
-
|
|
527
|
+
W(x(w.label), 1)
|
|
528
528
|
]),
|
|
529
529
|
_: 2
|
|
530
530
|
}, 1032, ["type", "onClick"])), [
|
|
531
|
-
[
|
|
531
|
+
[I, w.permi ? [w.permi] : [""]]
|
|
532
532
|
])), 128))
|
|
533
533
|
]),
|
|
534
534
|
_: 1
|
|
535
|
-
}, 8, ["width"])) :
|
|
535
|
+
}, 8, ["width"])) : f("", !0)
|
|
536
536
|
]),
|
|
537
537
|
_: 3
|
|
538
538
|
}, 16, ["data", "height", "maxHeight"])
|
|
539
539
|
], 512);
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
}),
|
|
542
|
+
}), ye = /* @__PURE__ */ T(be, [["__scopeId", "data-v-217a24bd"]]), ve = {
|
|
543
543
|
name: "",
|
|
544
544
|
components: {},
|
|
545
545
|
props: {
|
|
@@ -549,13 +549,13 @@ const ue = { class: "flex items-center justify-between" }, de = { class: "flex i
|
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
};
|
|
552
|
-
function
|
|
553
|
-
return d.icon ? (a(), o(
|
|
552
|
+
function Ce(t, u, d, c, l, m) {
|
|
553
|
+
return d.icon ? (a(), o(Z(d.icon), {
|
|
554
554
|
key: 0,
|
|
555
555
|
class: "menu_icon"
|
|
556
|
-
})) :
|
|
556
|
+
})) : f("", !0);
|
|
557
557
|
}
|
|
558
|
-
const
|
|
558
|
+
const L = /* @__PURE__ */ T(ve, [["render", Ce], ["__scopeId", "data-v-261ce99a"]]), ke = /* @__PURE__ */ H({
|
|
559
559
|
name: "subMenu",
|
|
560
560
|
__name: "subMenu",
|
|
561
561
|
props: {
|
|
@@ -570,17 +570,17 @@ const q = /* @__PURE__ */ R(we, [["render", _e], ["__scopeId", "data-v-261ce99a"
|
|
|
570
570
|
function c(l) {
|
|
571
571
|
d("handleMenuItemClick", l);
|
|
572
572
|
}
|
|
573
|
-
return (l,
|
|
574
|
-
const g = r("subMenu", !0), p = r("el-sub-menu"),
|
|
573
|
+
return (l, m) => {
|
|
574
|
+
const g = r("subMenu", !0), p = r("el-sub-menu"), i = r("el-menu-item");
|
|
575
575
|
return t.routeData.children && t.routeData.children.length > 0 ? (a(), o(p, {
|
|
576
576
|
key: 0,
|
|
577
577
|
index: t.routeData.path
|
|
578
578
|
}, {
|
|
579
579
|
title: s(() => [
|
|
580
|
-
|
|
580
|
+
U(L, {
|
|
581
581
|
icon: t.routeData.meta.icon
|
|
582
582
|
}, null, 8, ["icon"]),
|
|
583
|
-
|
|
583
|
+
$("span", null, x(t.routeData.meta.title), 1)
|
|
584
584
|
]),
|
|
585
585
|
default: s(() => [
|
|
586
586
|
(a(!0), v(V, null, D(t.routeData.children, (b, y) => (a(), o(g, {
|
|
@@ -592,16 +592,16 @@ const q = /* @__PURE__ */ R(we, [["render", _e], ["__scopeId", "data-v-261ce99a"
|
|
|
592
592
|
_: 1
|
|
593
593
|
}, 8, ["index"])) : (a(), v("div", {
|
|
594
594
|
key: 1,
|
|
595
|
-
onClick:
|
|
595
|
+
onClick: m[0] || (m[0] = (b) => c(t.routeData))
|
|
596
596
|
}, [
|
|
597
|
-
|
|
597
|
+
U(i, {
|
|
598
598
|
index: t.routeData.path
|
|
599
599
|
}, {
|
|
600
600
|
title: s(() => [
|
|
601
|
-
|
|
601
|
+
$("span", null, x(t.routeData.meta.title), 1)
|
|
602
602
|
]),
|
|
603
603
|
default: s(() => [
|
|
604
|
-
|
|
604
|
+
U(L, {
|
|
605
605
|
icon: t.routeData.meta.icon
|
|
606
606
|
}, null, 8, ["icon"])
|
|
607
607
|
]),
|
|
@@ -610,7 +610,7 @@ const q = /* @__PURE__ */ R(we, [["render", _e], ["__scopeId", "data-v-261ce99a"
|
|
|
610
610
|
]));
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
-
}),
|
|
613
|
+
}), De = /* @__PURE__ */ H({
|
|
614
614
|
name: "MenuTree",
|
|
615
615
|
__name: "index",
|
|
616
616
|
props: {
|
|
@@ -624,11 +624,11 @@ const q = /* @__PURE__ */ R(we, [["render", _e], ["__scopeId", "data-v-261ce99a"
|
|
|
624
624
|
const d = u, c = (l) => {
|
|
625
625
|
d("handleMenuItemClick", l);
|
|
626
626
|
};
|
|
627
|
-
return (l,
|
|
627
|
+
return (l, m) => {
|
|
628
628
|
const g = r("el-menu");
|
|
629
|
-
return a(), o(g,
|
|
629
|
+
return a(), o(g, ee(te(l.$attrs)), {
|
|
630
630
|
default: s(() => [
|
|
631
|
-
(a(!0), v(V, null, D(t.menuList, (p) => (a(), o(
|
|
631
|
+
(a(!0), v(V, null, D(t.menuList, (p) => (a(), o(ke, {
|
|
632
632
|
routeData: p,
|
|
633
633
|
onHandleMenuItemClick: c
|
|
634
634
|
}, null, 8, ["routeData"]))), 256))
|
|
@@ -637,7 +637,7 @@ const q = /* @__PURE__ */ R(we, [["render", _e], ["__scopeId", "data-v-261ce99a"
|
|
|
637
637
|
}, 16);
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
|
-
}),
|
|
640
|
+
}), we = /* @__PURE__ */ H({
|
|
641
641
|
name: "Pagination",
|
|
642
642
|
__name: "index",
|
|
643
643
|
props: {
|
|
@@ -666,32 +666,32 @@ const q = /* @__PURE__ */ R(we, [["render", _e], ["__scopeId", "data-v-261ce99a"
|
|
|
666
666
|
},
|
|
667
667
|
emits: ["update:page", "update:limit", "pagination"],
|
|
668
668
|
setup(t, { emit: u }) {
|
|
669
|
-
const d = t, c = u, l =
|
|
669
|
+
const d = t, c = u, l = R({
|
|
670
670
|
get() {
|
|
671
671
|
return d.page;
|
|
672
672
|
},
|
|
673
|
-
set(
|
|
674
|
-
c("update:page",
|
|
673
|
+
set(i) {
|
|
674
|
+
c("update:page", i);
|
|
675
675
|
}
|
|
676
|
-
}),
|
|
676
|
+
}), m = R({
|
|
677
677
|
get() {
|
|
678
678
|
return d.limit;
|
|
679
679
|
},
|
|
680
|
-
set(
|
|
681
|
-
c("update:limit",
|
|
680
|
+
set(i) {
|
|
681
|
+
c("update:limit", i);
|
|
682
682
|
}
|
|
683
|
-
}), g = (
|
|
684
|
-
l.value *
|
|
685
|
-
}, p = (
|
|
686
|
-
c("pagination", { page:
|
|
683
|
+
}), g = (i) => {
|
|
684
|
+
l.value * i > d.total && (l.value = 1), c("pagination", { page: l.value, limit: i });
|
|
685
|
+
}, p = (i) => {
|
|
686
|
+
c("pagination", { page: i, limit: m.value });
|
|
687
687
|
};
|
|
688
|
-
return (
|
|
688
|
+
return (i, b) => {
|
|
689
689
|
const y = r("el-pagination");
|
|
690
|
-
return
|
|
691
|
-
"current-page":
|
|
692
|
-
"onUpdate:currentPage": b[0] || (b[0] = (C) =>
|
|
693
|
-
"page-size":
|
|
694
|
-
"onUpdate:pageSize": b[1] || (b[1] = (C) =>
|
|
690
|
+
return q((a(), o(y, {
|
|
691
|
+
"current-page": l.value,
|
|
692
|
+
"onUpdate:currentPage": b[0] || (b[0] = (C) => l.value = C),
|
|
693
|
+
"page-size": m.value,
|
|
694
|
+
"onUpdate:pageSize": b[1] || (b[1] = (C) => m.value = C),
|
|
695
695
|
background: !0,
|
|
696
696
|
"page-sizes": [10, 20, 30, 50, 100],
|
|
697
697
|
"pager-count": t.pagerCount,
|
|
@@ -701,29 +701,29 @@ const q = /* @__PURE__ */ R(we, [["render", _e], ["__scopeId", "data-v-261ce99a"
|
|
|
701
701
|
onSizeChange: g,
|
|
702
702
|
onCurrentChange: p
|
|
703
703
|
}, null, 8, ["current-page", "page-size", "pager-count", "total"])), [
|
|
704
|
-
[
|
|
704
|
+
[ae, t.total > 0]
|
|
705
705
|
]);
|
|
706
706
|
};
|
|
707
707
|
}
|
|
708
|
-
}),
|
|
708
|
+
}), _e = /* @__PURE__ */ T(we, [["__scopeId", "data-v-1e34e383"]]), Ve = [
|
|
709
|
+
ce,
|
|
710
|
+
me,
|
|
709
711
|
fe,
|
|
710
|
-
|
|
711
|
-
ve,
|
|
712
|
+
ye,
|
|
712
713
|
De,
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
}, Ee = { install: Me };
|
|
714
|
+
_e
|
|
715
|
+
], O = [], xe = (t) => {
|
|
716
|
+
Ve.forEach((u) => {
|
|
717
|
+
O.push(u.name), t.component(u.name, u);
|
|
718
|
+
}), console.log("mwl-components", O);
|
|
719
|
+
}, He = { install: xe };
|
|
720
720
|
export {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
721
|
+
ce as ContentWarp,
|
|
722
|
+
me as Dialog,
|
|
723
|
+
fe as EasyForm,
|
|
724
|
+
ye as EasyTable,
|
|
725
|
+
De as MenuTree,
|
|
726
|
+
_e as Pagination,
|
|
727
|
+
He as default,
|
|
728
|
+
xe as install
|
|
729
729
|
};
|
package/dist/mwl-components.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.el-card[data-v-
|
|
1
|
+
.el-card[data-v-15c93817]{background-color:transparent;margin-bottom:10px}[data-v-15c93817] .el-card__body:has(>.el-form){padding:18px 20px 0}[data-v-15c93817] .el-card__body{padding:20px}.custom-dialog{padding:0}.custom-dialog .el-dialog__header{--el-dialog-padding-primary: 20px;margin-right:0!important;border-bottom:1px solid #eee;padding:var(--el-dialog-padding-primary);padding-bottom:10px}.dialog-header{display:flex;align-items:center;justify-content:space-between;margin-right:30px}.dialog-header .fullScreen{cursor:pointer;z-index:99}.el-dialog__headerbtn{top:8px}.el-dialog__body{padding:20px 30px;color:#606266;font-size:14px}.el-dialog__footer{padding:10px 20px 20px;border-top:1px solid #eee}[data-v-9fb8ae2f] .el-form-item__label{font-size:var(--el-font-size-base)}[data-v-217a24bd] .el-table,[data-v-217a24bd] th.el-table__cell,[data-v-217a24bd] tr{background-color:transparent!important}.menu_icon[data-v-261ce99a]{width:22px;height:22px;margin-right:5px;fill:currentColor;display:inline-block;font-size:16px}.pagination[data-v-1e34e383]{margin-top:15px;margin-bottom:15px;float:right}@media screen and (max-width: 1370px){.pagination[data-v-1e34e383]{margin-top:8px;margin-bottom:8px}}
|