@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,13 +1,13 @@
1
- import { defineComponent as x, useModel as b, computed as t, ref as h, openBlock as c, createElementBlock as v, Fragment as k, renderList as m, createBlock as y, normalizeStyle as z, normalizeClass as B, withCtx as C, renderSlot as S, mergeProps as V, createTextVNode as $, toDisplayString as E, mergeModels as M } from "vue";
2
- import w from "../ZlTag/index.vue.mjs";
1
+ import { defineComponent as x, useModel as g, computed as i, ref as h, openBlock as r, createElementBlock as v, Fragment as b, renderList as k, createBlock as m, withCtx as y, renderSlot as B, mergeProps as C, createTextVNode as z, toDisplayString as S, mergeModels as V } from "vue";
2
+ import E from "../ZlTag/index.vue.mjs";
3
3
  import '../ZlTag/index.css';/* empty css */
4
- const N = { class: "zl-checkbox-tag" }, F = /* @__PURE__ */ x({
4
+ const M = { class: "zl-checkbox-tag" }, T = /* @__PURE__ */ x({
5
5
  name: "ZlCheckboxTag",
6
6
  __name: "index",
7
- props: /* @__PURE__ */ M({
7
+ props: /* @__PURE__ */ V({
8
8
  options: { default: () => [] },
9
9
  single: { type: Boolean },
10
- rounded: { type: [Boolean, Number, String], default: !0 },
10
+ rounded: { type: Boolean, default: !0 },
11
11
  bordered: { type: Boolean, default: !0 },
12
12
  fill: { type: Boolean, default: !0 },
13
13
  size: { default: "small" }
@@ -17,55 +17,51 @@ const N = { class: "zl-checkbox-tag" }, F = /* @__PURE__ */ x({
17
17
  }),
18
18
  emits: ["update:modelValue"],
19
19
  setup(o) {
20
- const a = o, u = b(o, "modelValue"), f = t(() => {
21
- if (typeof a.rounded == "number") return { "--zl-radius-round": `${a.rounded}px` };
22
- if (typeof a.rounded == "string") return { "--zl-radius-round": a.rounded };
23
- }), i = t(() => a.options.some((e) => e.exclusive)), d = h();
24
- if (i.value && u.value) {
25
- const e = a.options.find((n) => n.value === u.value[0]);
20
+ const s = o, a = g(o, "modelValue"), c = i(() => s.options.some((e) => e.exclusive)), d = h();
21
+ if (c.value && a.value) {
22
+ const e = s.options.find((u) => u.value === a.value[0]);
26
23
  d.value = e?.exclusive;
27
24
  }
28
- const r = t(() => new Set(a.single ? [u.value] : u.value ?? []));
29
- function p(e) {
25
+ const t = i(() => new Set(s.single ? [a.value] : a.value ?? []));
26
+ function f(e) {
30
27
  if (e.disabled) return;
31
- const n = a.single ? [u.value] : [...u.value ?? []], l = n.includes(e.value);
32
- if (i.value && !l) {
33
- const s = e;
34
- s.exclusive === !0 || s.exclusive !== d.value ? (u.value = [e.value], d.value = s.exclusive) : u.value = [...n, e.value];
28
+ const u = s.single ? [a.value] : [...a.value ?? []], l = u.includes(e.value);
29
+ if (c.value && !l) {
30
+ const n = e;
31
+ n.exclusive === !0 || n.exclusive !== d.value ? (a.value = [e.value], d.value = n.exclusive) : a.value = [...u, e.value];
35
32
  return;
36
33
  }
37
34
  if (l) {
38
- const s = n.filter((g) => g !== e.value);
39
- u.value = a.single ? s[0] : s;
35
+ const n = u.filter((p) => p !== e.value);
36
+ a.value = s.single ? n[0] : n;
40
37
  } else
41
- a.single ? u.value = e.value : u.value = [...n, e.value];
38
+ s.single ? a.value = e.value : a.value = [...u, e.value];
42
39
  }
43
- return (e, n) => (c(), v("div", N, [
44
- (c(!0), v(k, null, m(o.options, (l) => (c(), y(w, {
40
+ return (e, u) => (r(), v("div", M, [
41
+ (r(!0), v(b, null, k(o.options, (l) => (r(), m(E, {
45
42
  key: l.value,
46
- class: B({ "zl-checkbox-tag__plain": !r.value.has(l.value) && o.fill }),
47
- style: z(f.value),
48
- rounded: o.rounded !== !1,
49
- color: r.value.has(l.value) ? "primary" : void 0,
50
- bordered: o.bordered,
43
+ fill: o.fill,
44
+ rounded: o.rounded,
45
+ color: t.value.has(l.value) ? "primary" : void 0,
46
+ bordered: t.value.has(l.value) && o.bordered,
51
47
  selectable: "",
52
- selected: r.value.has(l.value),
48
+ selected: t.value.has(l.value),
53
49
  disabled: l.disabled,
54
50
  icon: l.icon,
55
51
  size: o.size,
56
- onClick: (s) => p(l)
52
+ onClick: (n) => f(l)
57
53
  }, {
58
- default: C(() => [
59
- S(e.$slots, "default", V({ ref_for: !0 }, { item: l, checked: r.value.has(l.value) }), () => [
60
- $(E(l.label), 1)
54
+ default: y(() => [
55
+ B(e.$slots, "default", C({ ref_for: !0 }, { item: l, checked: t.value.has(l.value) }), () => [
56
+ z(S(l.label), 1)
61
57
  ])
62
58
  ]),
63
59
  _: 2
64
- }, 1032, ["class", "style", "rounded", "color", "bordered", "selected", "disabled", "icon", "size", "onClick"]))), 128))
60
+ }, 1032, ["fill", "rounded", "color", "bordered", "selected", "disabled", "icon", "size", "onClick"]))), 128))
65
61
  ]));
66
62
  }
67
63
  });
68
64
  export {
69
- F as default
65
+ T as default
70
66
  };
71
67
  //# sourceMappingURL=index.vue.mjs.map
@@ -1,22 +1,12 @@
1
- function t() {
2
- return typeof navigator < "u" && !!navigator.clipboard;
1
+ const o = window.navigator, n = o && "clipboard" in o;
2
+ function a(e) {
3
+ const t = document.createElement("textarea");
4
+ t.value = e ?? "", t.style.position = "absolute", t.style.opacity = "0", document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
3
5
  }
4
- function n(o) {
5
- if (typeof document > "u")
6
- throw new Error("[ZlCopy] document is not available");
7
- const e = document.createElement("textarea");
8
- e.value = o ?? "", e.style.position = "fixed", e.style.top = "-9999px", e.style.opacity = "0", document.body.appendChild(e), e.select();
9
- try {
10
- if (!document.execCommand("copy"))
11
- throw new Error('[ZlCopy] execCommand("copy") failed');
12
- } finally {
13
- e.remove();
14
- }
15
- }
16
- async function a(o) {
17
- o != null && (t() ? await navigator.clipboard.writeText(o) : n(o));
6
+ async function c(e) {
7
+ e != null && (n ? await o.clipboard.writeText(e) : a(e));
18
8
  }
19
9
  export {
20
- a as default
10
+ c as default
21
11
  };
22
12
  //# sourceMappingURL=copy.mjs.map
@@ -1 +1 @@
1
- .zl-copy[data-v-1c32b385]{max-width:100%;display:inline-flex;align-items:center;gap:12px}.zl-copy__text[data-v-1c32b385]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1
+ .zl-copy[data-v-3a18b7dd]{max-width:100%;display:inline-flex;align-items:center;gap:12px}.zl-copy__text[data-v-3a18b7dd]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@@ -1,8 +1,8 @@
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 _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1c32b385"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3a18b7dd"]]);
5
5
  export {
6
- _ as default
6
+ m as default
7
7
  };
8
8
  //# sourceMappingURL=index.vue.mjs.map
@@ -1,9 +1,8 @@
1
- import { defineComponent as m, ref as u, openBlock as y, createElementBlock as x, createElementVNode as r, renderSlot as n, toDisplayString as l, unref as a, createVNode as d, withCtx as _, createTextVNode as z } from "vue";
2
- import { useZlT as h } from "@zl-ui-kit/composables";
3
- import { ElMessage as p } from "element-plus";
4
- import C from "../ZlButton/index.vue.mjs";
1
+ import { defineComponent as m, ref as x, resolveComponent as y, openBlock as d, createElementBlock as _, createElementVNode as s, renderSlot as l, toDisplayString as r, unref as p, createVNode as z, withCtx as C, createTextVNode as h } from "vue";
2
+ import { useZlT as g } from "@zl-ui-kit/composables";
3
+ import { ElMessage as a } from "element-plus";
5
4
  import i from "./copy.mjs";
6
- const g = { class: "zl-copy" }, k = ["title"], w = /* @__PURE__ */ m({
5
+ const k = { class: "zl-copy" }, T = ["title"], B = /* @__PURE__ */ m({
7
6
  name: "ZlCopy",
8
7
  __name: "index",
9
8
  props: {
@@ -11,42 +10,45 @@ const g = { class: "zl-copy" }, k = ["title"], w = /* @__PURE__ */ m({
11
10
  copyText: {}
12
11
  },
13
12
  setup(e) {
14
- const c = e, { t: o } = h(), s = u(null);
15
- async function f() {
16
- const t = c.copyText ?? c.text ?? s.value?.textContent ?? "";
13
+ const c = e, { t: o } = g(), n = x(null);
14
+ function u() {
17
15
  try {
18
- await i(t), p.success(o("zl.copy.success", "复制成功"));
16
+ const t = c.copyText ?? c.text ?? n.value?.textContent ?? "";
17
+ i(t), a.success(o("zl.copy.success", "复制成功"));
19
18
  } catch {
20
- p.error(o("zl.copy.failed", "复制失败"));
19
+ a.error(o("zl.copy.failed", "复制失败"));
21
20
  }
22
21
  }
23
- return (t, T) => (y(), x("div", g, [
24
- r("span", {
25
- ref_key: "textRef",
26
- ref: s,
27
- class: "zl-copy__text"
28
- }, [
29
- n(t.$slots, "default", {}, () => [
30
- r("span", { title: e.text }, l(e.text), 9, k)
22
+ return (t, b) => {
23
+ const f = y("el-button");
24
+ return d(), _("div", k, [
25
+ s("span", {
26
+ ref_key: "textRef",
27
+ ref: n,
28
+ class: "zl-copy__text"
29
+ }, [
30
+ l(t.$slots, "default", {}, () => [
31
+ s("span", { title: e.text }, r(e.text), 9, T)
32
+ ], !0)
33
+ ], 512),
34
+ l(t.$slots, "trigger", { copy: p(i) }, () => [
35
+ z(f, {
36
+ size: "small",
37
+ text: "",
38
+ class: "zl-copy__button",
39
+ onClick: u
40
+ }, {
41
+ default: C(() => [
42
+ h(r(p(o)("zl.copy.copy", "复制")), 1)
43
+ ]),
44
+ _: 1
45
+ })
31
46
  ], !0)
32
- ], 512),
33
- n(t.$slots, "trigger", { copy: a(i) }, () => [
34
- d(C, {
35
- size: "small",
36
- text: "",
37
- class: "zl-copy__button",
38
- onClick: f
39
- }, {
40
- default: _(() => [
41
- z(l(a(o)("zl.copy.copy", "复制")), 1)
42
- ]),
43
- _: 1
44
- })
45
- ], !0)
46
- ]));
47
+ ]);
48
+ };
47
49
  }
48
50
  });
49
51
  export {
50
- w as default
52
+ B as default
51
53
  };
52
54
  //# sourceMappingURL=index2.vue.mjs.map
@@ -1 +1 @@
1
- @charset "UTF-8";.zl-description{display:inline-flex;gap:0 16px;font-size:12px;line-height:20px;white-space:nowrap;flex-wrap:wrap;max-width:100%}.zl-description-type-secondary{padding:0 8px;background-color:var(--zl-fill-2, #eff4f9);border-radius:var(--zl-radius-small, 2px)}.zl-description-type-secondary .zl-description-item:not(:last-child):after{content:"";display:inline-block;height:12px;width:1px;background-color:var(--zl-border-2, #e3e9ef);position:absolute;top:4px;right:-8px}.zl-description-item{position:relative;display:inline-flex;align-items:center;gap:2px;min-width:0;max-width:100%}.zl-description-item-icon{color:var(--zl-text-2, #4d5e7d)}.zl-description-item-label{color:var(--zl-text-3, #79879c);margin-right:10px;flex-shrink:0}.zl-description-item-value{color:var(--zl-text-1, #242e43);flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.zl-description .zl-tag:not(.zl-tag-fill){padding:0}
1
+ .zl-description{display:inline-flex;gap:0 16px;font-size:12px;line-height:20px;white-space:nowrap;flex-wrap:wrap}.zl-description-type-secondary{padding:0 8px;background-color:var(--zl-fill-2, #eff4f9);border-radius:var(--zl-radius-small, 2px)}.zl-description-type-secondary .zl-description-item:not(:last-child):after{content:"";display:inline-block;height:12px;width:1px;background-color:var(--zl-border-2, #e3e9ef);position:absolute;top:4px;right:-8px}.zl-description-item{position:relative;display:inline-flex;align-items:center;gap:2px}.zl-description-item-icon{color:var(--zl-text-2, #4d5e7d)}.zl-description-item-label{color:var(--zl-text-3, #79879c);margin-right:10px}.zl-description-item-value{color:var(--zl-text-1, #242e43)}.zl-description .zl-tag:not(.zl-tag-fill){padding:0}
@@ -1,56 +1,52 @@
1
- import { defineComponent as C, computed as h, defineAsyncComponent as T, resolveComponent as g, openBlock as n, createElementBlock as a, normalizeClass as b, Fragment as B, renderList as D, createBlock as d, createCommentVNode as E, createElementVNode as u, toDisplayString as y, unref as N, mergeProps as V, renderSlot as Z, withCtx as A, createTextVNode as F } from "vue";
1
+ import { defineComponent as g, computed as h, defineAsyncComponent as T, resolveComponent as b, openBlock as n, createElementBlock as r, normalizeClass as B, Fragment as m, renderList as D, createBlock as u, createCommentVNode as E, createElementVNode as y, toDisplayString as f, unref as N, mergeProps as V, renderSlot as Z, createTextVNode as F } from "vue";
2
2
  import { useZlT as S } from "@zl-ui-kit/composables";
3
- import { isNumber as w } from "@zl-ui-kit/utils";
4
- import I from "../ZlAutoTooltip/index.vue.mjs";
5
- const K = { class: "zl-description-item-label" }, L = { class: "zl-description-item-value" }, H = /* @__PURE__ */ C({
3
+ import { isNumber as A } from "@zl-ui-kit/utils";
4
+ const I = { class: "zl-description-item-label" }, K = { class: "zl-description-item-value" }, q = /* @__PURE__ */ g({
6
5
  name: "ZlDescription",
7
6
  __name: "index",
8
7
  props: {
9
8
  items: {},
10
9
  data: { default: () => ({}) },
11
- emptyChecker: { type: Function, default: (s) => !s && !w(s) },
10
+ emptyChecker: { type: Function, default: (s) => !s && !A(s) },
12
11
  emptyText: {},
13
12
  secondary: { type: Boolean }
14
13
  },
15
14
  setup(s) {
16
- const { t: f } = S(), t = s, k = h(() => {
17
- const c = [], p = t.emptyText ?? f("zl.description.empty", "暂无");
15
+ const { t: k } = S(), t = s, v = h(() => {
16
+ const c = [], d = t.emptyText ?? k("zl.description.empty", "暂无");
18
17
  for (const o of t.items) {
19
- const { visible: e, key: r, getValue: m, dict: l, ..._ } = o, i = typeof m == "function" ? m(t.data, o.key, o) : t.data[o.key], x = t.emptyChecker(i, r, t.data) ? p : i;
20
- if (e === !1 || typeof e == "function" && !e(i, r, t.data))
18
+ const { visible: e, key: l, getValue: p, dict: a, ...z } = o, i = typeof p == "function" ? p(t.data, o.key, o) : t.data[o.key], x = t.emptyChecker(i, l, t.data) ? d : i;
19
+ if (e === !1 || typeof e == "function" && !e(i, l, t.data))
21
20
  continue;
22
- const z = typeof l == "string" ? { dictKey: l } : l;
23
- c.push({ ..._, key: r, value: i, text: x, dict: z });
21
+ const C = typeof a == "string" ? { dictKey: a } : a;
22
+ c.push({ ...z, key: l, value: i, text: x, dict: C });
24
23
  }
25
24
  return c;
26
- }), v = T(() => import("../ZlDictTag/index2.vue.mjs"));
27
- return (c, p) => {
28
- const o = g("zl-icon");
29
- return n(), a("div", {
30
- class: b(["zl-description", { "zl-description-type-secondary": s.secondary }])
25
+ }), _ = T(() => import("../ZlDictTag/index2.vue.mjs"));
26
+ return (c, d) => {
27
+ const o = b("zl-icon");
28
+ return n(), r("div", {
29
+ class: B(["zl-description", { "zl-description-type-secondary": s.secondary }])
31
30
  }, [
32
- (n(!0), a(B, null, D(k.value, (e) => (n(), a("div", {
31
+ (n(!0), r(m, null, D(v.value, (e) => (n(), r("div", {
33
32
  key: e.key,
34
33
  class: "zl-description-item"
35
34
  }, [
36
- e.icon ? (n(), d(o, {
35
+ e.icon ? (n(), u(o, {
37
36
  key: 0,
38
37
  class: "zl-description-item-icon",
39
38
  icon: e.icon
40
39
  }, null, 8, ["icon"])) : E("", !0),
41
- u("div", K, y(e.label), 1),
42
- u("div", L, [
43
- e.dict ? (n(), d(N(v), V({
40
+ y("div", I, f(e.label), 1),
41
+ y("div", K, [
42
+ e.dict ? (n(), u(N(_), V({
44
43
  key: 0,
45
44
  ref_for: !0
46
45
  }, e.dict, {
47
46
  value: e.text
48
- }), null, 16, ["value"])) : e.slot ? Z(c.$slots, e.key, {}, void 0, void 0, 1) : (n(), d(I, { key: 2 }, {
49
- default: A(() => [
50
- F(y(e.text), 1)
51
- ]),
52
- _: 2
53
- }, 1024))
47
+ }), null, 16, ["value"])) : e.slot ? Z(c.$slots, e.key, {}, void 0, void 0, 1) : (n(), r(m, { key: 2 }, [
48
+ F(f(e.text), 1)
49
+ ], 64))
54
50
  ])
55
51
  ]))), 128))
56
52
  ], 2);
@@ -58,6 +54,6 @@ const K = { class: "zl-description-item-label" }, L = { class: "zl-description-i
58
54
  }
59
55
  });
60
56
  export {
61
- H as default
57
+ q as default
62
58
  };
63
59
  //# sourceMappingURL=index.vue.mjs.map
@@ -1 +1 @@
1
- .zl-dialog__body{width:100%}.zl-dialog--no-footer .el-dialog__footer{display:none}
1
+ .zl-dialog__body{width:100%}
@@ -9,8 +9,6 @@ type __VLS_Props = {
9
9
  readonly?: boolean;
10
10
  /** 内容区加载态,为 true 时显示遮罩 loading */
11
11
  loading?: boolean;
12
- /** 底部按钮区是否可见;为 false 时隐藏整个页脚(默认取消/确定按钮与 footer 插槽一并隐藏),默认 true */
13
- footerVisible?: boolean;
14
12
  };
15
13
  type __VLS_PublicProps = {
16
14
  'visible'?: boolean;
@@ -31,7 +29,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
31
29
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
32
30
  }>, {
33
31
  autoCloseAfterConfirm: boolean;
34
- footerVisible: boolean;
35
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
33
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
37
34
  export default _default;
@@ -1,84 +1,80 @@
1
- import { defineComponent as h, useModel as z, ref as w, computed as c, useAttrs as x, resolveComponent as A, resolveDirective as D, openBlock as d, createBlock as f, mergeProps as _, withCtx as n, withDirectives as $, createElementBlock as M, renderSlot as m, createTextVNode as g, toDisplayString as v, unref as N, createCommentVNode as T, createVNode as Z, mergeModels as O } from "vue";
2
- import { useZlT as S } from "@zl-ui-kit/composables";
3
- import y from "../ZlButton/index.vue.mjs";
4
- const E = { class: "zl-dialog__body" }, j = /* @__PURE__ */ h({
1
+ import { defineComponent as h, useModel as V, ref as w, computed as f, useAttrs as x, resolveComponent as m, resolveDirective as z, openBlock as d, createBlock as v, mergeProps as A, withCtx as a, withDirectives as D, createElementBlock as M, renderSlot as g, createTextVNode as y, toDisplayString as p, unref as N, createCommentVNode as O, createVNode as T, mergeModels as Z } from "vue";
2
+ import { useZlT as $ } from "@zl-ui-kit/composables";
3
+ const S = { class: "zl-dialog__body" }, P = /* @__PURE__ */ h({
5
4
  name: "ZlDialog",
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(e) {
21
- const { t: i } = S(), o = e, t = z(e, "visible");
22
- async function r() {
23
- o.onCancel && !await o.onCancel() || (t.value = !1);
18
+ setup(l) {
19
+ const { t: r } = $(), e = l, t = V(l, "visible");
20
+ async function i() {
21
+ e.onCancel && !await e.onCancel() || (t.value = !1);
24
22
  }
25
23
  const s = w(!1);
26
- async function p() {
24
+ async function C() {
27
25
  s.value = !0;
28
26
  try {
29
- await o.onOk?.(), o.autoCloseAfterConfirm && (t.value = !1);
30
- } catch (l) {
31
- console.error("[ZlDialog] handleConfirm: ", l);
27
+ e.onOk && (await e.onOk(), e.autoCloseAfterConfirm && (t.value = !1));
28
+ } catch (o) {
29
+ console.error("[ZlDialog] handleConfirm: ", o);
32
30
  } finally {
33
31
  s.value = !1;
34
32
  }
35
33
  }
36
- const C = c(() => o.readonly ? i("zl.dialog.close", "关闭") : i("zl.dialog.confirm", "确定")), k = x(), b = c(() => ({ width: "600px", "destroy-on-close": !0, ...k }));
37
- return (l, a) => {
38
- const B = A("el-dialog"), V = D("loading");
39
- return d(), f(B, _({
40
- class: ["zl-dialog", { "zl-dialog--no-footer": !e.footerVisible }]
41
- }, b.value, {
34
+ const k = f(() => e.readonly ? r("zl.dialog.close", "关闭") : r("zl.dialog.confirm", "确定")), b = f(() => ({ width: "600px", "destroy-on-close": !0, ...x() }));
35
+ return (o, n) => {
36
+ const u = m("el-button"), B = m("el-dialog"), _ = z("loading");
37
+ return d(), v(B, A({ class: "zl-dialog" }, b.value, {
42
38
  modelValue: t.value,
43
- "onUpdate:modelValue": a[1] || (a[1] = (u) => t.value = u),
44
- "before-close": r
39
+ "onUpdate:modelValue": n[1] || (n[1] = (c) => t.value = c),
40
+ "before-close": i
45
41
  }), {
46
- footer: n(() => [
47
- m(l.$slots, "footer", {}, () => [
48
- e.readonly ? T("", !0) : (d(), f(y, {
42
+ footer: a(() => [
43
+ g(o.$slots, "footer", {}, () => [
44
+ l.readonly ? O("", !0) : (d(), v(u, {
49
45
  key: 0,
50
- onClick: r
46
+ onClick: i
51
47
  }, {
52
- default: n(() => [
53
- g(v(N(i)("zl.dialog.cancel", "取消")), 1)
48
+ default: a(() => [
49
+ y(p(N(r)("zl.dialog.cancel", "取消")), 1)
54
50
  ]),
55
51
  _: 1
56
52
  })),
57
- Z(y, {
53
+ T(u, {
58
54
  type: "primary",
59
55
  loading: s.value,
60
- onClick: a[0] || (a[0] = (u) => e.readonly ? r() : p())
56
+ onClick: n[0] || (n[0] = (c) => l.readonly ? i() : C())
61
57
  }, {
62
- default: n(() => [
63
- g(v(C.value), 1)
58
+ default: a(() => [
59
+ y(p(k.value), 1)
64
60
  ]),
65
61
  _: 1
66
62
  }, 8, ["loading"])
67
63
  ])
68
64
  ]),
69
- default: n(() => [
70
- $((d(), M("div", E, [
71
- m(l.$slots, "default")
65
+ default: a(() => [
66
+ D((d(), M("div", S, [
67
+ g(o.$slots, "default")
72
68
  ])), [
73
- [V, e.loading]
69
+ [_, l.loading]
74
70
  ])
75
71
  ]),
76
72
  _: 3
77
- }, 16, ["class", "modelValue"]);
73
+ }, 16, ["modelValue"]);
78
74
  };
79
75
  }
80
76
  });
81
77
  export {
82
- j as default
78
+ P as default
83
79
  };
84
80
  //# sourceMappingURL=index.vue.mjs.map
@@ -6,18 +6,15 @@ type __VLS_Props = {
6
6
  * 行级字典请用独立 key(如 `` `resourceType.${row.id}` ``)。
7
7
  */
8
8
  dictKey: string;
9
- /**
10
- * 外部直传字典数据:无需依赖全局数据源即可翻译。格式同 `DictItem[]`(`{ label, value, icon?, color?, type? }`)。
11
- * `color` 可以是主题色名,也可以是 `#ff7d45` 这类原生 CSS 颜色值(角标上按纯色渲染,不自动渐变)
12
- */
9
+ /** 外部直传字典数据:无需依赖全局数据源即可翻译。格式同 `DictItem[]`(`{ label, value, icon?, color?, type? }`) */
13
10
  dict?: DictItem[];
14
11
  /** 是否渲染成角标并指定方位,true 时为右上角 */
15
12
  corner?: boolean | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
16
13
  /**
17
14
  * 角标形态(`corner` 生效时才起作用):
18
15
  * `badge` 贴边小标签(默认);`ribbon` 斜跨在角上的绶带(45° 文字,如卡片右上角的「委托任务」)。
19
- * 绶带与角点留有间距、文案建议 ≤4 个字;梯形高度用 `ribbon-height` 透传(带内字号跟着高度等比缩放),
20
- * 尺寸/留白仍走 CSS 变量 `--zl-corner-tag-ribbon-size` / `--zl-corner-tag-ribbon-gap`。
16
+ * 绶带与角点留有间距、文案建议 ≤4 个字;尺寸/留白/带宽度走 CSS 变量
17
+ * `--zl-corner-tag-ribbon-size` / `--zl-corner-tag-ribbon-gap` / `--zl-corner-tag-ribbon-width`
21
18
  */
22
19
  variant?: 'badge' | 'ribbon';
23
20
  /**
@@ -35,14 +32,8 @@ type __VLS_Props = {
35
32
  * @deprecated 用 `iconVisible`:全库显隐统一用 visible 语义,且不要用反向命名
36
33
  */
37
34
  hideIcon?: boolean;
38
- /** 是否使用填充背景(配合字典项 `color`/`type` 显示浅色底色,如 `--zl-<色>-1`),透传给内部 ZlTag */
39
- fill?: boolean;
40
- /** 是否使用全圆角样式,透传给内部 ZlTag */
41
- rounded?: boolean;
42
35
  };
43
36
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
44
- fill: boolean;
45
- rounded: boolean;
46
37
  variant: "badge" | "ribbon";
47
38
  corner: boolean | "top-left" | "top-right" | "bottom-left" | "bottom-right";
48
39
  iconVisible: boolean;
@@ -1,10 +1,10 @@
1
- import { defineComponent as g, watch as B, computed as n, openBlock as c, createBlock as d, mergeProps as u, withCtx as s, createTextVNode as f, toDisplayString as v } from "vue";
2
- import { useDict as h, useDictStore as b } from "@zl-ui-kit/composables";
3
- import S from "../ZlTag/ZlCornerTag.vue.mjs";
1
+ import { defineComponent as g, watch as h, computed as n, openBlock as l, createBlock as s, mergeProps as u, withCtx as d, createTextVNode as v, toDisplayString as f } from "vue";
2
+ import { useDict as B, useDictStore as _ } from "@zl-ui-kit/composables";
3
+ import b from "../ZlTag/ZlCornerTag.vue.mjs";
4
4
  import '../ZlTag/index.css';import '../ZlTag/ZlCornerTag.css';/* empty css */
5
- import k from "../ZlTag/index.vue.mjs";
5
+ import S from "../ZlTag/index.vue.mjs";
6
6
  /* empty css */
7
- const K = /* @__PURE__ */ g({
7
+ const I = /* @__PURE__ */ g({
8
8
  name: "ZlDictTag",
9
9
  __name: "index",
10
10
  props: {
@@ -15,61 +15,56 @@ const K = /* @__PURE__ */ g({
15
15
  value: {},
16
16
  simple: { type: Boolean },
17
17
  iconVisible: { type: Boolean, default: void 0 },
18
- hideIcon: { type: Boolean, default: void 0 },
19
- fill: { type: Boolean, default: !1 },
20
- rounded: { type: Boolean, default: !1 }
18
+ hideIcon: { type: Boolean, default: void 0 }
21
19
  },
22
- setup(a) {
23
- const t = a, p = h(t.dictKey, { data: t.dict });
24
- B(
20
+ setup(i) {
21
+ const t = i, p = B(t.dictKey, { data: t.dict });
22
+ h(
25
23
  () => t.dict,
26
24
  (e) => {
27
25
  if (e?.length) {
28
- const { dictStore: o } = b();
26
+ const { dictStore: o } = _();
29
27
  o.value = { ...o.value, [t.dictKey]: e };
30
28
  }
31
29
  },
32
30
  { deep: !1 }
33
31
  );
34
- const i = n(() => p.value.find((e) => e.value === t.value)), m = { info: "gray" };
32
+ const a = n(() => p.value.find((e) => e.value === t.value)), m = { info: "gray" };
35
33
  function y(e) {
36
34
  const o = e.color ?? e.type;
37
35
  if (o)
38
36
  return m[o] ?? o;
39
37
  }
40
- const l = n(() => {
41
- const e = i.value;
38
+ const r = n(() => {
39
+ const e = a.value;
42
40
  return e ? {
43
41
  color: t.simple ? void 0 : y(e),
44
42
  icon: t.iconVisible ?? !t.hideIcon ? e.icon : void 0
45
43
  } : {};
46
- }), r = n(() => t.corner === !0 ? "top-right" : t.corner);
47
- return (e, o) => r.value ? (c(), d(S, u({
44
+ }), c = n(() => t.corner === !0 ? "top-right" : t.corner);
45
+ return (e, o) => c.value ? (l(), s(b, u({
48
46
  key: 0,
49
47
  class: "zl-dict-corner-tag"
50
- }, { ...l.value, ...e.$attrs }, {
51
- position: r.value,
52
- variant: a.variant
48
+ }, { ...r.value, ...e.$attrs }, {
49
+ position: c.value,
50
+ variant: i.variant
53
51
  }), {
54
- default: s(() => [
55
- f(v(i.value?.label || a.value), 1)
52
+ default: d(() => [
53
+ v(f(a.value?.label || i.value), 1)
56
54
  ]),
57
55
  _: 1
58
- }, 16, ["position", "variant"])) : (c(), d(k, u({
56
+ }, 16, ["position", "variant"])) : (l(), s(S, u({
59
57
  key: 1,
60
58
  class: "zl-dict-tag"
61
- }, { ...l.value, ...e.$attrs }, {
62
- fill: a.fill,
63
- rounded: a.rounded
64
- }), {
65
- default: s(() => [
66
- f(v(i.value?.label || a.value), 1)
59
+ }, { ...r.value, ...e.$attrs }), {
60
+ default: d(() => [
61
+ v(f(a.value?.label || i.value), 1)
67
62
  ]),
68
63
  _: 1
69
- }, 16, ["fill", "rounded"]));
64
+ }, 16));
70
65
  }
71
66
  });
72
67
  export {
73
- K as default
68
+ I as default
74
69
  };
75
70
  //# sourceMappingURL=index.vue.mjs.map
@@ -1 +1 @@
1
- .zl-drawer__body{width:100%;min-height:100%}.zl-drawer--no-footer .el-drawer__footer{display:none}
1
+ .zl-drawer__body{width:100%;min-height:100%}
@@ -9,8 +9,6 @@ type __VLS_Props = {
9
9
  readonly?: boolean;
10
10
  /** 内容区加载态,为 true 时显示遮罩 loading */
11
11
  loading?: boolean;
12
- /** 底部按钮区是否可见;为 false 时隐藏整个页脚(默认取消/确定按钮与 footer 插槽一并隐藏),默认 true */
13
- footerVisible?: boolean;
14
12
  };
15
13
  type __VLS_PublicProps = {
16
14
  'visible'?: boolean;
@@ -31,7 +29,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
31
29
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
32
30
  }>, {
33
31
  autoCloseAfterConfirm: boolean;
34
- footerVisible: boolean;
35
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
33
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
37
34
  export default _default;