@zl-ui-kit/components 0.27.0 → 0.27.2

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 (117) hide show
  1. package/README.md +18 -22
  2. package/dist/components/ZlAction/List.vue.mjs +49 -46
  3. package/dist/components/ZlAction/index.vue.d.ts +7 -1
  4. package/dist/components/ZlAction/index.vue.mjs +12 -8
  5. package/dist/components/ZlAction/types.d.ts +5 -2
  6. package/dist/components/ZlAppLayout/HeaderAside.css +1 -0
  7. package/dist/components/ZlAppLayout/HeaderAside.vue.d.ts +25 -0
  8. package/dist/components/ZlAppLayout/HeaderAside.vue.mjs +65 -0
  9. package/dist/components/ZlAppLayout/HeaderAside3.vue.mjs +6 -0
  10. package/dist/components/ZlAppLayout/Horizontal.css +1 -1
  11. package/dist/components/ZlAppLayout/Horizontal.vue.mjs +39 -3
  12. package/dist/components/ZlAppLayout/Horizontal3.vue.mjs +6 -0
  13. package/dist/components/ZlAppLayout/Vertical.css +1 -1
  14. package/dist/components/ZlAppLayout/Vertical.vue.mjs +51 -3
  15. package/dist/components/ZlAppLayout/Vertical3.vue.mjs +6 -0
  16. package/dist/components/ZlAppLayout/index.vue.d.ts +6 -6
  17. package/dist/components/ZlAppLayout/index.vue.mjs +14 -8
  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 +19 -12
  21. package/dist/components/ZlBreadcrumb/index.css +1 -0
  22. package/dist/components/ZlBreadcrumb/index.vue.d.ts +32 -0
  23. package/dist/components/ZlBreadcrumb/index.vue.mjs +58 -0
  24. package/dist/components/ZlBreadcrumb/index3.vue.mjs +6 -0
  25. package/dist/components/ZlBreadcrumb/types.d.ts +16 -0
  26. package/dist/components/ZlButton/index.vue.d.ts +81 -0
  27. package/dist/components/ZlButton/index.vue.mjs +60 -0
  28. package/dist/components/ZlButton/index2.vue.mjs +5 -0
  29. package/dist/components/ZlCardPage/index.vue.d.ts +41 -3
  30. package/dist/components/ZlCardPage/index.vue.mjs +68 -68
  31. package/dist/components/ZlCardPage/resolvePagination.d.ts +20 -0
  32. package/dist/components/ZlCardPage/resolvePagination.mjs +24 -0
  33. package/dist/components/ZlCheckboxTag/index.css +1 -1
  34. package/dist/components/ZlCheckboxTag/index.vue.d.ts +4 -4
  35. package/dist/components/ZlCheckboxTag/index.vue.mjs +34 -30
  36. package/dist/components/ZlCopy/copy.mjs +17 -7
  37. package/dist/components/ZlCopy/index.css +1 -1
  38. package/dist/components/ZlCopy/index.vue.mjs +2 -2
  39. package/dist/components/ZlCopy/index2.vue.mjs +34 -36
  40. package/dist/components/ZlDescription/index.css +1 -1
  41. package/dist/components/ZlDescription/index.vue.mjs +28 -24
  42. package/dist/components/ZlDevMenu/index.css +1 -0
  43. package/dist/components/ZlDevMenu/index.vue.d.ts +33 -0
  44. package/dist/components/ZlDevMenu/index.vue.mjs +110 -0
  45. package/dist/components/ZlDevMenu/index3.vue.mjs +6 -0
  46. package/dist/components/ZlDevMenu/types.d.ts +8 -0
  47. package/dist/components/ZlDialog/index.css +1 -1
  48. package/dist/components/ZlDialog/index.vue.d.ts +3 -0
  49. package/dist/components/ZlDialog/index.vue.mjs +39 -35
  50. package/dist/components/ZlDictTag/index.vue.d.ts +12 -3
  51. package/dist/components/ZlDictTag/index.vue.mjs +31 -26
  52. package/dist/components/ZlDrawer/index.css +1 -1
  53. package/dist/components/ZlDrawer/index.vue.d.ts +3 -0
  54. package/dist/components/ZlDrawer/index.vue.mjs +36 -32
  55. package/dist/components/ZlDynamicComponent/index.vue.d.ts +5 -3
  56. package/dist/components/ZlForm/index.css +1 -1
  57. package/dist/components/ZlForm/index.vue.d.ts +7 -0
  58. package/dist/components/ZlForm/index.vue.mjs +50 -47
  59. package/dist/components/ZlLayoutSwitch/index.css +1 -1
  60. package/dist/components/ZlLayoutSwitch/index.vue.d.ts +10 -0
  61. package/dist/components/ZlLayoutSwitch/index.vue.mjs +1 -1
  62. package/dist/components/ZlLayoutSwitch/index2.vue.mjs +27 -19
  63. package/dist/components/ZlLoading/index.css +1 -0
  64. package/dist/components/ZlLoading/index.vue.d.ts +27 -0
  65. package/dist/components/ZlLoading/index.vue.mjs +8 -0
  66. package/dist/components/ZlLoading/index2.vue.mjs +30 -0
  67. package/dist/components/ZlLogin/components/LoginForm.css +1 -1
  68. package/dist/components/ZlLogin/components/LoginForm.vue.mjs +1 -1
  69. package/dist/components/ZlLogin/components/LoginForm2.vue.mjs +26 -25
  70. package/dist/components/ZlMenu/MenuIcon.d.ts +17 -0
  71. package/dist/components/ZlMenu/MenuIcon.mjs +21 -0
  72. package/dist/components/ZlMenu/ZlMenuItem.vue.d.ts +7 -0
  73. package/dist/components/ZlMenu/ZlMenuItem.vue.mjs +53 -0
  74. package/dist/components/ZlMenu/ZlMenuItem2.vue.mjs +5 -0
  75. package/dist/components/ZlMenu/index.css +1 -0
  76. package/dist/components/ZlMenu/index.vue.d.ts +40 -0
  77. package/dist/components/ZlMenu/index.vue.mjs +60 -0
  78. package/dist/components/ZlMenu/index3.vue.mjs +6 -0
  79. package/dist/components/ZlMenu/types.d.ts +20 -0
  80. package/dist/components/ZlPageContainer/index.css +1 -1
  81. package/dist/components/ZlPageContainer/index.vue.mjs +1 -1
  82. package/dist/components/ZlPagination/index.css +1 -1
  83. package/dist/components/ZlPagination/index.vue.d.ts +21 -1
  84. package/dist/components/ZlPagination/index.vue.mjs +1 -1
  85. package/dist/components/ZlPagination/index2.vue.mjs +59 -33
  86. package/dist/components/ZlPagination/usePagination.d.ts +1 -0
  87. package/dist/components/ZlPagination/usePagination.mjs +51 -34
  88. package/dist/components/ZlPopconfirm/index.vue.mjs +25 -24
  89. package/dist/components/ZlSearch/index.vue.d.ts +25 -0
  90. package/dist/components/ZlSearch/index.vue.mjs +202 -205
  91. package/dist/components/ZlSearchTable/index.vue.d.ts +40 -2
  92. package/dist/components/ZlSearchTable/index.vue.mjs +59 -55
  93. package/dist/components/ZlTable/useTablePagination.d.ts +1 -0
  94. package/dist/components/ZlTable/useTablePagination.mjs +37 -23
  95. package/dist/components/ZlTabs/index.vue.d.ts +16 -3
  96. package/dist/components/ZlTag/ZlCornerTag.css +1 -1
  97. package/dist/components/ZlTag/ZlCornerTag.vue.d.ts +14 -1
  98. package/dist/components/ZlTag/ZlCornerTag.vue.mjs +25 -14
  99. package/dist/components/ZlTag/index.vue.mjs +4 -4
  100. package/dist/components/ZlUpload/index.css +1 -1
  101. package/dist/components/ZlUpload/index.vue.d.ts +44 -3
  102. package/dist/components/ZlUpload/index.vue.mjs +3 -3
  103. package/dist/components/ZlUpload/index2.vue.mjs +119 -79
  104. package/dist/index.d.ts +8 -2
  105. package/dist/index.mjs +183 -169
  106. package/dist/locales/en.mjs +2 -2
  107. package/dist/locales/zh-cn.mjs +3 -3
  108. package/package.json +5 -5
  109. package/dist/components/ZlAppLayout/Horizontal2.vue.mjs +0 -42
  110. package/dist/components/ZlAppLayout/Vertical2.vue.mjs +0 -56
  111. package/dist/components/ZlAppMenu/AppMenu.css +0 -1
  112. package/dist/components/ZlAppMenu/AppMenu.vue.d.ts +0 -27
  113. package/dist/components/ZlAppMenu/AppMenu.vue.mjs +0 -37
  114. package/dist/components/ZlAppMenu/AppMenu3.vue.mjs +0 -6
  115. package/dist/components/ZlAppMenu/AppMenuItem.vue.d.ts +0 -11
  116. package/dist/components/ZlAppMenu/AppMenuItem.vue.mjs +0 -58
  117. package/dist/components/ZlAppMenu/AppMenuItem2.vue.mjs +0 -5
@@ -1,70 +1,72 @@
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";
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";
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" }, E = "onUpdate:modelValue", Q = /* @__PURE__ */ A({
4
+ const G = { class: "zl-form-item-label" }, y = "onUpdate:modelValue", Q = /* @__PURE__ */ Z({
5
5
  name: "ZlForm",
6
6
  __name: "index",
7
7
  props: {
8
8
  items: { default: () => [] },
9
- model: {}
9
+ model: {},
10
+ hideEmptyLabel: { type: Boolean }
10
11
  },
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(() => {
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(() => {
13
14
  const e = [];
14
15
  return v.value.forEach((l) => {
15
16
  if (!l.model)
16
17
  throw new Error("[ZlForm]: form item's model is required!");
17
18
  l.defaultValue !== void 0 && r.value[l.model] === void 0 && (r.value[l.model] = l.defaultValue);
18
19
  }), v.value.forEach((l) => {
19
- if (!P(l)) return;
20
+ if (!k(l)) return;
20
21
  const {
21
- visible: s,
22
+ visible: u,
22
23
  props: a,
23
24
  tooltip: f,
24
25
  formItemProps: o = {},
25
- component: $,
26
- label: z,
27
- model: C,
26
+ component: N,
27
+ label: _,
28
+ model: $,
28
29
  defaultValue: H,
29
- slot: T,
30
- slots: B,
31
- ...R
32
- } = l, _ = { ...o };
33
- delete _.tooltip;
34
- const Z = { ...R, ...a ?? {} };
30
+ slot: B,
31
+ slots: C,
32
+ ...T
33
+ } = l, b = { ...o };
34
+ delete b.tooltip;
35
+ const R = { ...T, ...a ?? {} };
35
36
  e.push({
36
- formItemProps: _,
37
+ formItemProps: b,
37
38
  tooltip: f,
38
- component: $,
39
- label: z,
40
- model: C,
41
- slot: T,
42
- slots: B,
43
- props: k(Z, l.model)
39
+ component: N,
40
+ label: _,
41
+ model: $,
42
+ slot: B,
43
+ slots: C,
44
+ hideLabel: s.hideEmptyLabel && !_,
45
+ props: w(R, l.model)
44
46
  });
45
47
  }), e;
46
- }), t = b(null);
47
- function P(e) {
48
+ }), t = V(null);
49
+ function k(e) {
48
50
  const l = e.visible;
49
51
  return l === void 0 ? !0 : l === !1 || typeof l == "function" && !l(r.value, e) ? !1 : !!l;
50
52
  }
51
- function k(e = {}, l) {
52
- const s = e[E];
53
- return e[E] = (a) => {
54
- r.value[l] = a, s?.(a);
53
+ function w(e = {}, l) {
54
+ const u = e[y];
55
+ return e[y] = (a) => {
56
+ r.value[l] = a, u?.(a);
55
57
  }, e;
56
58
  }
57
- async function w(e) {
59
+ async function L(e) {
58
60
  return await t.value?.validate(e) ?? !0;
59
61
  }
60
- async function N(e, l) {
62
+ async function z(e, l) {
61
63
  return await t.value?.validateField(e, l) ?? !0;
62
64
  }
63
- return h({
65
+ return g({
64
66
  /** 校验整个表单;同 `el-form.validate()`(无回调时失败会 reject 错误字段集合;0.9.0 及更早成功时返回 `undefined`) */
65
- validate: w,
67
+ validate: L,
66
68
  /** 校验指定字段(字段名或数组),语义同 `validate()` */
67
- validateField: N,
69
+ validateField: z,
68
70
  /** 重置字段并清除校验结果;不传参重置全部 */
69
71
  resetFields: (e) => t.value?.resetFields(e),
70
72
  /** 清除校验提示;不传参清除全部 */
@@ -84,30 +86,31 @@ const G = { class: "zl-form-item-label" }, E = "onUpdate:modelValue", Q = /* @__
84
86
  return t.value;
85
87
  }
86
88
  }), (e, l) => {
87
- const s = m("el-tooltip"), a = m("el-form-item"), f = m("el-form");
88
- return n(), u(f, c({
89
+ const u = m("el-tooltip"), a = m("el-form-item"), f = m("el-form");
90
+ return n(), d(f, c({
89
91
  ref_key: "formRef",
90
92
  ref: t,
91
93
  class: "zl-form",
92
94
  model: r.value
93
95
  }, { labelWidth: "auto", ...e.$attrs }), {
94
- default: d(() => [
95
- (n(!0), L(M, null, S(I.value, (o) => (n(), u(a, c({
96
+ default: i(() => [
97
+ (n(!0), D(M, null, S(P.value, (o) => (n(), d(a, c({
96
98
  key: o.model,
97
99
  label: o.label,
98
- prop: o.model
100
+ prop: o.model,
101
+ class: { "zl-form-item--no-label": o.hideLabel }
99
102
  }, { ref_for: !0 }, o.formItemProps), {
100
- label: d(() => [
101
- F("span", G, [
103
+ label: i(() => [
104
+ E("span", G, [
102
105
  p(e.$slots, "label", c({ ref_for: !0 }, { label: o.label, item: o }), () => [
103
- F("span", null, U(o.label), 1)
106
+ E("span", null, U(o.label), 1)
104
107
  ]),
105
- o.tooltip ? (n(), u(s, {
108
+ o.tooltip ? (n(), d(u, {
106
109
  key: 0,
107
110
  content: o.tooltip,
108
111
  placement: "top"
109
112
  }, {
110
- default: d(() => [
113
+ default: i(() => [
111
114
  q(j, {
112
115
  class: "zl-form-item-label__tooltip",
113
116
  icon: "zl:help-color"
@@ -117,18 +120,18 @@ const G = { class: "zl-form-item-label" }, E = "onUpdate:modelValue", Q = /* @__
117
120
  }, 8, ["content"])) : x("", !0)
118
121
  ])
119
122
  ]),
120
- default: d(() => [
123
+ default: i(() => [
121
124
  o.slot ? p(e.$slots, o.model, {
122
125
  model: r.value,
123
126
  field: o
124
- }, void 0, void 0, 0) : (n(), u(W, {
127
+ }, void 0, void 0, 0) : (n(), d(W, {
125
128
  key: 1,
126
129
  item: o,
127
130
  "model-value": r.value[o.model]
128
131
  }, null, 8, ["item", "model-value"]))
129
132
  ]),
130
133
  _: 2
131
- }, 1040, ["label", "prop"]))), 128)),
134
+ }, 1040, ["label", "prop", "class"]))), 128)),
132
135
  p(e.$slots, "default")
133
136
  ]),
134
137
  _: 3
@@ -1 +1 @@
1
- .zl-layout-switch .el-radio-button[data-v-89c83ab6]{line-height:1;font-size:14px;padding:9px}
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,6 +1,14 @@
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;
4
12
  };
5
13
  type __VLS_PublicProps = {
6
14
  'modelValue'?: 'grid' | 'table';
@@ -11,6 +19,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
11
19
  "onUpdate:modelValue"?: ((value: "table" | "grid") => any) | undefined;
12
20
  }>, {
13
21
  value: "grid" | "table";
22
+ gridIcon: string;
23
+ tableIcon: string;
14
24
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
25
  export default _default;
16
26
  //# 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-89c83ab6"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e4af4af4"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,38 +1,46 @@
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({
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({
5
8
  name: "ZlLayoutSwitch",
6
9
  __name: "index",
7
10
  props: /* @__PURE__ */ w({
8
- value: { default: "grid" }
11
+ value: { default: "grid" },
12
+ gridText: {},
13
+ tableText: {},
14
+ gridIcon: { default: "table" },
15
+ tableIcon: { default: "list-color" }
9
16
  }, {
10
17
  modelValue: {},
11
18
  modelModifiers: {}
12
19
  }),
13
20
  emits: ["update:modelValue"],
14
21
  setup(o) {
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, {
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, {
22
29
  class: "zl-layout-switch",
23
- "model-value": a.value ?? o.value,
24
- "onUpdate:modelValue": u[0] || (u[0] = (e) => a.value = e)
30
+ "model-value": u.value ?? o.value,
31
+ "onUpdate:modelValue": n[0] || (n[0] = (e) => u.value = e)
25
32
  }, {
26
- default: d(() => [
27
- (l(!0), _(f, null, b(i.value, (e) => (l(), r(m, {
33
+ default: c(() => [
34
+ (t(!0), i(f, null, g(s.value, (e) => (t(), d(m, {
28
35
  key: e.value,
29
36
  value: e.value,
30
37
  title: e.label
31
38
  }, {
32
- default: d(() => [
33
- g(V, {
39
+ default: c(() => [
40
+ x(k, {
34
41
  icon: `zl:${e.icon}`
35
- }, null, 8, ["icon"])
42
+ }, null, 8, ["icon"]),
43
+ e.label ? (t(), i("span", z, y(e.label), 1)) : h("", !0)
36
44
  ]),
37
45
  _: 2
38
46
  }, 1032, ["value", "title"]))), 128))
@@ -0,0 +1 @@
1
+ .zl-loading[data-v-bd5f8439]{width:100%;height:100%;flex:1;min-width:1px;min-height:1px}
@@ -0,0 +1,27 @@
1
+ type __VLS_Props = {
2
+ /** 是否处于加载中 */
3
+ loading?: boolean;
4
+ /** 是否首屏就渲染内容(默认等首次 loading 结束后再挂载) */
5
+ forceRender?: boolean;
6
+ };
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: HTMLDivElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ loading: boolean;
18
+ forceRender: boolean;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
27
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1,8 @@
1
+ import o from "./index2.vue.mjs";
2
+ import './index.css';/* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bd5f8439"]]);
5
+ export {
6
+ m as default
7
+ };
8
+ //# sourceMappingURL=index.vue.mjs.map
@@ -0,0 +1,30 @@
1
+ import { defineComponent as r, ref as l, watch as d, resolveDirective as i, withDirectives as c, openBlock as s, createElementBlock as f, renderSlot as u, createCommentVNode as m } from "vue";
2
+ const p = { class: "zl-loading" }, _ = /* @__PURE__ */ r({
3
+ name: "ZlLoading",
4
+ __name: "index",
5
+ props: {
6
+ loading: { type: Boolean, default: !1 },
7
+ forceRender: { type: Boolean, default: !1 }
8
+ },
9
+ setup(o) {
10
+ const t = o, n = l(t.forceRender);
11
+ return d(
12
+ () => t.loading,
13
+ (e) => {
14
+ e || (n.value = !0);
15
+ },
16
+ { immediate: !0 }
17
+ ), (e, v) => {
18
+ const a = i("loading");
19
+ return c((s(), f("div", p, [
20
+ n.value ? u(e.$slots, "default", {}, void 0, !0, 0) : m("", !0)
21
+ ])), [
22
+ [a, o.loading]
23
+ ]);
24
+ };
25
+ }
26
+ });
27
+ export {
28
+ _ as default
29
+ };
30
+ //# sourceMappingURL=index2.vue.mjs.map
@@ -1 +1 @@
1
- .zl-login__action[data-v-3a11bb99]{margin-top:15px}[data-v-3a11bb99] .el-form-item{margin-bottom:20px}
1
+ .zl-login__action[data-v-f2d3350c]{margin-top:15px}[data-v-f2d3350c] .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-3a11bb99"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f2d3350c"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,48 +1,49 @@
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";
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
- }, $ = /* @__PURE__ */ y({
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 } = F(), p = h, c = m(), l = z({}), b = V(() => ({
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 = m(null), i = m(!1);
21
- async function v() {
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 (r) {
26
- i.value = !1, c.value?.reset(), console.error("Login Submit: ", r);
26
+ } catch (t) {
27
+ i.value = !1, c.value?.reset(), console.error("Login Submit: ", t);
27
28
  }
28
29
  }
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, {
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: b.value,
36
+ rules: v.value,
36
37
  "label-position": "top",
37
- onSubmit: S(v, ["prevent"])
38
+ onSubmit: C(b, ["prevent"])
38
39
  }, {
39
40
  default: n(() => [
40
- t(u, {
41
+ r(d, {
41
42
  label: s(e)("zl.login.username", "用户名"),
42
43
  prop: "username"
43
44
  }, {
44
45
  default: n(() => [
45
- t(g, {
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
- t(u, {
55
+ r(d, {
55
56
  label: s(e)("zl.login.password", "密码"),
56
57
  prop: "password"
57
58
  }, {
58
59
  default: n(() => [
59
- t(g, {
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
- t(u, { prop: "slideChecked" }, {
71
+ r(d, { prop: "slideChecked" }, {
71
72
  default: n(() => [
72
- t(L, {
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
- t(w, {
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(q(s(e)("zl.login.submit", "登 录")), 1)
91
+ S(R(s(e)("zl.login.submit", "登 录")), 1)
91
92
  ]),
92
93
  _: 1
93
94
  }, 8, ["loading"]),
94
- r.$slots.action ? (_(), P("div", N, [
95
- x(r.$slots, "action", {}, void 0, !0)
96
- ])) : B("", !0)
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
- $ as default
105
+ D as default
105
106
  };
106
107
  //# sourceMappingURL=LoginForm2.vue.mjs.map
@@ -0,0 +1,17 @@
1
+ import { Component, PropType, VNode } from 'vue';
2
+ /** 内部渲染器:统一处理字符串图标 / 组件 / VNode 三种形态 */
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ icon: {
5
+ type: PropType<string | Component | VNode>;
6
+ required: true;
7
+ };
8
+ }>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
9
+ [key: string]: any;
10
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
11
+ icon: {
12
+ type: PropType<string | Component | VNode>;
13
+ required: true;
14
+ };
15
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
16
+ export default _default;
17
+ //# sourceMappingURL=MenuIcon.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { defineComponent as t, h as e, isVNode as o } from "vue";
2
+ import i from "../ZlIcon/index.vue.mjs";
3
+ const p = t({
4
+ name: "ZlMenuIcon",
5
+ props: {
6
+ icon: {
7
+ type: [String, Object, Function],
8
+ required: !0
9
+ }
10
+ },
11
+ setup(r) {
12
+ return () => {
13
+ const { icon: n } = r;
14
+ return typeof n == "string" ? e(i, { icon: n }) : o(n) ? n : e(n);
15
+ };
16
+ }
17
+ });
18
+ export {
19
+ p as default
20
+ };
21
+ //# sourceMappingURL=MenuIcon.mjs.map
@@ -0,0 +1,7 @@
1
+ import { MenuOption } from './types';
2
+ type __VLS_Props = {
3
+ item: MenuOption;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
7
+ //# sourceMappingURL=ZlMenuItem.vue.d.ts.map
@@ -0,0 +1,53 @@
1
+ import { defineComponent as b, resolveComponent as l, openBlock as t, createBlock as n, withCtx as i, createElementBlock as s, Fragment as y, renderList as f, unref as c, createCommentVNode as o, createElementVNode as x, toDisplayString as u, createTextVNode as I } from "vue";
2
+ import d from "./MenuIcon.mjs";
3
+ const g = /* @__PURE__ */ b({
4
+ name: "ZlMenuItem",
5
+ __name: "ZlMenuItem",
6
+ props: {
7
+ item: {}
8
+ },
9
+ setup(e) {
10
+ return (M, h) => {
11
+ const a = l("ZlMenuItem", !0), r = l("el-sub-menu"), k = l("el-menu-item");
12
+ return e.item.children?.length ? (t(), n(r, {
13
+ key: 0,
14
+ index: e.item.key,
15
+ disabled: e.item.disabled
16
+ }, {
17
+ title: i(() => [
18
+ e.item.icon ? (t(), n(c(d), {
19
+ key: 0,
20
+ icon: e.item.icon
21
+ }, null, 8, ["icon"])) : o("", !0),
22
+ x("span", null, u(e.item.label), 1)
23
+ ]),
24
+ default: i(() => [
25
+ (t(!0), s(y, null, f(e.item.children, (m) => (t(), n(a, {
26
+ key: m.key,
27
+ item: m
28
+ }, null, 8, ["item"]))), 128))
29
+ ]),
30
+ _: 1
31
+ }, 8, ["index", "disabled"])) : (t(), n(k, {
32
+ key: 1,
33
+ index: e.item.key,
34
+ disabled: e.item.disabled
35
+ }, {
36
+ title: i(() => [
37
+ I(u(e.item.label), 1)
38
+ ]),
39
+ default: i(() => [
40
+ e.item.icon ? (t(), n(c(d), {
41
+ key: 0,
42
+ icon: e.item.icon
43
+ }, null, 8, ["icon"])) : o("", !0)
44
+ ]),
45
+ _: 1
46
+ }, 8, ["index", "disabled"]));
47
+ };
48
+ }
49
+ });
50
+ export {
51
+ g as default
52
+ };
53
+ //# sourceMappingURL=ZlMenuItem.vue.mjs.map
@@ -0,0 +1,5 @@
1
+ import f from "./ZlMenuItem.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
5
+ //# sourceMappingURL=ZlMenuItem2.vue.mjs.map
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.zl-menu.el-menu{--el-menu-bg-color: transparent;--el-menu-text-color: var(--zl-menu-text-color, var(--zl-text-2));--el-menu-active-color: var(--zl-menu-active-color, var(--zl-menu-text-color, var(--zl-text-2)));--el-menu-hover-bg-color: var(--zl-menu-hover-bg, var(--zl-fill-2));border-right:none;background-color:transparent}.zl-menu.el-menu .el-menu-item,.zl-menu.el-menu .el-sub-menu__title{position:relative}.zl-menu.el-menu .el-menu-item .zl-icon,.zl-menu.el-menu .el-sub-menu__title .zl-icon{color:var(--zl-menu-icon-color, currentColor)}.zl-menu.el-menu .el-menu-item.is-active{background-color:var(--zl-menu-active-bg, var(--zl-menu-hover-bg, var(--zl-fill-2)))}.zl-menu.el-menu .el-menu-item.is-active .zl-icon{color:var(--el-menu-active-color)}.zl-menu.el-menu:not(.el-menu--horizontal) .el-menu-item.is-active:after{content:"";position:absolute;top:0;right:0;bottom:0;width:3px;background-color:var(--zl-menu-active-border-color, transparent)}.zl-menu.el-menu:not(.el-menu--horizontal){font-size:var(--zl-menu-font-size, 12px)}.zl-menu.el-menu:not(.el-menu--horizontal) .el-menu-item,.zl-menu.el-menu:not(.el-menu--horizontal) .el-sub-menu__title{height:var(--zl-menu-item-height, 36px);line-height:var(--zl-menu-item-height, 36px)}.zl-menu.el-menu.el-menu--horizontal .el-menu-item,.zl-menu.el-menu.el-menu--horizontal .el-sub-menu__title{height:44px;line-height:44px}
@@ -0,0 +1,40 @@
1
+ import { MenuOption } from './types';
2
+ type __VLS_Props = {
3
+ /** 菜单项配置(支持 children 递归) */
4
+ items?: MenuOption[];
5
+ /** 是否收起为图标 */
6
+ collapsed?: boolean;
7
+ /** 菜单方向:vertical / horizontal */
8
+ mode?: 'vertical' | 'horizontal';
9
+ /** 是否只展开一个子菜单 */
10
+ uniqueOpened?: boolean;
11
+ /** 默认展开的子菜单 key 列表 */
12
+ defaultOpeneds?: string[];
13
+ /** 折叠动画(默认关闭,避免布局抖动) */
14
+ collapseTransition?: boolean;
15
+ /** 折叠后的宽度(px),需与侧栏折叠宽度一致,默认 64(EP 默认值) */
16
+ collapseWidth?: number;
17
+ /** 点击菜单项后的跳转回调(通常传 router.push),不传则只触发 select */
18
+ navigate?: (item: MenuOption) => void;
19
+ };
20
+ type __VLS_PublicProps = {
21
+ 'selected'?: string;
22
+ } & __VLS_Props;
23
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
+ "update:selected": (value: string) => any;
25
+ } & {
26
+ select: (key: string, item: MenuOption) => any;
27
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
28
+ onSelect?: ((key: string, item: MenuOption) => any) | undefined;
29
+ "onUpdate:selected"?: ((value: string) => any) | undefined;
30
+ }>, {
31
+ mode: "vertical" | "horizontal";
32
+ collapsed: boolean;
33
+ items: MenuOption[];
34
+ uniqueOpened: boolean;
35
+ defaultOpeneds: string[];
36
+ collapseTransition: boolean;
37
+ collapseWidth: number;
38
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
39
+ export default _default;
40
+ //# sourceMappingURL=index.vue.d.ts.map