@zl-ui-kit/components 0.26.2 → 0.27.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 +22 -18
- package/dist/components/ZlAction/List.vue.mjs +46 -49
- package/dist/components/ZlAction/index.vue.d.ts +1 -7
- package/dist/components/ZlAction/index.vue.mjs +8 -12
- package/dist/components/ZlAction/types.d.ts +2 -5
- package/dist/components/ZlAppLayout/Horizontal.css +1 -1
- package/dist/components/ZlAppLayout/Vertical.css +1 -1
- package/dist/components/ZlAppLayout/Vertical2.vue.mjs +41 -39
- package/dist/components/ZlAppLayout/index.vue.d.ts +6 -6
- package/dist/components/ZlAppLayout/index.vue.mjs +8 -8
- package/dist/components/ZlAppMenu/AppMenu.css +1 -0
- package/dist/components/ZlAppMenu/AppMenu.vue.d.ts +27 -0
- package/dist/components/ZlAppMenu/AppMenu.vue.mjs +37 -0
- package/dist/components/ZlAppMenu/AppMenu3.vue.mjs +6 -0
- package/dist/components/ZlAppMenu/AppMenuItem.vue.d.ts +11 -0
- package/dist/components/ZlAppMenu/AppMenuItem.vue.mjs +58 -0
- package/dist/components/ZlAppMenu/AppMenuItem2.vue.mjs +5 -0
- 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 +12 -19
- package/dist/components/ZlCardPage/index.vue.d.ts +3 -41
- package/dist/components/ZlCardPage/index.vue.mjs +68 -68
- package/dist/components/ZlCheckboxTag/index.css +1 -1
- package/dist/components/ZlCheckboxTag/index.vue.d.ts +4 -4
- package/dist/components/ZlCheckboxTag/index.vue.mjs +30 -34
- package/dist/components/ZlCopy/copy.mjs +7 -17
- package/dist/components/ZlCopy/index.css +1 -1
- package/dist/components/ZlCopy/index.vue.mjs +2 -2
- package/dist/components/ZlCopy/index2.vue.mjs +36 -34
- package/dist/components/ZlDescription/index.css +1 -1
- package/dist/components/ZlDescription/index.vue.mjs +24 -28
- package/dist/components/ZlDialog/index.css +1 -1
- package/dist/components/ZlDialog/index.vue.d.ts +0 -3
- package/dist/components/ZlDialog/index.vue.mjs +35 -39
- package/dist/components/ZlDictTag/index.vue.d.ts +3 -12
- package/dist/components/ZlDictTag/index.vue.mjs +26 -31
- package/dist/components/ZlDrawer/index.css +1 -1
- package/dist/components/ZlDrawer/index.vue.d.ts +0 -3
- package/dist/components/ZlDrawer/index.vue.mjs +32 -36
- package/dist/components/ZlDynamicComponent/index.vue.d.ts +3 -5
- package/dist/components/ZlForm/index.css +1 -1
- package/dist/components/ZlForm/index.vue.d.ts +0 -7
- package/dist/components/ZlForm/index.vue.mjs +47 -50
- package/dist/components/ZlLayoutSwitch/index.css +1 -1
- package/dist/components/ZlLayoutSwitch/index.vue.d.ts +0 -10
- package/dist/components/ZlLayoutSwitch/index.vue.mjs +1 -1
- package/dist/components/ZlLayoutSwitch/index2.vue.mjs +19 -27
- 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 +25 -26
- package/dist/components/ZlPageContainer/index.css +1 -1
- package/dist/components/ZlPageContainer/index.vue.mjs +1 -1
- package/dist/components/ZlPagination/index.css +1 -1
- package/dist/components/ZlPagination/index.vue.d.ts +1 -21
- package/dist/components/ZlPagination/index.vue.mjs +1 -1
- package/dist/components/ZlPagination/index2.vue.mjs +33 -59
- package/dist/components/ZlPagination/usePagination.d.ts +0 -1
- package/dist/components/ZlPagination/usePagination.mjs +34 -51
- package/dist/components/ZlPopconfirm/index.vue.mjs +24 -25
- package/dist/components/ZlSearch/index.vue.d.ts +0 -25
- package/dist/components/ZlSearch/index.vue.mjs +205 -202
- package/dist/components/ZlSearchTable/index.vue.d.ts +2 -40
- package/dist/components/ZlSearchTable/index.vue.mjs +55 -59
- package/dist/components/ZlTable/useTablePagination.d.ts +0 -1
- package/dist/components/ZlTable/useTablePagination.mjs +23 -37
- package/dist/components/ZlTabs/index.vue.d.ts +3 -16
- package/dist/components/ZlTag/ZlCornerTag.css +1 -1
- package/dist/components/ZlTag/ZlCornerTag.vue.d.ts +1 -14
- package/dist/components/ZlTag/ZlCornerTag.vue.mjs +14 -25
- package/dist/components/ZlTag/index.vue.mjs +4 -4
- package/dist/components/ZlUpload/index.css +1 -1
- package/dist/components/ZlUpload/index.vue.d.ts +3 -44
- package/dist/components/ZlUpload/index.vue.mjs +3 -3
- package/dist/components/ZlUpload/index2.vue.mjs +79 -119
- package/dist/index.d.ts +2 -8
- package/dist/index.mjs +169 -183
- package/dist/locales/en.mjs +2 -2
- package/dist/locales/zh-cn.mjs +3 -3
- package/package.json +5 -5
- package/dist/components/ZlAppLayout/HeaderAside.css +0 -1
- package/dist/components/ZlAppLayout/HeaderAside.vue.d.ts +0 -25
- package/dist/components/ZlAppLayout/HeaderAside.vue.mjs +0 -6
- package/dist/components/ZlAppLayout/HeaderAside2.vue.mjs +0 -65
- package/dist/components/ZlBreadcrumb/index.css +0 -1
- package/dist/components/ZlBreadcrumb/index.vue.d.ts +0 -32
- package/dist/components/ZlBreadcrumb/index.vue.mjs +0 -58
- package/dist/components/ZlBreadcrumb/index3.vue.mjs +0 -6
- package/dist/components/ZlBreadcrumb/types.d.ts +0 -16
- package/dist/components/ZlButton/index.vue.d.ts +0 -81
- package/dist/components/ZlButton/index.vue.mjs +0 -60
- package/dist/components/ZlButton/index2.vue.mjs +0 -5
- package/dist/components/ZlCardPage/resolvePagination.d.ts +0 -20
- package/dist/components/ZlCardPage/resolvePagination.mjs +0 -24
- package/dist/components/ZlDevMenu/index.css +0 -1
- package/dist/components/ZlDevMenu/index.vue.d.ts +0 -33
- package/dist/components/ZlDevMenu/index.vue.mjs +0 -110
- package/dist/components/ZlDevMenu/index3.vue.mjs +0 -6
- package/dist/components/ZlDevMenu/types.d.ts +0 -8
- package/dist/components/ZlLoading/index.css +0 -1
- package/dist/components/ZlLoading/index.vue.d.ts +0 -27
- package/dist/components/ZlLoading/index.vue.mjs +0 -8
- package/dist/components/ZlLoading/index2.vue.mjs +0 -30
- package/dist/components/ZlMenu/MenuIcon.d.ts +0 -17
- package/dist/components/ZlMenu/MenuIcon.mjs +0 -21
- package/dist/components/ZlMenu/ZlMenuItem.vue.d.ts +0 -7
- package/dist/components/ZlMenu/ZlMenuItem.vue.mjs +0 -53
- package/dist/components/ZlMenu/ZlMenuItem2.vue.mjs +0 -5
- package/dist/components/ZlMenu/index.css +0 -1
- package/dist/components/ZlMenu/index.vue.d.ts +0 -40
- package/dist/components/ZlMenu/index.vue.mjs +0 -60
- package/dist/components/ZlMenu/index3.vue.mjs +0 -6
- package/dist/components/ZlMenu/types.d.ts +0 -20
|
@@ -1,87 +1,83 @@
|
|
|
1
|
-
import { defineComponent as B, useModel as
|
|
2
|
-
import { useZlT as
|
|
3
|
-
|
|
4
|
-
const E = { class: "zl-drawer__body" }, j = /* @__PURE__ */ B({
|
|
1
|
+
import { defineComponent as B, useModel as _, ref as h, computed as f, useAttrs as V, resolveComponent as m, resolveDirective as A, openBlock as d, createBlock as v, mergeProps as D, withCtx as r, withDirectives as x, createElementBlock as O, renderSlot as y, createTextVNode as C, toDisplayString as p, unref as M, createCommentVNode as N, createVNode as T, mergeModels as Z } from "vue";
|
|
2
|
+
import { useZlT as $ } from "@zl-ui-kit/composables";
|
|
3
|
+
const S = { class: "zl-drawer__body" }, P = /* @__PURE__ */ B({
|
|
5
4
|
name: "ZlDrawer",
|
|
6
5
|
inheritAttrs: !1,
|
|
7
6
|
__name: "index",
|
|
8
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ Z({
|
|
9
8
|
onCancel: {},
|
|
10
9
|
onOk: {},
|
|
11
10
|
autoCloseAfterConfirm: { type: Boolean, default: !0 },
|
|
12
11
|
readonly: { type: Boolean },
|
|
13
|
-
loading: { type: Boolean }
|
|
14
|
-
footerVisible: { type: Boolean, default: !0 }
|
|
12
|
+
loading: { type: Boolean }
|
|
15
13
|
}, {
|
|
16
14
|
visible: { type: Boolean, default: !1 },
|
|
17
15
|
visibleModifiers: {}
|
|
18
16
|
}),
|
|
19
17
|
emits: ["update:visible"],
|
|
20
|
-
setup(
|
|
21
|
-
const { t:
|
|
18
|
+
setup(l) {
|
|
19
|
+
const { t: a } = $(), o = l, n = _(l, "visible");
|
|
22
20
|
async function s() {
|
|
23
|
-
|
|
21
|
+
o.onCancel && !await o.onCancel() || (n.value = !1);
|
|
24
22
|
}
|
|
25
23
|
const i = h(!1);
|
|
26
|
-
async function
|
|
24
|
+
async function w() {
|
|
27
25
|
i.value = !0;
|
|
28
26
|
try {
|
|
29
|
-
await
|
|
27
|
+
o.onOk && (await o.onOk(), o.autoCloseAfterConfirm && (n.value = !1));
|
|
30
28
|
} catch (e) {
|
|
31
29
|
console.error("[ZlDrawer] handleConfirm: ", e);
|
|
32
30
|
} finally {
|
|
33
31
|
i.value = !1;
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
|
-
const
|
|
37
|
-
const { width: e, ...t } =
|
|
38
|
-
return { size: 600, ...e !== void 0 ? { size: e } : {},
|
|
34
|
+
const k = f(() => o.readonly ? a("zl.drawer.close", "关闭") : a("zl.drawer.confirm", "确定")), g = f(() => {
|
|
35
|
+
const { width: e, ...t } = V();
|
|
36
|
+
return { size: 600, ...e !== void 0 ? { size: e } : {}, destroyOnClose: !0, ...t };
|
|
39
37
|
});
|
|
40
38
|
return (e, t) => {
|
|
41
|
-
const b =
|
|
42
|
-
return d(),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
modelValue: r.value,
|
|
46
|
-
"onUpdate:modelValue": t[1] || (t[1] = (c) => r.value = c),
|
|
39
|
+
const u = m("el-button"), b = m("el-drawer"), z = A("loading");
|
|
40
|
+
return d(), v(b, D({ class: "zl-drawer" }, g.value, {
|
|
41
|
+
modelValue: n.value,
|
|
42
|
+
"onUpdate:modelValue": t[1] || (t[1] = (c) => n.value = c),
|
|
47
43
|
"before-close": s
|
|
48
44
|
}), {
|
|
49
|
-
footer:
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
footer: r(() => [
|
|
46
|
+
y(e.$slots, "footer", {}, () => [
|
|
47
|
+
l.readonly ? N("", !0) : (d(), v(u, {
|
|
52
48
|
key: 0,
|
|
53
49
|
onClick: s
|
|
54
50
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
|
|
51
|
+
default: r(() => [
|
|
52
|
+
C(p(M(a)("zl.drawer.cancel", "取消")), 1)
|
|
57
53
|
]),
|
|
58
54
|
_: 1
|
|
59
55
|
})),
|
|
60
|
-
|
|
56
|
+
T(u, {
|
|
61
57
|
type: "primary",
|
|
62
58
|
loading: i.value,
|
|
63
|
-
onClick: t[0] || (t[0] = (c) =>
|
|
59
|
+
onClick: t[0] || (t[0] = (c) => l.readonly ? s() : w())
|
|
64
60
|
}, {
|
|
65
|
-
default:
|
|
66
|
-
|
|
61
|
+
default: r(() => [
|
|
62
|
+
C(p(k.value), 1)
|
|
67
63
|
]),
|
|
68
64
|
_: 1
|
|
69
65
|
}, 8, ["loading"])
|
|
70
66
|
])
|
|
71
67
|
]),
|
|
72
|
-
default:
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
default: r(() => [
|
|
69
|
+
x((d(), O("div", S, [
|
|
70
|
+
y(e.$slots, "default")
|
|
75
71
|
])), [
|
|
76
|
-
[z,
|
|
72
|
+
[z, l.loading]
|
|
77
73
|
])
|
|
78
74
|
]),
|
|
79
75
|
_: 3
|
|
80
|
-
}, 16, ["
|
|
76
|
+
}, 16, ["modelValue"]);
|
|
81
77
|
};
|
|
82
78
|
}
|
|
83
79
|
});
|
|
84
80
|
export {
|
|
85
|
-
|
|
81
|
+
P as default
|
|
86
82
|
};
|
|
87
83
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { IComponent } from './types';
|
|
3
1
|
/**
|
|
4
2
|
* 动态组件渲染引擎(schema → VNode)
|
|
5
3
|
* schema 见 types.ts;组件名支持全局注册名或组件对象;默认 el-input
|
|
@@ -17,7 +15,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
17
15
|
};
|
|
18
16
|
/** 待渲染组件的 schema 描述,缺省渲染 el-input */
|
|
19
17
|
component: {
|
|
20
|
-
type:
|
|
18
|
+
type: ObjectConstructor;
|
|
21
19
|
default: () => {
|
|
22
20
|
component: string;
|
|
23
21
|
};
|
|
@@ -42,7 +40,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
42
40
|
};
|
|
43
41
|
/** 待渲染组件的 schema 描述,缺省渲染 el-input */
|
|
44
42
|
component: {
|
|
45
|
-
type:
|
|
43
|
+
type: ObjectConstructor;
|
|
46
44
|
default: () => {
|
|
47
45
|
component: string;
|
|
48
46
|
};
|
|
@@ -51,7 +49,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
51
49
|
onInput?: ((_value: any, ..._values: any[]) => any) | undefined;
|
|
52
50
|
"onUpdate:modelValue"?: ((_value: any) => any) | undefined;
|
|
53
51
|
}>, {
|
|
54
|
-
component:
|
|
52
|
+
component: Record<string, any>;
|
|
55
53
|
model: Record<string, any>;
|
|
56
54
|
value: string | number | boolean | unknown[];
|
|
57
55
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
.zl-form-item-label{display:inline-flex;align-items:center;gap:2px}.zl-form-item-label__tooltip{color:var(--zl-text-3, var(--el-text-color-secondary))}
|
|
@@ -4,11 +4,6 @@ type __VLS_Props = {
|
|
|
4
4
|
items: FormItem[];
|
|
5
5
|
/** 表单值对象,不传时由组件内部自建 */
|
|
6
6
|
model?: Record<string, any>;
|
|
7
|
-
/**
|
|
8
|
-
* 表单项 `label` 为空字符串/缺省时不渲染 label 占位(控件直接顶到最左)。
|
|
9
|
-
* 默认 false:即使 label 为空,EP 也会因 #label 插槽存在而保留 label 列占位
|
|
10
|
-
*/
|
|
11
|
-
hideEmptyLabel?: boolean;
|
|
12
7
|
};
|
|
13
8
|
/** el-form 的校验回调:第一个参数为是否通过,失败时第二个参数为错误字段集合 */
|
|
14
9
|
type ValidateCallback = (isValid: boolean, invalidFields?: Record<string, any>) => void;
|
|
@@ -37,7 +32,6 @@ declare function __VLS_template(): {
|
|
|
37
32
|
slot?: boolean;
|
|
38
33
|
slots?: Record<string, any>;
|
|
39
34
|
props: Record<string, any>;
|
|
40
|
-
hideLabel?: boolean;
|
|
41
35
|
};
|
|
42
36
|
}) => any>> & {
|
|
43
37
|
label?(_: {
|
|
@@ -51,7 +45,6 @@ declare function __VLS_template(): {
|
|
|
51
45
|
slot?: boolean;
|
|
52
46
|
slots?: Record<string, any>;
|
|
53
47
|
props: Record<string, any>;
|
|
54
|
-
hideLabel?: boolean;
|
|
55
48
|
};
|
|
56
49
|
}): any;
|
|
57
50
|
default?(_: {}): any;
|
|
@@ -1,72 +1,70 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, toRefs as D, ref as b, computed as V, resolveComponent as m, openBlock as n, createBlock as u, mergeProps as c, withCtx as d, createElementBlock as L, Fragment as M, renderList as S, renderSlot as p, createElementVNode as F, toDisplayString as U, createVNode as q, createCommentVNode as x } from "vue";
|
|
2
2
|
import W from "./ZlFormChild.vue.mjs";
|
|
3
3
|
import j from "../ZlIcon/index.vue.mjs";
|
|
4
|
-
const G = { class: "zl-form-item-label" },
|
|
4
|
+
const G = { class: "zl-form-item-label" }, E = "onUpdate:modelValue", Q = /* @__PURE__ */ A({
|
|
5
5
|
name: "ZlForm",
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
items: { default: () => [] },
|
|
9
|
-
model: {}
|
|
10
|
-
hideEmptyLabel: { type: Boolean }
|
|
9
|
+
model: {}
|
|
11
10
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
11
|
+
setup(g, { expose: h }) {
|
|
12
|
+
const i = g, { items: v } = D(i), y = b(i.model ?? {}), r = V(() => i.model ?? y.value), I = V(() => {
|
|
14
13
|
const e = [];
|
|
15
14
|
return v.value.forEach((l) => {
|
|
16
15
|
if (!l.model)
|
|
17
16
|
throw new Error("[ZlForm]: form item's model is required!");
|
|
18
17
|
l.defaultValue !== void 0 && r.value[l.model] === void 0 && (r.value[l.model] = l.defaultValue);
|
|
19
18
|
}), v.value.forEach((l) => {
|
|
20
|
-
if (!
|
|
19
|
+
if (!P(l)) return;
|
|
21
20
|
const {
|
|
22
|
-
visible:
|
|
21
|
+
visible: s,
|
|
23
22
|
props: a,
|
|
24
23
|
tooltip: f,
|
|
25
24
|
formItemProps: o = {},
|
|
26
|
-
component:
|
|
27
|
-
label:
|
|
28
|
-
model:
|
|
25
|
+
component: $,
|
|
26
|
+
label: z,
|
|
27
|
+
model: C,
|
|
29
28
|
defaultValue: H,
|
|
30
|
-
slot:
|
|
31
|
-
slots:
|
|
32
|
-
...
|
|
33
|
-
} = l,
|
|
34
|
-
delete
|
|
35
|
-
const
|
|
29
|
+
slot: T,
|
|
30
|
+
slots: B,
|
|
31
|
+
...R
|
|
32
|
+
} = l, _ = { ...o };
|
|
33
|
+
delete _.tooltip;
|
|
34
|
+
const Z = { ...R, ...a ?? {} };
|
|
36
35
|
e.push({
|
|
37
|
-
formItemProps:
|
|
36
|
+
formItemProps: _,
|
|
38
37
|
tooltip: f,
|
|
39
|
-
component:
|
|
40
|
-
label:
|
|
41
|
-
model:
|
|
42
|
-
slot:
|
|
43
|
-
slots:
|
|
44
|
-
|
|
45
|
-
props: w(R, l.model)
|
|
38
|
+
component: $,
|
|
39
|
+
label: z,
|
|
40
|
+
model: C,
|
|
41
|
+
slot: T,
|
|
42
|
+
slots: B,
|
|
43
|
+
props: k(Z, l.model)
|
|
46
44
|
});
|
|
47
45
|
}), e;
|
|
48
|
-
}), t =
|
|
49
|
-
function
|
|
46
|
+
}), t = b(null);
|
|
47
|
+
function P(e) {
|
|
50
48
|
const l = e.visible;
|
|
51
49
|
return l === void 0 ? !0 : l === !1 || typeof l == "function" && !l(r.value, e) ? !1 : !!l;
|
|
52
50
|
}
|
|
53
|
-
function
|
|
54
|
-
const
|
|
55
|
-
return e[
|
|
56
|
-
r.value[l] = a,
|
|
51
|
+
function k(e = {}, l) {
|
|
52
|
+
const s = e[E];
|
|
53
|
+
return e[E] = (a) => {
|
|
54
|
+
r.value[l] = a, s?.(a);
|
|
57
55
|
}, e;
|
|
58
56
|
}
|
|
59
|
-
async function
|
|
57
|
+
async function w(e) {
|
|
60
58
|
return await t.value?.validate(e) ?? !0;
|
|
61
59
|
}
|
|
62
|
-
async function
|
|
60
|
+
async function N(e, l) {
|
|
63
61
|
return await t.value?.validateField(e, l) ?? !0;
|
|
64
62
|
}
|
|
65
|
-
return
|
|
63
|
+
return h({
|
|
66
64
|
/** 校验整个表单;同 `el-form.validate()`(无回调时失败会 reject 错误字段集合;0.9.0 及更早成功时返回 `undefined`) */
|
|
67
|
-
validate:
|
|
65
|
+
validate: w,
|
|
68
66
|
/** 校验指定字段(字段名或数组),语义同 `validate()` */
|
|
69
|
-
validateField:
|
|
67
|
+
validateField: N,
|
|
70
68
|
/** 重置字段并清除校验结果;不传参重置全部 */
|
|
71
69
|
resetFields: (e) => t.value?.resetFields(e),
|
|
72
70
|
/** 清除校验提示;不传参清除全部 */
|
|
@@ -86,31 +84,30 @@ const G = { class: "zl-form-item-label" }, y = "onUpdate:modelValue", Q = /* @__
|
|
|
86
84
|
return t.value;
|
|
87
85
|
}
|
|
88
86
|
}), (e, l) => {
|
|
89
|
-
const
|
|
90
|
-
return n(),
|
|
87
|
+
const s = m("el-tooltip"), a = m("el-form-item"), f = m("el-form");
|
|
88
|
+
return n(), u(f, c({
|
|
91
89
|
ref_key: "formRef",
|
|
92
90
|
ref: t,
|
|
93
91
|
class: "zl-form",
|
|
94
92
|
model: r.value
|
|
95
93
|
}, { labelWidth: "auto", ...e.$attrs }), {
|
|
96
|
-
default:
|
|
97
|
-
(n(!0),
|
|
94
|
+
default: d(() => [
|
|
95
|
+
(n(!0), L(M, null, S(I.value, (o) => (n(), u(a, c({
|
|
98
96
|
key: o.model,
|
|
99
97
|
label: o.label,
|
|
100
|
-
prop: o.model
|
|
101
|
-
class: { "zl-form-item--no-label": o.hideLabel }
|
|
98
|
+
prop: o.model
|
|
102
99
|
}, { ref_for: !0 }, o.formItemProps), {
|
|
103
|
-
label:
|
|
104
|
-
|
|
100
|
+
label: d(() => [
|
|
101
|
+
F("span", G, [
|
|
105
102
|
p(e.$slots, "label", c({ ref_for: !0 }, { label: o.label, item: o }), () => [
|
|
106
|
-
|
|
103
|
+
F("span", null, U(o.label), 1)
|
|
107
104
|
]),
|
|
108
|
-
o.tooltip ? (n(),
|
|
105
|
+
o.tooltip ? (n(), u(s, {
|
|
109
106
|
key: 0,
|
|
110
107
|
content: o.tooltip,
|
|
111
108
|
placement: "top"
|
|
112
109
|
}, {
|
|
113
|
-
default:
|
|
110
|
+
default: d(() => [
|
|
114
111
|
q(j, {
|
|
115
112
|
class: "zl-form-item-label__tooltip",
|
|
116
113
|
icon: "zl:help-color"
|
|
@@ -120,18 +117,18 @@ const G = { class: "zl-form-item-label" }, y = "onUpdate:modelValue", Q = /* @__
|
|
|
120
117
|
}, 8, ["content"])) : x("", !0)
|
|
121
118
|
])
|
|
122
119
|
]),
|
|
123
|
-
default:
|
|
120
|
+
default: d(() => [
|
|
124
121
|
o.slot ? p(e.$slots, o.model, {
|
|
125
122
|
model: r.value,
|
|
126
123
|
field: o
|
|
127
|
-
}, void 0, void 0, 0) : (n(),
|
|
124
|
+
}, void 0, void 0, 0) : (n(), u(W, {
|
|
128
125
|
key: 1,
|
|
129
126
|
item: o,
|
|
130
127
|
"model-value": r.value[o.model]
|
|
131
128
|
}, null, 8, ["item", "model-value"]))
|
|
132
129
|
]),
|
|
133
130
|
_: 2
|
|
134
|
-
}, 1040, ["label", "prop"
|
|
131
|
+
}, 1040, ["label", "prop"]))), 128)),
|
|
135
132
|
p(e.$slots, "default")
|
|
136
133
|
]),
|
|
137
134
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-layout-switch
|
|
1
|
+
.zl-layout-switch .el-radio-button[data-v-89c83ab6]{line-height:1;font-size:14px;padding:9px}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
/** 已废弃,请用 `modelValue`;仅在未双向绑定时作为当前布局 */
|
|
3
3
|
value?: 'grid' | 'table';
|
|
4
|
-
/** 网格按钮文案:缺省走 i18n(卡片),传空字符串则只显示图标 */
|
|
5
|
-
gridText?: string;
|
|
6
|
-
/** 表格按钮文案:缺省走 i18n(列表),传空字符串则只显示图标 */
|
|
7
|
-
tableText?: string;
|
|
8
|
-
/** 网格按钮图标(`zl:` 图标名,不带前缀):缺省 `table` */
|
|
9
|
-
gridIcon?: string;
|
|
10
|
-
/** 列表按钮图标(`zl:` 图标名,不带前缀):缺省 `list-color` */
|
|
11
|
-
tableIcon?: string;
|
|
12
4
|
};
|
|
13
5
|
type __VLS_PublicProps = {
|
|
14
6
|
'modelValue'?: 'grid' | 'table';
|
|
@@ -19,8 +11,6 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
19
11
|
"onUpdate:modelValue"?: ((value: "table" | "grid") => any) | undefined;
|
|
20
12
|
}>, {
|
|
21
13
|
value: "grid" | "table";
|
|
22
|
-
gridIcon: string;
|
|
23
|
-
tableIcon: string;
|
|
24
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
15
|
export default _default;
|
|
26
16
|
//# 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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-89c83ab6"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,46 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useZlT as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "zl-layout-switch__text"
|
|
7
|
-
}, B = /* @__PURE__ */ v({
|
|
1
|
+
import { defineComponent as s, computed as v, useModel as p, resolveComponent as n, openBlock as l, createBlock as r, withCtx as d, createElementBlock as _, Fragment as f, renderList as b, createVNode as g, mergeModels as w } from "vue";
|
|
2
|
+
import { useZlT as y } from "@zl-ui-kit/composables";
|
|
3
|
+
import V from "../ZlIcon/index.vue.mjs";
|
|
4
|
+
const B = /* @__PURE__ */ s({
|
|
8
5
|
name: "ZlLayoutSwitch",
|
|
9
6
|
__name: "index",
|
|
10
7
|
props: /* @__PURE__ */ w({
|
|
11
|
-
value: { default: "grid" }
|
|
12
|
-
gridText: {},
|
|
13
|
-
tableText: {},
|
|
14
|
-
gridIcon: { default: "table" },
|
|
15
|
-
tableIcon: { default: "list-color" }
|
|
8
|
+
value: { default: "grid" }
|
|
16
9
|
}, {
|
|
17
10
|
modelValue: {},
|
|
18
11
|
modelModifiers: {}
|
|
19
12
|
}),
|
|
20
13
|
emits: ["update:modelValue"],
|
|
21
14
|
setup(o) {
|
|
22
|
-
const
|
|
23
|
-
{ label:
|
|
24
|
-
{ label:
|
|
25
|
-
]),
|
|
26
|
-
return (
|
|
27
|
-
const m =
|
|
28
|
-
return
|
|
15
|
+
const { t } = y(), i = v(() => [
|
|
16
|
+
{ label: t("zl.layoutSwitch.grid", "网格"), value: "grid", icon: "menu-card" },
|
|
17
|
+
{ label: t("zl.layoutSwitch.table", "表格"), value: "table", icon: "menu-list" }
|
|
18
|
+
]), a = p(o, "modelValue");
|
|
19
|
+
return (h, u) => {
|
|
20
|
+
const m = n("el-radio-button"), c = n("el-radio-group");
|
|
21
|
+
return l(), r(c, {
|
|
29
22
|
class: "zl-layout-switch",
|
|
30
|
-
"model-value":
|
|
31
|
-
"onUpdate:modelValue":
|
|
23
|
+
"model-value": a.value ?? o.value,
|
|
24
|
+
"onUpdate:modelValue": u[0] || (u[0] = (e) => a.value = e)
|
|
32
25
|
}, {
|
|
33
|
-
default:
|
|
34
|
-
(
|
|
26
|
+
default: d(() => [
|
|
27
|
+
(l(!0), _(f, null, b(i.value, (e) => (l(), r(m, {
|
|
35
28
|
key: e.value,
|
|
36
29
|
value: e.value,
|
|
37
30
|
title: e.label
|
|
38
31
|
}, {
|
|
39
|
-
default:
|
|
40
|
-
|
|
32
|
+
default: d(() => [
|
|
33
|
+
g(V, {
|
|
41
34
|
icon: `zl:${e.icon}`
|
|
42
|
-
}, null, 8, ["icon"])
|
|
43
|
-
e.label ? (t(), i("span", z, y(e.label), 1)) : h("", !0)
|
|
35
|
+
}, null, 8, ["icon"])
|
|
44
36
|
]),
|
|
45
37
|
_: 2
|
|
46
38
|
}, 1032, ["value", "title"]))), 128))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-login__action[data-v-
|
|
1
|
+
.zl-login__action[data-v-3a11bb99]{margin-top:15px}[data-v-3a11bb99] .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-3a11bb99"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,49 +1,48 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useZlT as
|
|
3
|
-
import F from "../../ZlButton/index.vue.mjs";
|
|
1
|
+
import { defineComponent as y, ref as m, reactive as z, computed as V, resolveComponent as d, openBlock as _, createBlock as C, withModifiers as S, withCtx as n, createVNode as t, unref as s, createTextVNode as R, toDisplayString as q, createElementBlock as P, renderSlot as x, createCommentVNode as B } from "vue";
|
|
2
|
+
import { useZlT as F } from "@zl-ui-kit/composables";
|
|
4
3
|
import L from "./SlideChecker.vue.mjs";
|
|
5
4
|
const N = {
|
|
6
5
|
key: 0,
|
|
7
6
|
class: "zl-login__action"
|
|
8
|
-
},
|
|
7
|
+
}, $ = /* @__PURE__ */ y({
|
|
9
8
|
name: "ZlLoginForm",
|
|
10
9
|
__name: "LoginForm",
|
|
11
10
|
props: {
|
|
12
11
|
onSubmit: { type: Function }
|
|
13
12
|
},
|
|
14
13
|
setup(h) {
|
|
15
|
-
const { t: e } =
|
|
14
|
+
const { t: e } = F(), p = h, c = m(), l = z({}), b = V(() => ({
|
|
16
15
|
username: [{ required: !0, message: e("zl.login.usernamePlaceholder", "请输入用户名") }],
|
|
17
16
|
password: [{ required: !0, message: e("zl.login.passwordPlaceholder", "请输入密码") }],
|
|
18
17
|
slideChecked: [
|
|
19
18
|
{ type: "boolean", required: !0, message: e("zl.login.slideRequired", "请将滑块移至右侧") }
|
|
20
19
|
]
|
|
21
|
-
})), f =
|
|
22
|
-
async function
|
|
20
|
+
})), f = m(null), i = m(!1);
|
|
21
|
+
async function v() {
|
|
23
22
|
try {
|
|
24
23
|
if (await f.value?.validate().catch((o) => o) !== !0) return;
|
|
25
24
|
i.value = !0, p.onSubmit && await p.onSubmit(l), i.value = !1;
|
|
26
|
-
} catch (
|
|
27
|
-
i.value = !1, c.value?.reset(), console.error("Login Submit: ",
|
|
25
|
+
} catch (r) {
|
|
26
|
+
i.value = !1, c.value?.reset(), console.error("Login Submit: ", r);
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
return (
|
|
31
|
-
const g =
|
|
32
|
-
return _(),
|
|
29
|
+
return (r, o) => {
|
|
30
|
+
const g = d("el-input"), u = d("el-form-item"), w = d("el-button"), k = d("el-form");
|
|
31
|
+
return _(), C(k, {
|
|
33
32
|
ref_key: "formRef",
|
|
34
33
|
ref: f,
|
|
35
34
|
model: l,
|
|
36
|
-
rules:
|
|
35
|
+
rules: b.value,
|
|
37
36
|
"label-position": "top",
|
|
38
|
-
onSubmit:
|
|
37
|
+
onSubmit: S(v, ["prevent"])
|
|
39
38
|
}, {
|
|
40
39
|
default: n(() => [
|
|
41
|
-
|
|
40
|
+
t(u, {
|
|
42
41
|
label: s(e)("zl.login.username", "用户名"),
|
|
43
42
|
prop: "username"
|
|
44
43
|
}, {
|
|
45
44
|
default: n(() => [
|
|
46
|
-
|
|
45
|
+
t(g, {
|
|
47
46
|
modelValue: l.username,
|
|
48
47
|
"onUpdate:modelValue": o[0] || (o[0] = (a) => l.username = a),
|
|
49
48
|
placeholder: s(e)("zl.login.usernamePlaceholder", "请输入用户名"),
|
|
@@ -52,12 +51,12 @@ const N = {
|
|
|
52
51
|
]),
|
|
53
52
|
_: 1
|
|
54
53
|
}, 8, ["label"]),
|
|
55
|
-
|
|
54
|
+
t(u, {
|
|
56
55
|
label: s(e)("zl.login.password", "密码"),
|
|
57
56
|
prop: "password"
|
|
58
57
|
}, {
|
|
59
58
|
default: n(() => [
|
|
60
|
-
|
|
59
|
+
t(g, {
|
|
61
60
|
modelValue: l.password,
|
|
62
61
|
"onUpdate:modelValue": o[1] || (o[1] = (a) => l.password = a),
|
|
63
62
|
type: "password",
|
|
@@ -68,9 +67,9 @@ const N = {
|
|
|
68
67
|
]),
|
|
69
68
|
_: 1
|
|
70
69
|
}, 8, ["label"]),
|
|
71
|
-
|
|
70
|
+
t(u, { prop: "slideChecked" }, {
|
|
72
71
|
default: n(() => [
|
|
73
|
-
|
|
72
|
+
t(L, {
|
|
74
73
|
ref_key: "slideCheckerRef",
|
|
75
74
|
ref: c,
|
|
76
75
|
modelValue: l.slideChecked,
|
|
@@ -79,7 +78,7 @@ const N = {
|
|
|
79
78
|
]),
|
|
80
79
|
_: 1
|
|
81
80
|
}),
|
|
82
|
-
|
|
81
|
+
t(w, {
|
|
83
82
|
type: "primary",
|
|
84
83
|
"native-type": "submit",
|
|
85
84
|
size: "large",
|
|
@@ -88,13 +87,13 @@ const N = {
|
|
|
88
87
|
style: { width: "100%", "margin-top": "20px" }
|
|
89
88
|
}, {
|
|
90
89
|
default: n(() => [
|
|
91
|
-
|
|
90
|
+
R(q(s(e)("zl.login.submit", "登 录")), 1)
|
|
92
91
|
]),
|
|
93
92
|
_: 1
|
|
94
93
|
}, 8, ["loading"]),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
])) :
|
|
94
|
+
r.$slots.action ? (_(), P("div", N, [
|
|
95
|
+
x(r.$slots, "action", {}, void 0, !0)
|
|
96
|
+
])) : B("", !0)
|
|
98
97
|
]),
|
|
99
98
|
_: 3
|
|
100
99
|
}, 8, ["model", "rules"]);
|
|
@@ -102,6 +101,6 @@ const N = {
|
|
|
102
101
|
}
|
|
103
102
|
});
|
|
104
103
|
export {
|
|
105
|
-
|
|
104
|
+
$ as default
|
|
106
105
|
};
|
|
107
106
|
//# sourceMappingURL=LoginForm2.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-page-container[data-v-
|
|
1
|
+
.zl-page-container[data-v-4d3cbbba]{display:flex;flex-direction:column;box-sizing:border-box;height:100%;background-color:var(--zl-fill-2, #f0f2f7)}.zl-page-container__header[data-v-4d3cbbba]{display:flex;flex-shrink:0;gap:16px;align-items:center;margin-bottom:16px}.zl-page-container__main[data-v-4d3cbbba]{flex:1;min-width:0}.zl-page-container__title[data-v-4d3cbbba]{font-size:16px;font-weight:600;line-height:24px;color:var(--zl-text-1, #242e43)}.zl-page-container__description[data-v-4d3cbbba]{margin-top:2px;font-size:13px;line-height:20px;color:var(--zl-text-3, #79879c)}.zl-page-container__extra[data-v-4d3cbbba]{display:flex;flex-shrink:0;align-items:center;gap:8px}.zl-page-container__content[data-v-4d3cbbba]{flex:1;min-height:0;overflow:auto}
|
|
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4d3cbbba"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.zl-pagination[data-v-
|
|
1
|
+
@charset "UTF-8";.zl-pagination[data-v-c7c49843]{padding:6px 16px;background-color:var(--zl-fill-1, #f9fbfd);justify-content:var(--zl-pagination-justify, flex-end)}.zl-pagination--left[data-v-c7c49843]{--zl-pagination-justify: flex-start}.zl-pagination--center[data-v-c7c49843]{--zl-pagination-justify: center}.zl-pagination--right[data-v-c7c49843]{--zl-pagination-justify: flex-end}
|