mwl-components 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -3
- package/dist/index.js +154 -153
- package/package.json +1 -1
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# mwl-components
|
|
2
2
|
|
|
3
3
|
基于vue 3.0 + ts + vite + element-plus 组件库
|
|
4
4
|
|
|
@@ -9,11 +9,33 @@
|
|
|
9
9
|
<!-- 描述配置信息 -->
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
vite.config.ts
|
|
12
|
+
vite.config.ts 文件
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
### Lint with [ESLint](https://eslint.org/)
|
|
16
16
|
|
|
17
|
+
## 本地测试
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pnpm link 或者 npm link
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### 主项目 引入
|
|
24
|
+
|
|
17
25
|
```sh
|
|
18
|
-
pnpm
|
|
26
|
+
pnpm link mwl-components
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 使用 先引入 element-plus 全局注册
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
import ElementPlus from 'element-plus'
|
|
33
|
+
import 'element-plus/dist/index.css'
|
|
34
|
+
import mwlComponents from 'mwl-components'
|
|
35
|
+
import 'mwl-components/dist/index.css'
|
|
36
|
+
|
|
37
|
+
const app = createApp(App)
|
|
38
|
+
app.use(ElementPlus)
|
|
39
|
+
app.use(mwlComponents)
|
|
40
|
+
app.mount('#app')
|
|
19
41
|
```
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as S, useSlots as A, ref as U, resolveComponent as r, createBlock as o, openBlock as a, normalizeClass as K, unref as $, createSlots as T, withCtx as s, renderSlot as k, createElementVNode as H, createElementBlock as v, createCommentVNode as h, toDisplayString as x, createVNode as E, watch as Q, nextTick as X, computed as j, mergeProps as _, normalizeStyle as L, createTextVNode as I, Fragment as V, renderList as D, getCurrentInstance as Z, onMounted as ee, onUnmounted as te, resolveDirective as ae, withDirectives as J, resolveDynamicComponent as le, normalizeProps as ne, guardReactiveProps as oe, isRef as O, vShow as re } from "vue";
|
|
2
|
+
const ue = { class: "flex items-center justify-between" }, de = { class: "flex items-center" }, se = { class: "text-16px font-700" }, ce = { class: "max-w-200px" }, ie = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "flex justify-end"
|
|
5
|
-
},
|
|
5
|
+
}, me = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "mt-8px flex items-center"
|
|
8
|
-
},
|
|
8
|
+
}, pe = /* @__PURE__ */ S({
|
|
9
9
|
name: "ContentWarp",
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
@@ -13,13 +13,13 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
13
13
|
message: String
|
|
14
14
|
},
|
|
15
15
|
setup(t) {
|
|
16
|
-
const u =
|
|
16
|
+
const u = A(), d = U("content-wrap");
|
|
17
17
|
return (c, l) => {
|
|
18
|
-
const i = r("ElIcon"), g = r("ElTooltip"),
|
|
19
|
-
return a(), o(
|
|
20
|
-
class:
|
|
18
|
+
const i = r("ElIcon"), g = r("ElTooltip"), p = r("ElCard");
|
|
19
|
+
return a(), o(p, {
|
|
20
|
+
class: K([$(d), "mb-[10px]"]),
|
|
21
21
|
shadow: "never"
|
|
22
|
-
},
|
|
22
|
+
}, T({
|
|
23
23
|
default: s(() => [
|
|
24
24
|
k(c.$slots, "default", {}, void 0, !0)
|
|
25
25
|
]),
|
|
@@ -28,19 +28,19 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
28
28
|
t.title ? {
|
|
29
29
|
name: "header",
|
|
30
30
|
fn: s(() => [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
H("div", ue, [
|
|
32
|
+
H("div", de, [
|
|
33
|
+
H("span", se, 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
|
+
H("div", ce, x(t.message), 1)
|
|
41
41
|
]),
|
|
42
42
|
default: s(() => [
|
|
43
|
-
|
|
43
|
+
E(i, {
|
|
44
44
|
size: 14,
|
|
45
45
|
class: "ml-5px",
|
|
46
46
|
icon: "ep:question-filled"
|
|
@@ -49,11 +49,11 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
49
49
|
_: 1
|
|
50
50
|
})) : h("", !0)
|
|
51
51
|
]),
|
|
52
|
-
u.buttonTip ? (a(), v("div",
|
|
52
|
+
u.buttonTip ? (a(), v("div", ie, [
|
|
53
53
|
k(c.$slots, "buttonTip", {}, void 0, !0)
|
|
54
54
|
])) : h("", !0)
|
|
55
55
|
]),
|
|
56
|
-
u.descTip ? (a(), v("div",
|
|
56
|
+
u.descTip ? (a(), v("div", me, [
|
|
57
57
|
k(c.$slots, "descTip", {}, void 0, !0)
|
|
58
58
|
])) : h("", !0)
|
|
59
59
|
]),
|
|
@@ -62,12 +62,12 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
62
62
|
]), 1032, ["class"]);
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
}),
|
|
65
|
+
}), R = (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
|
+
}, fe = /* @__PURE__ */ R(pe, [["__scopeId", "data-v-0870eb8d"]]), he = { class: "dialog-header" }, ge = /* @__PURE__ */ S({
|
|
71
71
|
name: "Dialog",
|
|
72
72
|
__name: "index",
|
|
73
73
|
props: {
|
|
@@ -93,13 +93,13 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
setup(t) {
|
|
96
|
-
const u =
|
|
97
|
-
c.value =
|
|
98
|
-
}, i =
|
|
99
|
-
|
|
96
|
+
const u = A(), d = t, c = U(!1), l = () => {
|
|
97
|
+
c.value = !$(c);
|
|
98
|
+
}, i = U(d.maxHeight);
|
|
99
|
+
Q(
|
|
100
100
|
() => c.value,
|
|
101
|
-
async (
|
|
102
|
-
if (await
|
|
101
|
+
async (p) => {
|
|
102
|
+
if (await X(), p) {
|
|
103
103
|
const m = document.documentElement.offsetHeight;
|
|
104
104
|
i.value = `${m - 55 - 40 - (u.footer ? 63 : 0)}px`;
|
|
105
105
|
} else
|
|
@@ -109,31 +109,31 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
109
109
|
immediate: !0
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
|
-
const g =
|
|
112
|
+
const g = j(() => {
|
|
113
113
|
if (d.maxHeight)
|
|
114
114
|
return {
|
|
115
|
-
height:
|
|
115
|
+
height: $(i)
|
|
116
116
|
};
|
|
117
117
|
});
|
|
118
|
-
return console.log(d), (
|
|
118
|
+
return console.log(d), (p, m) => {
|
|
119
119
|
const b = r("el-button"), y = r("ElScrollbar"), C = r("ElDialog");
|
|
120
|
-
return a(), o(C, _(
|
|
120
|
+
return a(), o(C, _(p.$attrs, {
|
|
121
121
|
"close-on-click-modal": !1,
|
|
122
|
-
fullscreen:
|
|
122
|
+
fullscreen: $(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
|
+
}), T({
|
|
130
130
|
header: s(() => [
|
|
131
|
-
|
|
132
|
-
k(
|
|
133
|
-
|
|
131
|
+
H("div", he, [
|
|
132
|
+
k(p.$slots, "title", {}, () => [
|
|
133
|
+
I(x(t.title), 1)
|
|
134
134
|
]),
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
H("div", { onClick: l }, [
|
|
136
|
+
E(b, {
|
|
137
137
|
link: "",
|
|
138
138
|
icon: "FullScreen",
|
|
139
139
|
color: "#909399"
|
|
@@ -144,28 +144,28 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
144
144
|
default: s(() => [
|
|
145
145
|
t.scroll ? (a(), o(y, {
|
|
146
146
|
key: 0,
|
|
147
|
-
style:
|
|
147
|
+
style: L($(g))
|
|
148
148
|
}, {
|
|
149
149
|
default: s(() => [
|
|
150
|
-
k(
|
|
150
|
+
k(p.$slots, "default")
|
|
151
151
|
]),
|
|
152
152
|
_: 3
|
|
153
|
-
}, 8, ["style"])) : k(
|
|
153
|
+
}, 8, ["style"])) : k(p.$slots, "default", { key: 1 })
|
|
154
154
|
]),
|
|
155
155
|
_: 2
|
|
156
156
|
}, [
|
|
157
157
|
u.footer ? {
|
|
158
158
|
name: "footer",
|
|
159
159
|
fn: s(() => [
|
|
160
|
-
k(
|
|
160
|
+
k(p.$slots, "footer")
|
|
161
161
|
]),
|
|
162
162
|
key: "0"
|
|
163
163
|
} : void 0
|
|
164
164
|
]), 1040, ["fullscreen", "width"]);
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
}),
|
|
168
|
-
...
|
|
167
|
+
}), be = {}, ye = /* @__PURE__ */ S({
|
|
168
|
+
...be,
|
|
169
169
|
name: "EasyForm",
|
|
170
170
|
__name: "index",
|
|
171
171
|
props: {
|
|
@@ -195,7 +195,7 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
setup(t, { expose: u }) {
|
|
198
|
-
const d =
|
|
198
|
+
const d = U();
|
|
199
199
|
return u({
|
|
200
200
|
resetFields: () => {
|
|
201
201
|
d.value?.resetFields();
|
|
@@ -205,8 +205,8 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
205
205
|
return i || null;
|
|
206
206
|
}
|
|
207
207
|
}), (i, g) => {
|
|
208
|
-
const
|
|
209
|
-
return a(), o(
|
|
208
|
+
const p = r("el-input"), m = r("el-input-number"), b = r("el-radio"), y = r("el-radio-group"), C = r("el-checkbox"), M = r("el-checkbox-group"), B = r("el-option"), W = r("el-select"), Y = r("el-cascader"), P = r("el-switch"), w = r("el-date-picker"), z = r("el-form-item"), F = r("el-form");
|
|
209
|
+
return a(), o(F, {
|
|
210
210
|
ref_key: "formRef",
|
|
211
211
|
ref: d,
|
|
212
212
|
model: t.formData,
|
|
@@ -215,15 +215,15 @@ const te = { class: "flex items-center justify-between" }, ae = { 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: f, ...e }) => (a(), v(V, null, [
|
|
219
|
+
f != "custom" && !e.hidden ? (a(), o(z, {
|
|
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
|
+
f == "text" || f == "" ? (a(), o(p, _({
|
|
227
227
|
key: 0,
|
|
228
228
|
placeholder: "请输入" + e.label
|
|
229
229
|
}, { ref_for: !0 }, { ...e }, {
|
|
@@ -232,7 +232,7 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
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
|
-
|
|
235
|
+
f == "textarea" ? (a(), o(p, _({
|
|
236
236
|
key: 1,
|
|
237
237
|
ref_for: !0
|
|
238
238
|
}, { ...e }, {
|
|
@@ -241,7 +241,7 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
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
|
-
|
|
244
|
+
f == "number" ? (a(), o(m, _({
|
|
245
245
|
key: 2,
|
|
246
246
|
"controls-position": "right"
|
|
247
247
|
}, { ref_for: !0 }, { ...e }, {
|
|
@@ -249,7 +249,7 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
249
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
|
-
|
|
252
|
+
f == "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 te = { class: "flex items-center justify-between" }, ae = { 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, N) => (a(), o(b, {
|
|
261
|
+
key: N,
|
|
262
262
|
value: n.value
|
|
263
263
|
}, {
|
|
264
264
|
default: s(() => [
|
|
265
|
-
|
|
265
|
+
I(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
|
-
|
|
272
|
+
f == "checkbox" ? (a(), o(M, _({
|
|
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 te = { class: "flex items-center justify-between" }, ae = { 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, N) => (a(), o(C, {
|
|
281
|
+
key: N,
|
|
282
282
|
value: n.value
|
|
283
283
|
}, {
|
|
284
284
|
default: s(() => [
|
|
285
|
-
|
|
285
|
+
I(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
|
-
|
|
292
|
+
f == "select" || f == "multipleselect" ? (a(), o(W, _({
|
|
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 te = { class: "flex items-center justify-between" }, ae = { 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, N) => (a(), o(B, {
|
|
302
|
+
key: N,
|
|
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
308
|
}, 1040, ["modelValue", "onUpdate:modelValue", "style", "onChange"])) : h("", !0),
|
|
309
|
-
|
|
309
|
+
f == "cascader" ? (a(), o(Y, {
|
|
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: L({ width: e.width ? e.width : t.itemWidth }),
|
|
316
316
|
disabled: e.disabled,
|
|
317
317
|
clearable: e.clearable,
|
|
318
318
|
placeholder: e.placeholder,
|
|
@@ -321,15 +321,15 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
321
321
|
"disabled-date": e.disabledDate,
|
|
322
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
|
-
|
|
324
|
+
f === "switch" ? (a(), o(P, {
|
|
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: L({ width: e.width ? e.width : t.itemWidth }),
|
|
330
330
|
onChange: (n) => e.change && e.change(t.formData[e.prop])
|
|
331
331
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "style", "onChange"])) : h("", !0),
|
|
332
|
-
|
|
332
|
+
f == "date" || f == "datetime" || f == "year" || f == "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,16 +341,16 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
341
341
|
clearable: e.clearable,
|
|
342
342
|
placeholder: e.placeholder || "请选择",
|
|
343
343
|
"disabled-date": e.disabledDate,
|
|
344
|
-
type:
|
|
344
|
+
type: f,
|
|
345
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
|
-
|
|
347
|
+
f == "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: f,
|
|
354
354
|
disabled: e.disabled,
|
|
355
355
|
"range-separator": "至",
|
|
356
356
|
"start-placeholder": "开始日期",
|
|
@@ -360,12 +360,12 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
360
360
|
]),
|
|
361
361
|
_: 2
|
|
362
362
|
}, 1032, ["label", "prop", "rules"])) : h("", !0),
|
|
363
|
-
|
|
363
|
+
f == "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
|
+
E(z, null, {
|
|
369
369
|
default: s(() => [
|
|
370
370
|
k(i.$slots, "append", {}, void 0, !0)
|
|
371
371
|
]),
|
|
@@ -376,22 +376,22 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
376
376
|
}, 8, ["model", "label-width", "inline"]);
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
}),
|
|
379
|
+
}), ve = /* @__PURE__ */ R(ye, [["__scopeId", "data-v-9fb8ae2f"]]), Ce = /* @__PURE__ */ S({
|
|
380
380
|
__name: "tableColumnItem",
|
|
381
381
|
props: {
|
|
382
382
|
tableColumn: {}
|
|
383
383
|
},
|
|
384
384
|
setup(t) {
|
|
385
|
-
const u =
|
|
385
|
+
const u = A(), d = t, c = () => {
|
|
386
386
|
const { tableColumn: l } = d;
|
|
387
387
|
return l.children?.length || delete l.children, l;
|
|
388
388
|
};
|
|
389
389
|
return (l, i) => {
|
|
390
|
-
const g = r("el-table-column"),
|
|
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
|
+
}), T({ _: 2 }, [
|
|
395
395
|
l.tableColumn.prop && u[l.tableColumn.prop] ? {
|
|
396
396
|
name: "default",
|
|
397
397
|
fn: s((m) => [
|
|
@@ -407,15 +407,15 @@ const te = { class: "flex items-center justify-between" }, ae = { 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, (m, b) => (a(), o(
|
|
410
|
+
(a(!0), v(V, null, D(l.tableColumn.children, (m, b) => (a(), o(p, {
|
|
411
411
|
key: b,
|
|
412
412
|
"table-column": { align: m.align || l.tableColumn.align, ...m }
|
|
413
|
-
},
|
|
413
|
+
}, T({ _: 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: M }) => [
|
|
417
|
+
k(l.$slots, C, { row: M }, () => [
|
|
418
|
+
I(x(M[C]), 1)
|
|
419
419
|
])
|
|
420
420
|
])
|
|
421
421
|
}))
|
|
@@ -425,7 +425,7 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
425
425
|
}, 8, ["align", "label"]));
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
}),
|
|
428
|
+
}), ke = /* @__PURE__ */ S({
|
|
429
429
|
name: "EasyTable",
|
|
430
430
|
__name: "index",
|
|
431
431
|
props: {
|
|
@@ -460,75 +460,75 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
462
|
setup(t) {
|
|
463
|
-
const u = t, d =
|
|
464
|
-
let g =
|
|
465
|
-
const
|
|
463
|
+
const u = t, d = j(() => (u.buttonWidth.toString().indexOf("px") > -1 ? u.buttonWidth.toString().slice(0, -2) : u.buttonWidth, u.buttonWidth)), c = A(), l = U(), i = U("auto");
|
|
464
|
+
let g = Z();
|
|
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 W = g?.refs.tableRef, { top: Y } = W?.getBoundingClientRect();
|
|
470
|
+
y = document.documentElement.clientHeight - Y - 65 - 20;
|
|
471
471
|
} catch {
|
|
472
472
|
}
|
|
473
473
|
return y;
|
|
474
474
|
}
|
|
475
475
|
return y;
|
|
476
|
-
}, m =
|
|
476
|
+
}, m = U(), b = () => {
|
|
477
477
|
m.value && clearTimeout(m.value), m.value = setTimeout(() => {
|
|
478
|
-
i.value =
|
|
478
|
+
i.value = p(), m.value = null;
|
|
479
479
|
}, 100);
|
|
480
480
|
};
|
|
481
|
-
return
|
|
482
|
-
i.value =
|
|
483
|
-
}),
|
|
481
|
+
return ee(() => {
|
|
482
|
+
i.value = p(), window.addEventListener("resize", b);
|
|
483
|
+
}), te(() => {
|
|
484
484
|
window.removeEventListener("resize", b);
|
|
485
485
|
}), (y, C) => {
|
|
486
|
-
const
|
|
486
|
+
const M = r("el-button"), B = r("el-table-column"), W = r("el-table"), Y = ae("hasPermi");
|
|
487
487
|
return a(), v("div", {
|
|
488
488
|
ref_key: "tableRef",
|
|
489
489
|
ref: l
|
|
490
490
|
}, [
|
|
491
|
-
|
|
491
|
+
E(W, _({ 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 : $(i)
|
|
495
495
|
}), {
|
|
496
496
|
default: s(() => [
|
|
497
|
-
(a(!0), v(V, null, D(t.tableColumns, (
|
|
497
|
+
(a(!0), v(V, null, D(t.tableColumns, (P, w) => (a(), o(Ce, {
|
|
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, ...P }
|
|
500
|
+
}, T({ _: 2 }, [
|
|
501
|
+
D(c, (z, F) => ({
|
|
502
|
+
name: F,
|
|
503
|
+
fn: s(({ row: f }) => [
|
|
504
|
+
k(y.$slots, F, { row: f }, () => [
|
|
505
|
+
I(x(f[F]), 1)
|
|
506
506
|
], !0)
|
|
507
507
|
])
|
|
508
508
|
}))
|
|
509
509
|
]), 1032, ["table-column"]))), 128)),
|
|
510
|
-
t.buttons && t.buttons.length ? (a(), o(
|
|
510
|
+
t.buttons && t.buttons.length ? (a(), o(B, {
|
|
511
511
|
key: 0,
|
|
512
512
|
align: "center",
|
|
513
513
|
fixed: "right",
|
|
514
514
|
label: "操作",
|
|
515
|
-
width:
|
|
515
|
+
width: $(d)
|
|
516
516
|
}, {
|
|
517
|
-
default: s((
|
|
518
|
-
(a(!0), v(V, null, D(t.buttons, (w,
|
|
519
|
-
key:
|
|
517
|
+
default: s((P) => [
|
|
518
|
+
(a(!0), v(V, null, D(t.buttons, (w, z) => J((a(), o(M, {
|
|
519
|
+
key: z,
|
|
520
520
|
type: w.type.includes("del") ? "danger" : "primary",
|
|
521
521
|
onClick: () => {
|
|
522
|
-
w.click?.(
|
|
522
|
+
w.click?.(P.row);
|
|
523
523
|
},
|
|
524
524
|
link: ""
|
|
525
525
|
}, {
|
|
526
526
|
default: s(() => [
|
|
527
|
-
|
|
527
|
+
I(x(w.label), 1)
|
|
528
528
|
]),
|
|
529
529
|
_: 2
|
|
530
530
|
}, 1032, ["type", "onClick"])), [
|
|
531
|
-
[
|
|
531
|
+
[Y, w.permi ? [w.permi] : [""]]
|
|
532
532
|
])), 128))
|
|
533
533
|
]),
|
|
534
534
|
_: 1
|
|
@@ -539,7 +539,7 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
539
539
|
], 512);
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
}),
|
|
542
|
+
}), De = /* @__PURE__ */ R(ke, [["__scopeId", "data-v-5ca5027f"]]), we = {
|
|
543
543
|
name: "",
|
|
544
544
|
components: {},
|
|
545
545
|
props: {
|
|
@@ -549,13 +549,14 @@ const te = { class: "flex items-center justify-between" }, ae = { class: "flex i
|
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
};
|
|
552
|
-
function
|
|
553
|
-
return d.icon ? (a(), o(
|
|
552
|
+
function _e(t, u, d, c, l, i) {
|
|
553
|
+
return d.icon ? (a(), o(le(d.icon), {
|
|
554
554
|
key: 0,
|
|
555
555
|
class: "menu_icon"
|
|
556
556
|
})) : h("", !0);
|
|
557
557
|
}
|
|
558
|
-
const
|
|
558
|
+
const q = /* @__PURE__ */ R(we, [["render", _e], ["__scopeId", "data-v-261ce99a"]]), Ve = /* @__PURE__ */ S({
|
|
559
|
+
name: "subMenu",
|
|
559
560
|
__name: "subMenu",
|
|
560
561
|
props: {
|
|
561
562
|
routeData: {
|
|
@@ -570,16 +571,16 @@ const L = /* @__PURE__ */ T(be, [["render", ye], ["__scopeId", "data-v-261ce99a"
|
|
|
570
571
|
d("handleMenuItemClick", l);
|
|
571
572
|
}
|
|
572
573
|
return (l, i) => {
|
|
573
|
-
const g = r("subMenu", !0),
|
|
574
|
-
return t.routeData.children && t.routeData.children.length > 0 ? (a(), o(
|
|
574
|
+
const g = r("subMenu", !0), p = r("el-sub-menu"), m = r("el-menu-item");
|
|
575
|
+
return t.routeData.children && t.routeData.children.length > 0 ? (a(), o(p, {
|
|
575
576
|
key: 0,
|
|
576
577
|
index: t.routeData.path
|
|
577
578
|
}, {
|
|
578
579
|
title: s(() => [
|
|
579
|
-
|
|
580
|
+
E(q, {
|
|
580
581
|
icon: t.routeData.meta.icon
|
|
581
582
|
}, null, 8, ["icon"]),
|
|
582
|
-
|
|
583
|
+
H("span", null, x(t.routeData.meta.title), 1)
|
|
583
584
|
]),
|
|
584
585
|
default: s(() => [
|
|
585
586
|
(a(!0), v(V, null, D(t.routeData.children, (b, y) => (a(), o(g, {
|
|
@@ -593,14 +594,14 @@ const L = /* @__PURE__ */ T(be, [["render", ye], ["__scopeId", "data-v-261ce99a"
|
|
|
593
594
|
key: 1,
|
|
594
595
|
onClick: i[0] || (i[0] = (b) => c(t.routeData))
|
|
595
596
|
}, [
|
|
596
|
-
|
|
597
|
+
E(m, {
|
|
597
598
|
index: t.routeData.path
|
|
598
599
|
}, {
|
|
599
600
|
title: s(() => [
|
|
600
|
-
|
|
601
|
+
H("span", null, x(t.routeData.meta.title), 1)
|
|
601
602
|
]),
|
|
602
603
|
default: s(() => [
|
|
603
|
-
|
|
604
|
+
E(q, {
|
|
604
605
|
icon: t.routeData.meta.icon
|
|
605
606
|
}, null, 8, ["icon"])
|
|
606
607
|
]),
|
|
@@ -609,7 +610,7 @@ const L = /* @__PURE__ */ T(be, [["render", ye], ["__scopeId", "data-v-261ce99a"
|
|
|
609
610
|
]));
|
|
610
611
|
};
|
|
611
612
|
}
|
|
612
|
-
}),
|
|
613
|
+
}), xe = /* @__PURE__ */ S({
|
|
613
614
|
name: "MenuTree",
|
|
614
615
|
__name: "index",
|
|
615
616
|
props: {
|
|
@@ -625,10 +626,10 @@ const L = /* @__PURE__ */ T(be, [["render", ye], ["__scopeId", "data-v-261ce99a"
|
|
|
625
626
|
};
|
|
626
627
|
return (l, i) => {
|
|
627
628
|
const g = r("el-menu");
|
|
628
|
-
return a(), o(g,
|
|
629
|
+
return a(), o(g, ne(oe(l.$attrs)), {
|
|
629
630
|
default: s(() => [
|
|
630
|
-
(a(!0), v(V, null, D(t.menuList, (
|
|
631
|
-
routeData:
|
|
631
|
+
(a(!0), v(V, null, D(t.menuList, (p) => (a(), o(Ve, {
|
|
632
|
+
routeData: p,
|
|
632
633
|
onHandleMenuItemClick: c
|
|
633
634
|
}, null, 8, ["routeData"]))), 256))
|
|
634
635
|
]),
|
|
@@ -636,7 +637,7 @@ const L = /* @__PURE__ */ T(be, [["render", ye], ["__scopeId", "data-v-261ce99a"
|
|
|
636
637
|
}, 16);
|
|
637
638
|
};
|
|
638
639
|
}
|
|
639
|
-
}),
|
|
640
|
+
}), $e = /* @__PURE__ */ S({
|
|
640
641
|
name: "Pagination",
|
|
641
642
|
__name: "index",
|
|
642
643
|
props: {
|
|
@@ -665,14 +666,14 @@ const L = /* @__PURE__ */ T(be, [["render", ye], ["__scopeId", "data-v-261ce99a"
|
|
|
665
666
|
},
|
|
666
667
|
emits: ["update:page", "update:limit", "pagination"],
|
|
667
668
|
setup(t, { emit: u }) {
|
|
668
|
-
const d = t, c = u, l =
|
|
669
|
+
const d = t, c = u, l = j({
|
|
669
670
|
get() {
|
|
670
671
|
return d.page;
|
|
671
672
|
},
|
|
672
673
|
set(m) {
|
|
673
674
|
c("update:page", m);
|
|
674
675
|
}
|
|
675
|
-
}), i =
|
|
676
|
+
}), i = j({
|
|
676
677
|
get() {
|
|
677
678
|
return d.limit;
|
|
678
679
|
},
|
|
@@ -681,16 +682,16 @@ const L = /* @__PURE__ */ T(be, [["render", ye], ["__scopeId", "data-v-261ce99a"
|
|
|
681
682
|
}
|
|
682
683
|
}), g = (m) => {
|
|
683
684
|
l.value * m > d.total && (l.value = 1), c("pagination", { page: l.value, limit: m });
|
|
684
|
-
},
|
|
685
|
+
}, p = (m) => {
|
|
685
686
|
c("pagination", { page: m, limit: i.value });
|
|
686
687
|
};
|
|
687
688
|
return (m, b) => {
|
|
688
689
|
const y = r("el-pagination");
|
|
689
|
-
return
|
|
690
|
-
"current-page":
|
|
691
|
-
"onUpdate:currentPage": b[0] || (b[0] = (C) =>
|
|
692
|
-
"page-size":
|
|
693
|
-
"onUpdate:pageSize": b[1] || (b[1] = (C) =>
|
|
690
|
+
return J((a(), o(y, {
|
|
691
|
+
"current-page": $(l),
|
|
692
|
+
"onUpdate:currentPage": b[0] || (b[0] = (C) => O(l) ? l.value = C : null),
|
|
693
|
+
"page-size": $(i),
|
|
694
|
+
"onUpdate:pageSize": b[1] || (b[1] = (C) => O(i) ? i.value = C : null),
|
|
694
695
|
background: !0,
|
|
695
696
|
"page-sizes": [10, 20, 30, 50, 100],
|
|
696
697
|
"pager-count": t.pagerCount,
|
|
@@ -698,31 +699,31 @@ const L = /* @__PURE__ */ T(be, [["render", ye], ["__scopeId", "data-v-261ce99a"
|
|
|
698
699
|
class: "pagination",
|
|
699
700
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
700
701
|
onSizeChange: g,
|
|
701
|
-
onCurrentChange:
|
|
702
|
+
onCurrentChange: p
|
|
702
703
|
}, null, 8, ["current-page", "page-size", "pager-count", "total"])), [
|
|
703
|
-
[
|
|
704
|
+
[re, t.total > 0]
|
|
704
705
|
]);
|
|
705
706
|
};
|
|
706
707
|
}
|
|
707
|
-
}),
|
|
708
|
-
de,
|
|
709
|
-
ce,
|
|
708
|
+
}), He = /* @__PURE__ */ R($e, [["__scopeId", "data-v-3d378ae6"]]), Se = [
|
|
710
709
|
fe,
|
|
711
710
|
ge,
|
|
712
|
-
|
|
713
|
-
De
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
711
|
+
ve,
|
|
712
|
+
De,
|
|
713
|
+
xe,
|
|
714
|
+
He
|
|
715
|
+
], G = [], Me = (t) => {
|
|
716
|
+
Se.forEach((u) => {
|
|
717
|
+
G.push(u.name), t.component(u.name, u);
|
|
718
|
+
}), console.log("mwl-components", G);
|
|
719
|
+
}, Ee = { install: Me };
|
|
719
720
|
export {
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
721
|
+
fe as ContentWarp,
|
|
722
|
+
ge as Dialog,
|
|
723
|
+
ve as EasyForm,
|
|
724
|
+
De as EasyTable,
|
|
725
|
+
xe as MenuTree,
|
|
726
|
+
He as Pagination,
|
|
727
|
+
Ee as default,
|
|
728
|
+
Me as install
|
|
728
729
|
};
|
package/package.json
CHANGED
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 zzm
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|