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