@zl-ui-kit/components 0.22.1 → 0.24.0
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 +108 -60
- package/dist/components/ZlAppLayout/Vertical2.vue.mjs +39 -41
- package/dist/components/ZlAppSlogan/index.css +1 -1
- package/dist/components/ZlAppSlogan/index.vue.d.ts +1 -1
- package/dist/components/ZlAppSlogan/index.vue.mjs +19 -12
- package/dist/components/ZlButton/index.vue.d.ts +19 -2
- package/dist/components/ZlButton/index.vue.mjs +30 -14
- package/dist/components/ZlCopy/index.css +1 -1
- package/dist/components/ZlCopy/index.vue.mjs +2 -2
- package/dist/components/ZlCopy/index2.vue.mjs +30 -32
- package/dist/components/ZlDevMenu/index.vue.mjs +34 -33
- package/dist/components/ZlDialog/index.vue.mjs +26 -25
- package/dist/components/ZlDrawer/index.vue.mjs +23 -22
- package/dist/components/ZlLogin/components/LoginForm.css +1 -1
- package/dist/components/ZlLogin/components/LoginForm.vue.mjs +1 -1
- package/dist/components/ZlLogin/components/LoginForm2.vue.mjs +26 -25
- package/dist/components/ZlPagination/index.css +1 -1
- package/dist/components/ZlPagination/index.vue.d.ts +21 -1
- package/dist/components/ZlPagination/index.vue.mjs +1 -1
- package/dist/components/ZlPagination/index2.vue.mjs +59 -33
- package/dist/components/ZlPagination/usePagination.d.ts +1 -0
- package/dist/components/ZlPagination/usePagination.mjs +51 -34
- package/dist/components/ZlPopconfirm/index.vue.mjs +25 -24
- package/dist/components/ZlSearch/index.vue.mjs +196 -202
- package/dist/locales/zh-cn.mjs +1 -1
- package/package.json +6 -6
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as m, ref as
|
|
2
|
-
import { useZlT as
|
|
1
|
+
import { defineComponent as m, ref as u, openBlock as y, createElementBlock as x, createElementVNode as r, renderSlot as n, toDisplayString as l, unref as a, createVNode as d, withCtx as _, createTextVNode as z } from "vue";
|
|
2
|
+
import { useZlT as h } from "@zl-ui-kit/composables";
|
|
3
3
|
import { ElMessage as p } from "element-plus";
|
|
4
|
+
import C from "../ZlButton/index.vue.mjs";
|
|
4
5
|
import i from "./copy.mjs";
|
|
5
|
-
const
|
|
6
|
+
const g = { class: "zl-copy" }, k = ["title"], w = /* @__PURE__ */ m({
|
|
6
7
|
name: "ZlCopy",
|
|
7
8
|
__name: "index",
|
|
8
9
|
props: {
|
|
@@ -10,42 +11,39 @@ const k = { class: "zl-copy" }, T = ["title"], w = /* @__PURE__ */ m({
|
|
|
10
11
|
copyText: {}
|
|
11
12
|
},
|
|
12
13
|
setup(e) {
|
|
13
|
-
const c = e, { t: o } =
|
|
14
|
-
async function
|
|
15
|
-
const t = c.copyText ?? c.text ??
|
|
14
|
+
const c = e, { t: o } = h(), s = u(null);
|
|
15
|
+
async function f() {
|
|
16
|
+
const t = c.copyText ?? c.text ?? s.value?.textContent ?? "";
|
|
16
17
|
try {
|
|
17
18
|
await i(t), p.success(o("zl.copy.success", "复制成功"));
|
|
18
19
|
} catch {
|
|
19
20
|
p.error(o("zl.copy.failed", "复制失败"));
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
return (t,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
s
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
l(t.$slots, "default", {}, () => [
|
|
31
|
-
s("span", { title: e.text }, r(e.text), 9, T)
|
|
32
|
-
], !0)
|
|
33
|
-
], 512),
|
|
34
|
-
l(t.$slots, "trigger", { copy: a(i) }, () => [
|
|
35
|
-
z(f, {
|
|
36
|
-
size: "small",
|
|
37
|
-
text: "",
|
|
38
|
-
class: "zl-copy__button",
|
|
39
|
-
onClick: u
|
|
40
|
-
}, {
|
|
41
|
-
default: C(() => [
|
|
42
|
-
h(r(a(o)("zl.copy.copy", "复制")), 1)
|
|
43
|
-
]),
|
|
44
|
-
_: 1
|
|
45
|
-
})
|
|
23
|
+
return (t, T) => (y(), x("div", g, [
|
|
24
|
+
r("span", {
|
|
25
|
+
ref_key: "textRef",
|
|
26
|
+
ref: s,
|
|
27
|
+
class: "zl-copy__text"
|
|
28
|
+
}, [
|
|
29
|
+
n(t.$slots, "default", {}, () => [
|
|
30
|
+
r("span", { title: e.text }, l(e.text), 9, k)
|
|
46
31
|
], !0)
|
|
47
|
-
])
|
|
48
|
-
|
|
32
|
+
], 512),
|
|
33
|
+
n(t.$slots, "trigger", { copy: a(i) }, () => [
|
|
34
|
+
d(C, {
|
|
35
|
+
size: "small",
|
|
36
|
+
text: "",
|
|
37
|
+
class: "zl-copy__button",
|
|
38
|
+
onClick: f
|
|
39
|
+
}, {
|
|
40
|
+
default: _(() => [
|
|
41
|
+
z(l(a(o)("zl.copy.copy", "复制")), 1)
|
|
42
|
+
]),
|
|
43
|
+
_: 1
|
|
44
|
+
})
|
|
45
|
+
], !0)
|
|
46
|
+
]));
|
|
49
47
|
}
|
|
50
48
|
});
|
|
51
49
|
export {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Y, getCurrentInstance as D, ref as u, computed as g, onBeforeUnmount as N, resolveComponent as L, openBlock as d, createElementBlock as c, normalizeStyle as S, createVNode as v, withCtx as w, createElementVNode as i, toDisplayString as b, Fragment as F, renderList as I, normalizeClass as P, createCommentVNode as E } from "vue";
|
|
2
|
+
import Z from "../ZlButton/index.vue.mjs";
|
|
2
3
|
import j from "../ZlIcon/index.vue.mjs";
|
|
3
4
|
const q = { class: "zl-dev-menu__panel" }, A = { class: "zl-dev-menu__title" }, G = { class: "zl-dev-menu__list" }, H = ["onClick"], J = { class: "zl-dev-menu__label" }, K = { class: "zl-dev-menu__path" }, O = {
|
|
4
5
|
key: 0,
|
|
5
6
|
class: "zl-dev-menu__empty"
|
|
6
|
-
},
|
|
7
|
+
}, te = /* @__PURE__ */ Y({
|
|
7
8
|
name: "ZlDevMenu",
|
|
8
9
|
__name: "index",
|
|
9
10
|
props: {
|
|
@@ -16,30 +17,30 @@ const q = { class: "zl-dev-menu__panel" }, A = { class: "zl-dev-menu__title" },
|
|
|
16
17
|
offsetBottom: { default: 20 }
|
|
17
18
|
},
|
|
18
19
|
setup(p, { expose: V }) {
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
20
|
+
const l = p, m = D()?.appContext.config.globalProperties.$router, r = u(l.offsetRight), f = u(l.offsetBottom), a = u(!1), h = u(""), y = g(() => {
|
|
21
|
+
if (l.routes?.length) return l.routes;
|
|
21
22
|
const t = /* @__PURE__ */ new Set();
|
|
22
|
-
return (m?.getRoutes?.() ?? []).filter((e) => e.path && !e.redirect && !e.path.includes(":")).filter((e) => t.has(e.path) ? !1 : (t.add(e.path), !0)).map((e) => ({ label: e.meta?.title || e.path, path: e.path })).sort((e,
|
|
23
|
-
}),
|
|
23
|
+
return (m?.getRoutes?.() ?? []).filter((e) => e.path && !e.redirect && !e.path.includes(":")).filter((e) => t.has(e.path) ? !1 : (t.add(e.path), !0)).map((e) => ({ label: e.meta?.title || e.path, path: e.path })).sort((e, n) => e.path.localeCompare(n.path));
|
|
24
|
+
}), z = g(() => {
|
|
24
25
|
const t = h.value.trim().toLowerCase();
|
|
25
|
-
return t ?
|
|
26
|
-
}),
|
|
27
|
-
function
|
|
28
|
-
a.value = !1,
|
|
26
|
+
return t ? y.value.filter((e) => `${e.label} ${e.path}`.toLowerCase().includes(t)) : y.value;
|
|
27
|
+
}), $ = g(() => m?.currentRoute?.value?.path ?? "");
|
|
28
|
+
function R(t) {
|
|
29
|
+
a.value = !1, l.navigate ? l.navigate(t.path) : m?.push?.(t.path);
|
|
29
30
|
}
|
|
30
|
-
let
|
|
31
|
+
let C = 0, k = 0, x = 0, M = 0, s = !1;
|
|
31
32
|
function _(t) {
|
|
32
|
-
const e =
|
|
33
|
-
!s && (Math.abs(e) > 3 || Math.abs(
|
|
33
|
+
const e = C - t.clientX, n = k - t.clientY;
|
|
34
|
+
!s && (Math.abs(e) > 3 || Math.abs(n) > 3) && (s = !0), s && (r.value = Math.max(8, x + e), f.value = Math.max(8, M + n));
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
-
window.removeEventListener("mousemove", _), s && (
|
|
36
|
+
function B() {
|
|
37
|
+
window.removeEventListener("mousemove", _), s && (r.value = l.offsetRight);
|
|
37
38
|
}
|
|
38
39
|
function U(t) {
|
|
39
|
-
|
|
40
|
+
l.draggable && (C = t.clientX, k = t.clientY, x = r.value, M = f.value, s = !1, window.addEventListener("mousemove", _), window.addEventListener("mouseup", B, { once: !0 }));
|
|
40
41
|
}
|
|
41
|
-
return
|
|
42
|
-
window.removeEventListener("mousemove", _), window.removeEventListener("mouseup",
|
|
42
|
+
return N(() => {
|
|
43
|
+
window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", B);
|
|
43
44
|
}), V({
|
|
44
45
|
/** 展开路由面板 */
|
|
45
46
|
open: () => {
|
|
@@ -50,14 +51,14 @@ const q = { class: "zl-dev-menu__panel" }, A = { class: "zl-dev-menu__title" },
|
|
|
50
51
|
a.value = !1;
|
|
51
52
|
}
|
|
52
53
|
}), (t, e) => {
|
|
53
|
-
const
|
|
54
|
+
const n = L("el-input"), X = L("el-popover");
|
|
54
55
|
return p.visible ? (d(), c("div", {
|
|
55
56
|
key: 0,
|
|
56
57
|
class: "zl-dev-menu",
|
|
57
|
-
style:
|
|
58
|
+
style: S({ right: `${r.value}px`, bottom: `${f.value}px` }),
|
|
58
59
|
onMousedown: U
|
|
59
60
|
}, [
|
|
60
|
-
v(
|
|
61
|
+
v(X, {
|
|
61
62
|
visible: a.value,
|
|
62
63
|
"onUpdate:visible": e[1] || (e[1] = (o) => a.value = o),
|
|
63
64
|
trigger: "click",
|
|
@@ -65,7 +66,7 @@ const q = { class: "zl-dev-menu__panel" }, A = { class: "zl-dev-menu__title" },
|
|
|
65
66
|
width: 320
|
|
66
67
|
}, {
|
|
67
68
|
reference: w(() => [
|
|
68
|
-
v(
|
|
69
|
+
v(Z, {
|
|
69
70
|
class: "zl-dev-menu__button",
|
|
70
71
|
circle: ""
|
|
71
72
|
}, {
|
|
@@ -76,24 +77,24 @@ const q = { class: "zl-dev-menu__panel" }, A = { class: "zl-dev-menu__title" },
|
|
|
76
77
|
})
|
|
77
78
|
]),
|
|
78
79
|
default: w(() => [
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
v(
|
|
80
|
+
i("div", q, [
|
|
81
|
+
i("div", A, b(p.title), 1),
|
|
82
|
+
v(n, {
|
|
82
83
|
modelValue: h.value,
|
|
83
84
|
"onUpdate:modelValue": e[0] || (e[0] = (o) => h.value = o),
|
|
84
85
|
placeholder: "搜索路由",
|
|
85
86
|
clearable: ""
|
|
86
87
|
}, null, 8, ["modelValue"]),
|
|
87
|
-
|
|
88
|
-
(d(!0), c(
|
|
88
|
+
i("div", G, [
|
|
89
|
+
(d(!0), c(F, null, I(z.value, (o) => (d(), c("div", {
|
|
89
90
|
key: o.path,
|
|
90
|
-
class:
|
|
91
|
-
onClick: (Q) =>
|
|
91
|
+
class: P(["zl-dev-menu__item", { "is-active": o.path === $.value }]),
|
|
92
|
+
onClick: (Q) => R(o)
|
|
92
93
|
}, [
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
i("span", J, b(o.label), 1),
|
|
95
|
+
i("span", K, b(o.path), 1)
|
|
95
96
|
], 10, H))), 128)),
|
|
96
|
-
|
|
97
|
+
z.value.length ? E("", !0) : (d(), c("div", O, "未匹配到路由"))
|
|
97
98
|
])
|
|
98
99
|
])
|
|
99
100
|
]),
|
|
@@ -104,6 +105,6 @@ const q = { class: "zl-dev-menu__panel" }, A = { class: "zl-dev-menu__title" },
|
|
|
104
105
|
}
|
|
105
106
|
});
|
|
106
107
|
export {
|
|
107
|
-
|
|
108
|
+
te as default
|
|
108
109
|
};
|
|
109
110
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, useModel as z, ref as w, computed as c, useAttrs as x, resolveComponent as A, resolveDirective as D, openBlock as d, createBlock as f, mergeProps as _, withCtx as n, withDirectives as $, createElementBlock as M, renderSlot as m, createTextVNode as g, toDisplayString as v, unref as N, createCommentVNode as T, createVNode as Z, mergeModels as O } from "vue";
|
|
2
2
|
import { useZlT as S } from "@zl-ui-kit/composables";
|
|
3
|
-
|
|
3
|
+
import y from "../ZlButton/index.vue.mjs";
|
|
4
|
+
const E = { class: "zl-dialog__body" }, j = /* @__PURE__ */ h({
|
|
4
5
|
name: "ZlDialog",
|
|
5
6
|
inheritAttrs: !1,
|
|
6
7
|
__name: "index",
|
|
@@ -17,12 +18,12 @@ const E = { class: "zl-dialog__body" }, U = /* @__PURE__ */ z({
|
|
|
17
18
|
}),
|
|
18
19
|
emits: ["update:visible"],
|
|
19
20
|
setup(e) {
|
|
20
|
-
const { t: i } = S(), o = e, t =
|
|
21
|
+
const { t: i } = S(), o = e, t = z(e, "visible");
|
|
21
22
|
async function r() {
|
|
22
23
|
o.onCancel && !await o.onCancel() || (t.value = !1);
|
|
23
24
|
}
|
|
24
|
-
const s =
|
|
25
|
-
async function
|
|
25
|
+
const s = w(!1);
|
|
26
|
+
async function p() {
|
|
26
27
|
s.value = !0;
|
|
27
28
|
try {
|
|
28
29
|
await o.onOk?.(), o.autoCloseAfterConfirm && (t.value = !1);
|
|
@@ -32,44 +33,44 @@ const E = { class: "zl-dialog__body" }, U = /* @__PURE__ */ z({
|
|
|
32
33
|
s.value = !1;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
-
return (l,
|
|
37
|
-
const
|
|
38
|
-
return d(),
|
|
36
|
+
const C = c(() => o.readonly ? i("zl.dialog.close", "关闭") : i("zl.dialog.confirm", "确定")), k = x(), b = c(() => ({ width: "600px", "destroy-on-close": !0, ...k }));
|
|
37
|
+
return (l, a) => {
|
|
38
|
+
const B = A("el-dialog"), V = D("loading");
|
|
39
|
+
return d(), f(B, _({
|
|
39
40
|
class: ["zl-dialog", { "zl-dialog--no-footer": !e.footerVisible }]
|
|
40
|
-
},
|
|
41
|
+
}, b.value, {
|
|
41
42
|
modelValue: t.value,
|
|
42
|
-
"onUpdate:modelValue":
|
|
43
|
+
"onUpdate:modelValue": a[1] || (a[1] = (u) => t.value = u),
|
|
43
44
|
"before-close": r
|
|
44
45
|
}), {
|
|
45
|
-
footer:
|
|
46
|
-
|
|
47
|
-
e.readonly ?
|
|
46
|
+
footer: n(() => [
|
|
47
|
+
m(l.$slots, "footer", {}, () => [
|
|
48
|
+
e.readonly ? T("", !0) : (d(), f(y, {
|
|
48
49
|
key: 0,
|
|
49
50
|
onClick: r
|
|
50
51
|
}, {
|
|
51
|
-
default:
|
|
52
|
-
|
|
52
|
+
default: n(() => [
|
|
53
|
+
g(v(N(i)("zl.dialog.cancel", "取消")), 1)
|
|
53
54
|
]),
|
|
54
55
|
_: 1
|
|
55
56
|
})),
|
|
56
|
-
|
|
57
|
+
Z(y, {
|
|
57
58
|
type: "primary",
|
|
58
59
|
loading: s.value,
|
|
59
|
-
onClick:
|
|
60
|
+
onClick: a[0] || (a[0] = (u) => e.readonly ? r() : p())
|
|
60
61
|
}, {
|
|
61
|
-
default:
|
|
62
|
-
|
|
62
|
+
default: n(() => [
|
|
63
|
+
g(v(C.value), 1)
|
|
63
64
|
]),
|
|
64
65
|
_: 1
|
|
65
66
|
}, 8, ["loading"])
|
|
66
67
|
])
|
|
67
68
|
]),
|
|
68
|
-
default:
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
default: n(() => [
|
|
70
|
+
$((d(), M("div", E, [
|
|
71
|
+
m(l.$slots, "default")
|
|
71
72
|
])), [
|
|
72
|
-
[
|
|
73
|
+
[V, e.loading]
|
|
73
74
|
])
|
|
74
75
|
]),
|
|
75
76
|
_: 3
|
|
@@ -78,6 +79,6 @@ const E = { class: "zl-dialog__body" }, U = /* @__PURE__ */ z({
|
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
export {
|
|
81
|
-
|
|
82
|
+
j as default
|
|
82
83
|
};
|
|
83
84
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, useModel as V, ref as h, computed as u, useAttrs as A, resolveComponent as D, resolveDirective as x, openBlock as d, createBlock as f, mergeProps as _, withCtx as a, withDirectives as $, createElementBlock as M, renderSlot as m, createTextVNode as v, toDisplayString as y, unref as N, createCommentVNode as T, createVNode as Z, mergeModels as O } from "vue";
|
|
2
2
|
import { useZlT as S } from "@zl-ui-kit/composables";
|
|
3
|
-
|
|
3
|
+
import w from "../ZlButton/index.vue.mjs";
|
|
4
|
+
const E = { class: "zl-drawer__body" }, j = /* @__PURE__ */ B({
|
|
4
5
|
name: "ZlDrawer",
|
|
5
6
|
inheritAttrs: !1,
|
|
6
7
|
__name: "index",
|
|
@@ -17,12 +18,12 @@ const E = { class: "zl-drawer__body" }, U = /* @__PURE__ */ V({
|
|
|
17
18
|
}),
|
|
18
19
|
emits: ["update:visible"],
|
|
19
20
|
setup(o) {
|
|
20
|
-
const { t:
|
|
21
|
+
const { t: n } = S(), l = o, r = V(o, "visible");
|
|
21
22
|
async function s() {
|
|
22
23
|
l.onCancel && !await l.onCancel() || (r.value = !1);
|
|
23
24
|
}
|
|
24
|
-
const i =
|
|
25
|
-
async function
|
|
25
|
+
const i = h(!1);
|
|
26
|
+
async function C() {
|
|
26
27
|
i.value = !0;
|
|
27
28
|
try {
|
|
28
29
|
await l.onOk?.(), l.autoCloseAfterConfirm && (r.value = !1);
|
|
@@ -32,47 +33,47 @@ const E = { class: "zl-drawer__body" }, U = /* @__PURE__ */ V({
|
|
|
32
33
|
i.value = !1;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
+
const p = u(() => l.readonly ? n("zl.drawer.close", "关闭") : n("zl.drawer.confirm", "确定")), g = A(), k = u(() => {
|
|
36
37
|
const { width: e, ...t } = g;
|
|
37
38
|
return { size: 600, ...e !== void 0 ? { size: e } : {}, "destroy-on-close": !0, ...t };
|
|
38
39
|
});
|
|
39
40
|
return (e, t) => {
|
|
40
|
-
const
|
|
41
|
-
return d(),
|
|
41
|
+
const b = D("el-drawer"), z = x("loading");
|
|
42
|
+
return d(), f(b, _({
|
|
42
43
|
class: ["zl-drawer", { "zl-drawer--no-footer": !o.footerVisible }]
|
|
43
44
|
}, k.value, {
|
|
44
45
|
modelValue: r.value,
|
|
45
46
|
"onUpdate:modelValue": t[1] || (t[1] = (c) => r.value = c),
|
|
46
47
|
"before-close": s
|
|
47
48
|
}), {
|
|
48
|
-
footer:
|
|
49
|
-
|
|
50
|
-
o.readonly ?
|
|
49
|
+
footer: a(() => [
|
|
50
|
+
m(e.$slots, "footer", {}, () => [
|
|
51
|
+
o.readonly ? T("", !0) : (d(), f(w, {
|
|
51
52
|
key: 0,
|
|
52
53
|
onClick: s
|
|
53
54
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
|
|
55
|
+
default: a(() => [
|
|
56
|
+
v(y(N(n)("zl.drawer.cancel", "取消")), 1)
|
|
56
57
|
]),
|
|
57
58
|
_: 1
|
|
58
59
|
})),
|
|
59
|
-
|
|
60
|
+
Z(w, {
|
|
60
61
|
type: "primary",
|
|
61
62
|
loading: i.value,
|
|
62
|
-
onClick: t[0] || (t[0] = (c) => o.readonly ? s() :
|
|
63
|
+
onClick: t[0] || (t[0] = (c) => o.readonly ? s() : C())
|
|
63
64
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
65
|
+
default: a(() => [
|
|
66
|
+
v(y(p.value), 1)
|
|
66
67
|
]),
|
|
67
68
|
_: 1
|
|
68
69
|
}, 8, ["loading"])
|
|
69
70
|
])
|
|
70
71
|
]),
|
|
71
|
-
default:
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
default: a(() => [
|
|
73
|
+
$((d(), M("div", E, [
|
|
74
|
+
m(e.$slots, "default")
|
|
74
75
|
])), [
|
|
75
|
-
[
|
|
76
|
+
[z, o.loading]
|
|
76
77
|
])
|
|
77
78
|
]),
|
|
78
79
|
_: 3
|
|
@@ -81,6 +82,6 @@ const E = { class: "zl-drawer__body" }, U = /* @__PURE__ */ V({
|
|
|
81
82
|
}
|
|
82
83
|
});
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
+
j as default
|
|
85
86
|
};
|
|
86
87
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-login__action[data-v-
|
|
1
|
+
.zl-login__action[data-v-4085ea37]{margin-top:15px}[data-v-4085ea37] .el-form-item{margin-bottom:20px}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./LoginForm2.vue.mjs";
|
|
2
2
|
import './LoginForm.css';/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4085ea37"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,48 +1,49 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useZlT as
|
|
1
|
+
import { defineComponent as k, ref as u, reactive as y, computed as z, resolveComponent as m, openBlock as _, createBlock as V, withModifiers as C, withCtx as n, createVNode as r, unref as s, createTextVNode as S, toDisplayString as R, createElementBlock as q, renderSlot as P, createCommentVNode as x } from "vue";
|
|
2
|
+
import { useZlT as B } from "@zl-ui-kit/composables";
|
|
3
|
+
import F from "../../ZlButton/index.vue.mjs";
|
|
3
4
|
import L from "./SlideChecker.vue.mjs";
|
|
4
5
|
const N = {
|
|
5
6
|
key: 0,
|
|
6
7
|
class: "zl-login__action"
|
|
7
|
-
},
|
|
8
|
+
}, D = /* @__PURE__ */ k({
|
|
8
9
|
name: "ZlLoginForm",
|
|
9
10
|
__name: "LoginForm",
|
|
10
11
|
props: {
|
|
11
12
|
onSubmit: { type: Function }
|
|
12
13
|
},
|
|
13
14
|
setup(h) {
|
|
14
|
-
const { t: e } =
|
|
15
|
+
const { t: e } = B(), p = h, c = u(), l = y({}), v = z(() => ({
|
|
15
16
|
username: [{ required: !0, message: e("zl.login.usernamePlaceholder", "请输入用户名") }],
|
|
16
17
|
password: [{ required: !0, message: e("zl.login.passwordPlaceholder", "请输入密码") }],
|
|
17
18
|
slideChecked: [
|
|
18
19
|
{ type: "boolean", required: !0, message: e("zl.login.slideRequired", "请将滑块移至右侧") }
|
|
19
20
|
]
|
|
20
|
-
})), f =
|
|
21
|
-
async function
|
|
21
|
+
})), f = u(null), i = u(!1);
|
|
22
|
+
async function b() {
|
|
22
23
|
try {
|
|
23
24
|
if (await f.value?.validate().catch((o) => o) !== !0) return;
|
|
24
25
|
i.value = !0, p.onSubmit && await p.onSubmit(l), i.value = !1;
|
|
25
|
-
} catch (
|
|
26
|
-
i.value = !1, c.value?.reset(), console.error("Login Submit: ",
|
|
26
|
+
} catch (t) {
|
|
27
|
+
i.value = !1, c.value?.reset(), console.error("Login Submit: ", t);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
return (
|
|
30
|
-
const g =
|
|
31
|
-
return _(),
|
|
30
|
+
return (t, o) => {
|
|
31
|
+
const g = m("el-input"), d = m("el-form-item"), w = m("el-form");
|
|
32
|
+
return _(), V(w, {
|
|
32
33
|
ref_key: "formRef",
|
|
33
34
|
ref: f,
|
|
34
35
|
model: l,
|
|
35
|
-
rules:
|
|
36
|
+
rules: v.value,
|
|
36
37
|
"label-position": "top",
|
|
37
|
-
onSubmit:
|
|
38
|
+
onSubmit: C(b, ["prevent"])
|
|
38
39
|
}, {
|
|
39
40
|
default: n(() => [
|
|
40
|
-
|
|
41
|
+
r(d, {
|
|
41
42
|
label: s(e)("zl.login.username", "用户名"),
|
|
42
43
|
prop: "username"
|
|
43
44
|
}, {
|
|
44
45
|
default: n(() => [
|
|
45
|
-
|
|
46
|
+
r(g, {
|
|
46
47
|
modelValue: l.username,
|
|
47
48
|
"onUpdate:modelValue": o[0] || (o[0] = (a) => l.username = a),
|
|
48
49
|
placeholder: s(e)("zl.login.usernamePlaceholder", "请输入用户名"),
|
|
@@ -51,12 +52,12 @@ const N = {
|
|
|
51
52
|
]),
|
|
52
53
|
_: 1
|
|
53
54
|
}, 8, ["label"]),
|
|
54
|
-
|
|
55
|
+
r(d, {
|
|
55
56
|
label: s(e)("zl.login.password", "密码"),
|
|
56
57
|
prop: "password"
|
|
57
58
|
}, {
|
|
58
59
|
default: n(() => [
|
|
59
|
-
|
|
60
|
+
r(g, {
|
|
60
61
|
modelValue: l.password,
|
|
61
62
|
"onUpdate:modelValue": o[1] || (o[1] = (a) => l.password = a),
|
|
62
63
|
type: "password",
|
|
@@ -67,9 +68,9 @@ const N = {
|
|
|
67
68
|
]),
|
|
68
69
|
_: 1
|
|
69
70
|
}, 8, ["label"]),
|
|
70
|
-
|
|
71
|
+
r(d, { prop: "slideChecked" }, {
|
|
71
72
|
default: n(() => [
|
|
72
|
-
|
|
73
|
+
r(L, {
|
|
73
74
|
ref_key: "slideCheckerRef",
|
|
74
75
|
ref: c,
|
|
75
76
|
modelValue: l.slideChecked,
|
|
@@ -78,7 +79,7 @@ const N = {
|
|
|
78
79
|
]),
|
|
79
80
|
_: 1
|
|
80
81
|
}),
|
|
81
|
-
|
|
82
|
+
r(F, {
|
|
82
83
|
type: "primary",
|
|
83
84
|
"native-type": "submit",
|
|
84
85
|
size: "large",
|
|
@@ -87,13 +88,13 @@ const N = {
|
|
|
87
88
|
style: { width: "100%", "margin-top": "20px" }
|
|
88
89
|
}, {
|
|
89
90
|
default: n(() => [
|
|
90
|
-
R(
|
|
91
|
+
S(R(s(e)("zl.login.submit", "登 录")), 1)
|
|
91
92
|
]),
|
|
92
93
|
_: 1
|
|
93
94
|
}, 8, ["loading"]),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
])) :
|
|
95
|
+
t.$slots.action ? (_(), q("div", N, [
|
|
96
|
+
P(t.$slots, "action", {}, void 0, !0)
|
|
97
|
+
])) : x("", !0)
|
|
97
98
|
]),
|
|
98
99
|
_: 3
|
|
99
100
|
}, 8, ["model", "rules"]);
|
|
@@ -101,6 +102,6 @@ const N = {
|
|
|
101
102
|
}
|
|
102
103
|
});
|
|
103
104
|
export {
|
|
104
|
-
|
|
105
|
+
D as default
|
|
105
106
|
};
|
|
106
107
|
//# sourceMappingURL=LoginForm2.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.zl-pagination[data-v-
|
|
1
|
+
@charset "UTF-8";.zl-pagination[data-v-0e872ff0]{padding:6px 16px;background-color:var(--zl-fill-1, #f9fbfd);justify-content:var(--zl-pagination-justify, flex-end)}.zl-pagination--left[data-v-0e872ff0]{--zl-pagination-justify: flex-start}.zl-pagination--center[data-v-0e872ff0]{--zl-pagination-justify: center}.zl-pagination--right[data-v-0e872ff0]{--zl-pagination-justify: flex-end}.zl-pagination--full[data-v-0e872ff0] .el-pagination__rightwrapper{flex:1;justify-content:flex-end}.zl-pagination--full[data-v-0e872ff0] .el-pager li.is-active{border:1px solid var(--zl-pagination-active-color, var(--el-color-primary));border-radius:var(--el-border-radius-base, 4px)}.zl-pagination__total-num[data-v-0e872ff0]{color:var(--zl-pagination-total-num-color, var(--el-color-primary))}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
total?(_: {
|
|
5
|
+
total: number;
|
|
6
|
+
pageRows: number;
|
|
7
|
+
pageNum: number;
|
|
8
|
+
pageSize: number;
|
|
9
|
+
}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
2
16
|
change: (payload: {
|
|
3
17
|
pageNum: number;
|
|
4
18
|
pageSize: number;
|
|
@@ -13,5 +27,11 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
13
27
|
"onPage-change"?: ((pageNum: number) => any) | undefined;
|
|
14
28
|
"onPage-size-change"?: ((pageSize: number) => any) | undefined;
|
|
15
29
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
30
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
31
|
export default _default;
|
|
32
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
17
37
|
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.vue.mjs";
|
|
2
2
|
import './index.css';/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0e872ff0"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|