@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.
Files changed (112) hide show
  1. package/README.md +22 -18
  2. package/dist/components/ZlAction/List.vue.mjs +46 -49
  3. package/dist/components/ZlAction/index.vue.d.ts +1 -7
  4. package/dist/components/ZlAction/index.vue.mjs +8 -12
  5. package/dist/components/ZlAction/types.d.ts +2 -5
  6. package/dist/components/ZlAppLayout/Horizontal.css +1 -1
  7. package/dist/components/ZlAppLayout/Vertical.css +1 -1
  8. package/dist/components/ZlAppLayout/Vertical2.vue.mjs +41 -39
  9. package/dist/components/ZlAppLayout/index.vue.d.ts +6 -6
  10. package/dist/components/ZlAppLayout/index.vue.mjs +8 -8
  11. package/dist/components/ZlAppMenu/AppMenu.css +1 -0
  12. package/dist/components/ZlAppMenu/AppMenu.vue.d.ts +27 -0
  13. package/dist/components/ZlAppMenu/AppMenu.vue.mjs +37 -0
  14. package/dist/components/ZlAppMenu/AppMenu3.vue.mjs +6 -0
  15. package/dist/components/ZlAppMenu/AppMenuItem.vue.d.ts +11 -0
  16. package/dist/components/ZlAppMenu/AppMenuItem.vue.mjs +58 -0
  17. package/dist/components/ZlAppMenu/AppMenuItem2.vue.mjs +5 -0
  18. package/dist/components/ZlAppSlogan/index.css +1 -1
  19. package/dist/components/ZlAppSlogan/index.vue.d.ts +1 -1
  20. package/dist/components/ZlAppSlogan/index.vue.mjs +12 -19
  21. package/dist/components/ZlCardPage/index.vue.d.ts +3 -41
  22. package/dist/components/ZlCardPage/index.vue.mjs +68 -68
  23. package/dist/components/ZlCheckboxTag/index.css +1 -1
  24. package/dist/components/ZlCheckboxTag/index.vue.d.ts +4 -4
  25. package/dist/components/ZlCheckboxTag/index.vue.mjs +30 -34
  26. package/dist/components/ZlCopy/copy.mjs +7 -17
  27. package/dist/components/ZlCopy/index.css +1 -1
  28. package/dist/components/ZlCopy/index.vue.mjs +2 -2
  29. package/dist/components/ZlCopy/index2.vue.mjs +36 -34
  30. package/dist/components/ZlDescription/index.css +1 -1
  31. package/dist/components/ZlDescription/index.vue.mjs +24 -28
  32. package/dist/components/ZlDialog/index.css +1 -1
  33. package/dist/components/ZlDialog/index.vue.d.ts +0 -3
  34. package/dist/components/ZlDialog/index.vue.mjs +35 -39
  35. package/dist/components/ZlDictTag/index.vue.d.ts +3 -12
  36. package/dist/components/ZlDictTag/index.vue.mjs +26 -31
  37. package/dist/components/ZlDrawer/index.css +1 -1
  38. package/dist/components/ZlDrawer/index.vue.d.ts +0 -3
  39. package/dist/components/ZlDrawer/index.vue.mjs +32 -36
  40. package/dist/components/ZlDynamicComponent/index.vue.d.ts +3 -5
  41. package/dist/components/ZlForm/index.css +1 -1
  42. package/dist/components/ZlForm/index.vue.d.ts +0 -7
  43. package/dist/components/ZlForm/index.vue.mjs +47 -50
  44. package/dist/components/ZlLayoutSwitch/index.css +1 -1
  45. package/dist/components/ZlLayoutSwitch/index.vue.d.ts +0 -10
  46. package/dist/components/ZlLayoutSwitch/index.vue.mjs +1 -1
  47. package/dist/components/ZlLayoutSwitch/index2.vue.mjs +19 -27
  48. package/dist/components/ZlLogin/components/LoginForm.css +1 -1
  49. package/dist/components/ZlLogin/components/LoginForm.vue.mjs +1 -1
  50. package/dist/components/ZlLogin/components/LoginForm2.vue.mjs +25 -26
  51. package/dist/components/ZlPageContainer/index.css +1 -1
  52. package/dist/components/ZlPageContainer/index.vue.mjs +1 -1
  53. package/dist/components/ZlPagination/index.css +1 -1
  54. package/dist/components/ZlPagination/index.vue.d.ts +1 -21
  55. package/dist/components/ZlPagination/index.vue.mjs +1 -1
  56. package/dist/components/ZlPagination/index2.vue.mjs +33 -59
  57. package/dist/components/ZlPagination/usePagination.d.ts +0 -1
  58. package/dist/components/ZlPagination/usePagination.mjs +34 -51
  59. package/dist/components/ZlPopconfirm/index.vue.mjs +24 -25
  60. package/dist/components/ZlSearch/index.vue.d.ts +0 -25
  61. package/dist/components/ZlSearch/index.vue.mjs +205 -202
  62. package/dist/components/ZlSearchTable/index.vue.d.ts +2 -40
  63. package/dist/components/ZlSearchTable/index.vue.mjs +55 -59
  64. package/dist/components/ZlTable/useTablePagination.d.ts +0 -1
  65. package/dist/components/ZlTable/useTablePagination.mjs +23 -37
  66. package/dist/components/ZlTabs/index.vue.d.ts +3 -16
  67. package/dist/components/ZlTag/ZlCornerTag.css +1 -1
  68. package/dist/components/ZlTag/ZlCornerTag.vue.d.ts +1 -14
  69. package/dist/components/ZlTag/ZlCornerTag.vue.mjs +14 -25
  70. package/dist/components/ZlTag/index.vue.mjs +4 -4
  71. package/dist/components/ZlUpload/index.css +1 -1
  72. package/dist/components/ZlUpload/index.vue.d.ts +3 -44
  73. package/dist/components/ZlUpload/index.vue.mjs +3 -3
  74. package/dist/components/ZlUpload/index2.vue.mjs +79 -119
  75. package/dist/index.d.ts +2 -8
  76. package/dist/index.mjs +169 -183
  77. package/dist/locales/en.mjs +2 -2
  78. package/dist/locales/zh-cn.mjs +3 -3
  79. package/package.json +5 -5
  80. package/dist/components/ZlAppLayout/HeaderAside.css +0 -1
  81. package/dist/components/ZlAppLayout/HeaderAside.vue.d.ts +0 -25
  82. package/dist/components/ZlAppLayout/HeaderAside.vue.mjs +0 -6
  83. package/dist/components/ZlAppLayout/HeaderAside2.vue.mjs +0 -65
  84. package/dist/components/ZlBreadcrumb/index.css +0 -1
  85. package/dist/components/ZlBreadcrumb/index.vue.d.ts +0 -32
  86. package/dist/components/ZlBreadcrumb/index.vue.mjs +0 -58
  87. package/dist/components/ZlBreadcrumb/index3.vue.mjs +0 -6
  88. package/dist/components/ZlBreadcrumb/types.d.ts +0 -16
  89. package/dist/components/ZlButton/index.vue.d.ts +0 -81
  90. package/dist/components/ZlButton/index.vue.mjs +0 -60
  91. package/dist/components/ZlButton/index2.vue.mjs +0 -5
  92. package/dist/components/ZlCardPage/resolvePagination.d.ts +0 -20
  93. package/dist/components/ZlCardPage/resolvePagination.mjs +0 -24
  94. package/dist/components/ZlDevMenu/index.css +0 -1
  95. package/dist/components/ZlDevMenu/index.vue.d.ts +0 -33
  96. package/dist/components/ZlDevMenu/index.vue.mjs +0 -110
  97. package/dist/components/ZlDevMenu/index3.vue.mjs +0 -6
  98. package/dist/components/ZlDevMenu/types.d.ts +0 -8
  99. package/dist/components/ZlLoading/index.css +0 -1
  100. package/dist/components/ZlLoading/index.vue.d.ts +0 -27
  101. package/dist/components/ZlLoading/index.vue.mjs +0 -8
  102. package/dist/components/ZlLoading/index2.vue.mjs +0 -30
  103. package/dist/components/ZlMenu/MenuIcon.d.ts +0 -17
  104. package/dist/components/ZlMenu/MenuIcon.mjs +0 -21
  105. package/dist/components/ZlMenu/ZlMenuItem.vue.d.ts +0 -7
  106. package/dist/components/ZlMenu/ZlMenuItem.vue.mjs +0 -53
  107. package/dist/components/ZlMenu/ZlMenuItem2.vue.mjs +0 -5
  108. package/dist/components/ZlMenu/index.css +0 -1
  109. package/dist/components/ZlMenu/index.vue.d.ts +0 -40
  110. package/dist/components/ZlMenu/index.vue.mjs +0 -60
  111. package/dist/components/ZlMenu/index3.vue.mjs +0 -6
  112. package/dist/components/ZlMenu/types.d.ts +0 -20
@@ -1,87 +1,83 @@
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
- import { useZlT as S } from "@zl-ui-kit/composables";
3
- import w from "../ZlButton/index.vue.mjs";
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__ */ O({
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(o) {
21
- const { t: n } = S(), l = o, r = V(o, "visible");
18
+ setup(l) {
19
+ const { t: a } = $(), o = l, n = _(l, "visible");
22
20
  async function s() {
23
- l.onCancel && !await l.onCancel() || (r.value = !1);
21
+ o.onCancel && !await o.onCancel() || (n.value = !1);
24
22
  }
25
23
  const i = h(!1);
26
- async function C() {
24
+ async function w() {
27
25
  i.value = !0;
28
26
  try {
29
- await l.onOk?.(), l.autoCloseAfterConfirm && (r.value = !1);
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 p = u(() => l.readonly ? n("zl.drawer.close", "关闭") : n("zl.drawer.confirm", "确定")), g = A(), k = u(() => {
37
- const { width: e, ...t } = g;
38
- return { size: 600, ...e !== void 0 ? { size: e } : {}, "destroy-on-close": !0, ...t };
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 = D("el-drawer"), z = x("loading");
42
- return d(), f(b, _({
43
- class: ["zl-drawer", { "zl-drawer--no-footer": !o.footerVisible }]
44
- }, k.value, {
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: a(() => [
50
- m(e.$slots, "footer", {}, () => [
51
- o.readonly ? T("", !0) : (d(), f(w, {
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: a(() => [
56
- v(y(N(n)("zl.drawer.cancel", "取消")), 1)
51
+ default: r(() => [
52
+ C(p(M(a)("zl.drawer.cancel", "取消")), 1)
57
53
  ]),
58
54
  _: 1
59
55
  })),
60
- Z(w, {
56
+ T(u, {
61
57
  type: "primary",
62
58
  loading: i.value,
63
- onClick: t[0] || (t[0] = (c) => o.readonly ? s() : C())
59
+ onClick: t[0] || (t[0] = (c) => l.readonly ? s() : w())
64
60
  }, {
65
- default: a(() => [
66
- v(y(p.value), 1)
61
+ default: r(() => [
62
+ C(p(k.value), 1)
67
63
  ]),
68
64
  _: 1
69
65
  }, 8, ["loading"])
70
66
  ])
71
67
  ]),
72
- default: a(() => [
73
- $((d(), M("div", E, [
74
- m(e.$slots, "default")
68
+ default: r(() => [
69
+ x((d(), O("div", S, [
70
+ y(e.$slots, "default")
75
71
  ])), [
76
- [z, o.loading]
72
+ [z, l.loading]
77
73
  ])
78
74
  ]),
79
75
  _: 3
80
- }, 16, ["class", "modelValue"]);
76
+ }, 16, ["modelValue"]);
81
77
  };
82
78
  }
83
79
  });
84
80
  export {
85
- j as default
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: PropType<IComponent>;
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: PropType<IComponent>;
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: IComponent;
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
- @charset "UTF-8";.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))}.zl-form-item--no-label .el-form-item__label{display:none}
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 Z, toRefs as A, ref as V, computed as h, resolveComponent as m, openBlock as n, createBlock as d, mergeProps as c, withCtx as i, createElementBlock as D, Fragment as M, renderList as S, renderSlot as p, createElementVNode as E, toDisplayString as U, createVNode as q, createCommentVNode as x } from "vue";
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" }, y = "onUpdate:modelValue", Q = /* @__PURE__ */ Z({
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(F, { expose: g }) {
13
- const s = F, { items: v } = A(s), I = V(s.model ?? {}), r = h(() => s.model ?? I.value), P = h(() => {
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 (!k(l)) return;
19
+ if (!P(l)) return;
21
20
  const {
22
- visible: u,
21
+ visible: s,
23
22
  props: a,
24
23
  tooltip: f,
25
24
  formItemProps: o = {},
26
- component: N,
27
- label: _,
28
- model: $,
25
+ component: $,
26
+ label: z,
27
+ model: C,
29
28
  defaultValue: H,
30
- slot: B,
31
- slots: C,
32
- ...T
33
- } = l, b = { ...o };
34
- delete b.tooltip;
35
- const R = { ...T, ...a ?? {} };
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: b,
36
+ formItemProps: _,
38
37
  tooltip: f,
39
- component: N,
40
- label: _,
41
- model: $,
42
- slot: B,
43
- slots: C,
44
- hideLabel: s.hideEmptyLabel && !_,
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 = V(null);
49
- function k(e) {
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 w(e = {}, l) {
54
- const u = e[y];
55
- return e[y] = (a) => {
56
- r.value[l] = a, u?.(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 L(e) {
57
+ async function w(e) {
60
58
  return await t.value?.validate(e) ?? !0;
61
59
  }
62
- async function z(e, l) {
60
+ async function N(e, l) {
63
61
  return await t.value?.validateField(e, l) ?? !0;
64
62
  }
65
- return g({
63
+ return h({
66
64
  /** 校验整个表单;同 `el-form.validate()`(无回调时失败会 reject 错误字段集合;0.9.0 及更早成功时返回 `undefined`) */
67
- validate: L,
65
+ validate: w,
68
66
  /** 校验指定字段(字段名或数组),语义同 `validate()` */
69
- validateField: z,
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 u = m("el-tooltip"), a = m("el-form-item"), f = m("el-form");
90
- return n(), d(f, c({
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: i(() => [
97
- (n(!0), D(M, null, S(P.value, (o) => (n(), d(a, c({
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: i(() => [
104
- E("span", G, [
100
+ label: d(() => [
101
+ F("span", G, [
105
102
  p(e.$slots, "label", c({ ref_for: !0 }, { label: o.label, item: o }), () => [
106
- E("span", null, U(o.label), 1)
103
+ F("span", null, U(o.label), 1)
107
104
  ]),
108
- o.tooltip ? (n(), d(u, {
105
+ o.tooltip ? (n(), u(s, {
109
106
  key: 0,
110
107
  content: o.tooltip,
111
108
  placement: "top"
112
109
  }, {
113
- default: i(() => [
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: i(() => [
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(), d(W, {
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", "class"]))), 128)),
131
+ }, 1040, ["label", "prop"]))), 128)),
135
132
  p(e.$slots, "default")
136
133
  ]),
137
134
  _: 3
@@ -1 +1 @@
1
- .zl-layout-switch[data-v-e4af4af4] .el-radio-button__inner{display:inline-flex;align-items:center;gap:4px;line-height:1;padding:8px 12px;font-size:14px}.zl-layout-switch__text[data-v-e4af4af4]{font-size:12px;line-height:1}
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-e4af4af4"]]);
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 v, computed as _, useModel as p, resolveComponent as r, openBlock as t, createBlock as d, withCtx as c, createElementBlock as i, Fragment as f, renderList as g, createVNode as x, toDisplayString as y, createCommentVNode as h, mergeModels as w } from "vue";
2
- import { useZlT as V } from "@zl-ui-kit/composables";
3
- import k from "../ZlIcon/index.vue.mjs";
4
- const z = {
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 l = o, { t: a } = V(), s = _(() => [
23
- { label: l.gridText ?? a("zl.layoutSwitch.grid", "卡片"), value: "grid", icon: l.gridIcon },
24
- { label: l.tableText ?? a("zl.layoutSwitch.table", "列表"), value: "table", icon: l.tableIcon }
25
- ]), u = p(o, "modelValue");
26
- return (I, n) => {
27
- const m = r("el-radio-button"), b = r("el-radio-group");
28
- return t(), d(b, {
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": u.value ?? o.value,
31
- "onUpdate:modelValue": n[0] || (n[0] = (e) => u.value = e)
23
+ "model-value": a.value ?? o.value,
24
+ "onUpdate:modelValue": u[0] || (u[0] = (e) => a.value = e)
32
25
  }, {
33
- default: c(() => [
34
- (t(!0), i(f, null, g(s.value, (e) => (t(), d(m, {
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: c(() => [
40
- x(k, {
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-f2d3350c]{margin-top:15px}[data-v-f2d3350c] .el-form-item{margin-bottom:20px}
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-f2d3350c"]]);
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 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";
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
- }, D = /* @__PURE__ */ k({
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 } = B(), p = h, c = u(), l = y({}), v = z(() => ({
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 = u(null), i = u(!1);
22
- async function b() {
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 (t) {
27
- i.value = !1, c.value?.reset(), console.error("Login Submit: ", t);
25
+ } catch (r) {
26
+ i.value = !1, c.value?.reset(), console.error("Login Submit: ", r);
28
27
  }
29
28
  }
30
- return (t, o) => {
31
- const g = m("el-input"), d = m("el-form-item"), w = m("el-form");
32
- return _(), V(w, {
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: v.value,
35
+ rules: b.value,
37
36
  "label-position": "top",
38
- onSubmit: C(b, ["prevent"])
37
+ onSubmit: S(v, ["prevent"])
39
38
  }, {
40
39
  default: n(() => [
41
- r(d, {
40
+ t(u, {
42
41
  label: s(e)("zl.login.username", "用户名"),
43
42
  prop: "username"
44
43
  }, {
45
44
  default: n(() => [
46
- r(g, {
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
- r(d, {
54
+ t(u, {
56
55
  label: s(e)("zl.login.password", "密码"),
57
56
  prop: "password"
58
57
  }, {
59
58
  default: n(() => [
60
- r(g, {
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
- r(d, { prop: "slideChecked" }, {
70
+ t(u, { prop: "slideChecked" }, {
72
71
  default: n(() => [
73
- r(L, {
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
- r(F, {
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
- S(R(s(e)("zl.login.submit", "登 录")), 1)
90
+ R(q(s(e)("zl.login.submit", "登 录")), 1)
92
91
  ]),
93
92
  _: 1
94
93
  }, 8, ["loading"]),
95
- t.$slots.action ? (_(), q("div", N, [
96
- P(t.$slots, "action", {}, void 0, !0)
97
- ])) : x("", !0)
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
- D as default
104
+ $ as default
106
105
  };
107
106
  //# sourceMappingURL=LoginForm2.vue.mjs.map
@@ -1 +1 @@
1
- .zl-page-container[data-v-b4bd4e1c]{display:flex;flex-direction:column;box-sizing:border-box;height:100%}.zl-page-container__header[data-v-b4bd4e1c]{display:flex;flex-shrink:0;gap:16px;align-items:center;margin-bottom:16px}.zl-page-container__main[data-v-b4bd4e1c]{flex:1;min-width:0}.zl-page-container__title[data-v-b4bd4e1c]{font-size:16px;font-weight:600;line-height:24px;color:var(--zl-text-1, #242e43)}.zl-page-container__description[data-v-b4bd4e1c]{margin-top:2px;font-size:13px;line-height:20px;color:var(--zl-text-3, #79879c)}.zl-page-container__extra[data-v-b4bd4e1c]{display:flex;flex-shrink:0;align-items:center;gap:8px}.zl-page-container__content[data-v-b4bd4e1c]{display:flex;flex:1;flex-direction:column;min-height:0;overflow:auto}.zl-page-container__content[data-v-b4bd4e1c]>*{flex:1 0 auto}
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-b4bd4e1c"]]);
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-e29f8a69]{padding:6px 16px;background-color:var(--zl-fill-1, #f9fbfd);justify-content:var(--zl-pagination-justify, flex-end)}.zl-pagination--left[data-v-e29f8a69]{--zl-pagination-justify: flex-start}.zl-pagination--center[data-v-e29f8a69]{--zl-pagination-justify: center}.zl-pagination--right[data-v-e29f8a69]{--zl-pagination-justify: flex-end}.zl-pagination--full[data-v-e29f8a69] .el-pagination__rightwrapper{flex:1;justify-content:flex-end}.zl-pagination--full[data-v-e29f8a69] .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-e29f8a69]{color:var(--zl-pagination-total-num-color, var(--el-color-primary))}
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}