@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
package/README.md CHANGED
@@ -4325,7 +4325,7 @@ import { ZlAddSub } from '@zl-ui-kit/components'
4325
4325
 
4326
4326
  <sub>入口 `@zl-ui-kit/components` · 源码 `packages/components/src/components/ZlAppLayout/index.vue`</sub>
4327
4327
 
4328
- **接口概览**:5 props · 8 插槽
4328
+ **接口概览**:1 props · 8 插槽
4329
4329
 
4330
4330
  **用法示例**
4331
4331
 
@@ -4358,13 +4358,9 @@ import { ZlAppLayout } from '@zl-ui-kit/components'
4358
4358
 
4359
4359
  **props**
4360
4360
 
4361
- | 属性 | 类型 | 默认值 | 必填 | 示例 | 说明 |
4362
- | -------------------- | ---------------------------------------------- | ---------------- | ---- | -------------------------------------------------- | ---------------------------------------------------------------------------- |
4363
- | `layout` | `'horizontal' \| 'vertical' \| 'header-aside'` | `'header-aside'` | 否 | `layout="horizontal"` | 布局方向:横向用顶部菜单,纵向用侧边菜单,header-aside 用通栏顶栏 + 侧边菜单 |
4364
- | `header-bg` | `string` | — | 否 | `header-bg="#fff"` | 顶栏背景:支持颜色/渐变/图片URL,图片路径自动包装 `url()` |
4365
- | `aside-bg` | `string` | — | 否 | `aside-bg="linear-gradient(...)"` | 侧栏背景:支持颜色/渐变/图片URL |
4366
- | `content-bg` | `string` | — | 否 | `content-bg="/bg.png"` | 内容区背景:支持颜色/渐变/图片URL |
4367
- | `breadcrumb-border` | `string` | — | 否 | `breadcrumb-border="none"` | 面包屑底边框样式,如 `'1px solid #e3e9ef'`,传 `'none'` 隐藏 |
4361
+ | 属性 | 类型 | 默认值 | 必填 | 示例 | 说明 |
4362
+ | -------- | ---------------------------------------------- | ---------------- | ---- | --------------------- | ---------------------------------------------------------------------------- |
4363
+ | `layout` | `'horizontal' \| 'vertical' \| 'header-aside'` | `'header-aside'` | 否 | `layout="horizontal"` | 布局方向:横向用顶部菜单,纵向用侧边菜单,header-aside 用通栏顶栏 + 侧边菜单 |
4368
4364
 
4369
4365
  > 选项式组件(`defineComponent`),props 定义在 `props: {}` 中
4370
4366
  > 把 `$attrs` 透传给内部组件,未列出的属性会继续下传
@@ -4383,27 +4379,27 @@ import { ZlAppLayout } from '@zl-ui-kit/components'
4383
4379
  | `menu` | — | `<template #menu>…</template>` | 顶栏中部菜单区(横向形态下占满剩余宽度) |
4384
4380
  | `logo` | `v-bind="{ collapsed }"` 展开 | `<template #logo="{ collapsed }">…</template>` | 侧栏顶部 logo 区(纵向形态下作用域带 `{ collapsed }`,可据此在折叠态隐去文字) |
4385
4381
 
4386
- **背景配置**
4382
+ **CSS 变量(背景配置)**
4387
4383
 
4388
- 推荐使用 props 方式(`header-bg` / `aside-bg` / `content-bg`),组件内部自动处理 `url()` 包装:
4389
-
4390
- ```vue
4391
- <ZlAppLayout
4392
- header-bg="linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
4393
- aside-bg="#1a1a2e"
4394
- content-bg="/bg.png"
4395
- breadcrumb-border="none"
4396
- />
4397
- ```
4398
-
4399
- 也可通过 CSS 变量配置(向后兼容):
4384
+ 各区域背景通过 CSS 变量配置,支持颜色、渐变色、图片:
4400
4385
 
4401
4386
  | 变量 | 适用区域 | 默认值 | 说明 |
4402
4387
  | ------------------------- | -------- | ------------------------------------- | -------------------------------------- |
4403
4388
  | `--zl-layout-header-bg` | 顶栏 | `#fff` | 支持纯色、`linear-gradient`、`url()` |
4404
4389
  | `--zl-layout-aside-bg` | 侧边栏 | `var(--zl-fill-1, #f9fbfd)` | 支持纯色、`linear-gradient`、`url()` |
4405
4390
  | `--zl-layout-content-bg` | 内容区 | `transparent` | 支持纯色、`linear-gradient`、`url()` |
4406
- | `--zl-breadcrumb-border` | 面包屑 | `1px solid var(--zl-border-2, #e3e9ef)` | 传 `none` 隐藏 |
4391
+
4392
+ ```css
4393
+ /* 使用示例 */
4394
+ .my-layout {
4395
+ /* 顶栏:渐变色 */
4396
+ --zl-layout-header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
4397
+ /* 侧边栏:深色 */
4398
+ --zl-layout-aside-bg: #1a1a2e;
4399
+ /* 内容区:图片背景 */
4400
+ --zl-layout-content-bg: url('/bg.png');
4401
+ }
4402
+ ```
4407
4403
 
4408
4404
  #### `ZlAppSlogan`
4409
4405
 
@@ -1,13 +1,13 @@
1
- import { defineComponent as Z, computed as C, resolveComponent as s, openBlock as n, createElementBlock as c, Fragment as p, renderList as g, createBlock as r, withCtx as i, createVNode as h, mergeProps as f, withModifiers as _, createCommentVNode as a, createElementVNode as j, toDisplayString as v, renderSlot as E, normalizeProps as O, createTextVNode as z, unref as S, normalizeClass as T } from "vue";
2
- import { useZlT as D } from "@zl-ui-kit/composables";
3
- import { isPlainObject as F } from "@zl-ui-kit/utils";
4
- import w from "../ZlIcon/index.vue.mjs";
5
- import A from "../ZlIconHover/index.vue.mjs";
6
- import { usePermission as I } from "../ZlPermission/usePermission.mjs";
7
- const q = { class: "zl-action-list" }, G = {
1
+ import { defineComponent as j, computed as g, resolveComponent as s, openBlock as n, createElementBlock as c, Fragment as m, renderList as w, createBlock as r, withCtx as i, createVNode as h, mergeProps as f, withModifiers as _, createCommentVNode as u, createElementVNode as E, toDisplayString as v, renderSlot as O, normalizeProps as S, createTextVNode as z, unref as T, normalizeClass as D } from "vue";
2
+ import { useZlT as F } from "@zl-ui-kit/composables";
3
+ import { isPlainObject as I } from "@zl-ui-kit/utils";
4
+ import A from "../ZlIcon/index.vue.mjs";
5
+ import P from "../ZlIconHover/index.vue.mjs";
6
+ import { usePermission as q } from "../ZlPermission/usePermission.mjs";
7
+ const G = { class: "zl-action-list" }, H = {
8
8
  key: 2,
9
9
  class: "zl-action-list__separator"
10
- }, W = /* @__PURE__ */ Z({
10
+ }, X = /* @__PURE__ */ j({
11
11
  name: "ZlActionList",
12
12
  __name: "List",
13
13
  props: {
@@ -19,19 +19,19 @@ const q = { class: "zl-action-list" }, G = {
19
19
  separator: { type: Boolean }
20
20
  },
21
21
  emits: ["action"],
22
- setup(b, { emit: P }) {
23
- const { t: M } = D(), t = b, B = P, k = C(() => {
22
+ setup(b, { emit: M }) {
23
+ const { t: B } = F(), t = b, N = M, k = g(() => {
24
24
  if (t.iconMore === !0)
25
- return { icon: "zl:operate-color" };
26
- if (F(t.iconMore))
27
- return { icon: "zl:operate-color", ...t.iconMore };
25
+ return { icon: "zl:password-color" };
26
+ if (I(t.iconMore))
27
+ return { icon: "zl:password-color", ...t.iconMore };
28
28
  });
29
- function N(o) {
30
- return o.permission ? I(o.permission).value : !0;
29
+ function V(o) {
30
+ return o.permission ? q(o.permission).value : !0;
31
31
  }
32
- const u = C(() => {
32
+ const a = g(() => {
33
33
  const o = t.actions.filter((l) => {
34
- const d = N(l);
34
+ const d = V(l);
35
35
  return typeof l.visible == "function" ? l.visible(...t.visibleArgs, l) && d : (l.visible === void 0 || !!l.visible) && d;
36
36
  });
37
37
  return o.length <= t.listCount ? { list: o, more: [] } : {
@@ -39,69 +39,72 @@ const q = { class: "zl-action-list" }, G = {
39
39
  more: o.slice(t.listCount - 1)
40
40
  };
41
41
  });
42
- function m(o) {
43
- o.disabled || (B("action", o, ...t.actionArgs), typeof o.handler == "function" && o.handler(...t.actionArgs, o));
42
+ function p(o) {
43
+ o.disabled || (N("action", o, ...t.actionArgs), typeof o.handler == "function" && o.handler(...t.actionArgs, o));
44
+ }
45
+ function y(o) {
46
+ return typeof o.tooltip == "string" ? o.tooltip : o.label;
44
47
  }
45
48
  return (o, l) => {
46
- const d = s("el-tooltip"), y = s("el-link"), V = s("el-dropdown-item"), $ = s("el-dropdown-menu"), x = s("el-dropdown");
47
- return n(), c("div", q, [
48
- (n(!0), c(p, null, g(u.value.list, (e) => (n(), c(p, {
49
+ const d = s("el-tooltip"), C = s("el-link"), $ = s("el-dropdown-item"), x = s("el-dropdown-menu"), L = s("el-dropdown");
50
+ return n(), c("div", G, [
51
+ (n(!0), c(m, null, w(a.value.list, (e) => (n(), c(m, {
49
52
  key: e.label
50
53
  }, [
51
- e.tooltip && e.icon ? (n(), r(d, {
54
+ e.tooltip && e.icon && y(e) ? (n(), r(d, {
52
55
  key: 0,
53
- content: e.label,
56
+ content: y(e),
54
57
  placement: "top"
55
58
  }, {
56
59
  default: i(() => [
57
- h(A, f({
60
+ h(P, f({
58
61
  icon: e.icon
59
62
  }, { ref_for: !0 }, e.iconProps, {
60
- onClick: _((L) => m(e), ["stop"])
63
+ onClick: _((Z) => p(e), ["stop"])
61
64
  }), null, 16, ["icon", "onClick"])
62
65
  ]),
63
66
  _: 2
64
- }, 1032, ["content"])) : (n(), r(y, {
67
+ }, 1032, ["content"])) : (n(), r(C, {
65
68
  key: 1,
66
69
  class: "zl-action-list__action",
67
70
  type: "primary",
68
- underline: !1,
71
+ underline: "never",
69
72
  disabled: e.disabled,
70
- onClick: _((L) => m(e), ["stop"])
73
+ onClick: _((Z) => p(e), ["stop"])
71
74
  }, {
72
75
  default: i(() => [
73
- e.icon ? (n(), r(w, f({
76
+ e.icon ? (n(), r(A, f({
74
77
  key: 0,
75
78
  icon: e.icon
76
- }, { ref_for: !0 }, e.iconProps), null, 16, ["icon"])) : a("", !0),
77
- j("span", null, v(e.label), 1)
79
+ }, { ref_for: !0 }, e.iconProps), null, 16, ["icon"])) : u("", !0),
80
+ E("span", null, v(e.label), 1)
78
81
  ]),
79
82
  _: 2
80
83
  }, 1032, ["disabled", "onClick"])),
81
- b.separator ? (n(), c("div", G)) : a("", !0)
84
+ b.separator ? (n(), c("div", H)) : u("", !0)
82
85
  ], 64))), 128)),
83
- u.value.more.length ? (n(), r(x, {
86
+ a.value.more.length ? (n(), r(L, {
84
87
  key: 0,
85
88
  trigger: "hover",
86
89
  placement: "bottom-end",
87
90
  class: "zl-action-list__more",
88
- onCommand: m
91
+ onCommand: p
89
92
  }, {
90
93
  dropdown: i(() => [
91
- h($, null, {
94
+ h(x, null, {
92
95
  default: i(() => [
93
- (n(!0), c(p, null, g(u.value.more, (e) => (n(), r(V, {
96
+ (n(!0), c(m, null, w(a.value.more, (e) => (n(), r($, {
94
97
  key: e.label,
95
98
  command: e,
96
99
  disabled: e.disabled,
97
100
  divided: e.divided
98
101
  }, {
99
102
  default: i(() => [
100
- e.icon ? (n(), r(w, {
103
+ e.icon ? (n(), r(A, {
101
104
  key: 0,
102
105
  icon: e.icon,
103
- class: T(e.iconClass)
104
- }, null, 8, ["icon", "class"])) : a("", !0),
106
+ class: D(e.iconClass)
107
+ }, null, 8, ["icon", "class"])) : u("", !0),
105
108
  z(" " + v(e.label), 1)
106
109
  ]),
107
110
  _: 2
@@ -111,29 +114,29 @@ const q = { class: "zl-action-list" }, G = {
111
114
  })
112
115
  ]),
113
116
  default: i(() => [
114
- E(o.$slots, "more", {}, () => [
115
- k.value ? (n(), r(A, O(f({ key: 0 }, k.value)), null, 16)) : (n(), r(y, {
117
+ O(o.$slots, "more", {}, () => [
118
+ k.value ? (n(), r(P, S(f({ key: 0 }, k.value)), null, 16)) : (n(), r(C, {
116
119
  key: 1,
117
120
  class: "zl-action-list__more-icon",
118
121
  type: "primary",
119
- underline: !1,
122
+ underline: "never",
120
123
  onClick: l[0] || (l[0] = _(() => {
121
124
  }, ["stop"]))
122
125
  }, {
123
126
  default: i(() => [
124
- z(v(S(M)("zl.action.more", "更多")), 1)
127
+ z(v(T(B)("zl.action.more", "更多")), 1)
125
128
  ]),
126
129
  _: 1
127
130
  }))
128
131
  ])
129
132
  ]),
130
133
  _: 3
131
- })) : a("", !0)
134
+ })) : u("", !0)
132
135
  ]);
133
136
  };
134
137
  }
135
138
  });
136
139
  export {
137
- W as default
140
+ X as default
138
141
  };
139
142
  //# sourceMappingURL=List.vue.mjs.map
@@ -1,3 +1,9 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
1
+ type __VLS_Props = {
2
+ /** 直接展示的操作数,超出收入"更多"下拉,默认 2;透传给 ZlActionList */
3
+ listCount?: number;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ listCount: number;
7
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
2
8
  export default _default;
3
9
  //# sourceMappingURL=index.vue.d.ts.map
@@ -1,15 +1,19 @@
1
- import { defineComponent as r, resolveComponent as n, openBlock as t, createBlock as c, normalizeProps as i, guardReactiveProps as a, withCtx as m, createVNode as p } from "vue";
2
- import s from "./List.vue.mjs";
1
+ import { defineComponent as r, resolveComponent as c, openBlock as s, createBlock as i, normalizeProps as p, guardReactiveProps as a, withCtx as l, createVNode as m } from "vue";
2
+ import _ from "./List.vue.mjs";
3
3
  import './List.css';/* empty css */
4
4
  const h = /* @__PURE__ */ r({
5
5
  name: "ZlAction",
6
6
  __name: "index",
7
- setup(_) {
8
- return (o, l) => {
9
- const e = n("zl-icon-hover");
10
- return t(), c(s, i(a({ ...o.$attrs, listCount: 2 })), {
11
- more: m(() => [
12
- p(e, { icon: "zl:password-color" })
7
+ props: {
8
+ listCount: { default: 2 }
9
+ },
10
+ setup(o) {
11
+ const e = o;
12
+ return (t, u) => {
13
+ const n = c("zl-icon-hover");
14
+ return s(), i(_, p(a({ ...t.$attrs, listCount: e.listCount })), {
15
+ more: l(() => [
16
+ m(n, { icon: "zl:password-color" })
13
17
  ]),
14
18
  _: 1
15
19
  }, 16);
@@ -10,8 +10,11 @@ export interface ActionItem {
10
10
  iconProps?: Record<string, any>;
11
11
  /** 图标自定义类名 */
12
12
  iconClass?: string;
13
- /** 是否用 tooltip 包住文案(文字过长时) */
14
- tooltip?: boolean;
13
+ /**
14
+ * 提示词:`true` 用 `label` 作为提示;传字符串则直接作为提示词(无需同时配置 `label`)。
15
+ * 仅对纯图标操作项生效(配置了 `icon`)。
16
+ */
17
+ tooltip?: boolean | string;
15
18
  /** 禁用(点击无响应) */
16
19
  disabled?: boolean;
17
20
  /** 与下一项之间显示分割线 */
@@ -0,0 +1 @@
1
+ .zl-layout-header-aside{height:100%;display:flex;flex-direction:column}.zl-layout-header-aside.collapsed .zl-layout-header-aside__aside{width:64px}.zl-layout-header-aside.collapsed .zl-layout-header-aside__aside__footer{padding-inline:8px}.zl-layout-header-aside__header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;background:var(--zl-layout-header-bg, var(--zl-layout-horizontal-header-bg, #fff));background-size:cover;background-position:center;border-bottom:var(--zl-layout-header-border-bottom, none)}.zl-layout-header-aside__logo{padding:10px 16px}.zl-layout-header-aside__user{flex:0 0 auto;padding-right:16px}.zl-layout-header-aside__body{flex:1;height:1px;display:flex}.zl-layout-header-aside__aside{flex:0 0 auto;width:220px;background:var(--zl-layout-aside-bg, var(--zl-fill-1, #f9fbfd));background-size:cover;background-position:center;display:flex;flex-direction:column;overflow:hidden;transition:width .2s cubic-bezier(.34,.69,.1,1)}.zl-layout-header-aside__aside__content{flex:1;height:1px;overflow-y:auto;overflow-x:hidden}.zl-layout-header-aside__aside__footer{padding:12px 16px;display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:8px;transition:padding .2s cubic-bezier(.34,.69,.1,1)}.zl-layout-header-aside__main{flex:1;width:1px;display:flex;flex-direction:column;background-image:var(--zl-layout-content-bg, none);background-size:cover;background-position:center}.zl-layout-header-aside__breadcrumb{padding:10px 16px;border-bottom:1px solid var(--zl-border-2, #e3e9ef);line-height:24px;background-color:transparent}.zl-layout-header-aside__content{flex:1;padding:12px;height:1px}
@@ -0,0 +1,25 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ logo?(_: {}): any;
5
+ header?(_: {}): any;
6
+ menu?(_: {
7
+ collapsed: boolean;
8
+ }): any;
9
+ footer?(_: {}): any;
10
+ breadcrumb?(_: {}): any;
11
+ default?(_: {}): any;
12
+ };
13
+ refs: {};
14
+ rootEl: HTMLDivElement;
15
+ };
16
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
18
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
+ export default _default;
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
25
+ //# sourceMappingURL=HeaderAside.vue.d.ts.map
@@ -0,0 +1,65 @@
1
+ import { defineComponent as n, openBlock as l, createElementBlock as d, normalizeClass as c, unref as t, createElementVNode as o, renderSlot as s, createCommentVNode as r, normalizeProps as u, guardReactiveProps as h, createVNode as _, withCtx as m } from "vue";
2
+ import { useToggle as y } from "@vueuse/core";
3
+ import f from "../ZlButton/index.vue.mjs";
4
+ import p from "../ZlIcon/index.vue.mjs";
5
+ const z = { class: "zl-layout-header-aside__header" }, v = {
6
+ key: 0,
7
+ class: "zl-layout-header-aside__logo"
8
+ }, $ = {
9
+ key: 1,
10
+ class: "zl-layout-header-aside__user"
11
+ }, b = { class: "zl-layout-header-aside__body" }, g = { class: "zl-layout-header-aside__aside" }, k = { class: "zl-layout-header-aside__aside__content" }, C = { class: "zl-layout-header-aside__aside__footer" }, N = { class: "zl-layout-header-aside__main" }, V = {
12
+ key: 0,
13
+ class: "zl-layout-header-aside__breadcrumb"
14
+ }, A = { class: "zl-layout-header-aside__content" }, I = /* @__PURE__ */ n({
15
+ name: "ZlHeaderAsideLayout",
16
+ __name: "HeaderAside",
17
+ setup(B) {
18
+ const [a] = y(!1);
19
+ return (e, i) => (l(), d("div", {
20
+ class: c(["zl-layout-header-aside", { collapsed: t(a) }])
21
+ }, [
22
+ o("div", z, [
23
+ e.$slots.logo ? (l(), d("div", v, [
24
+ s(e.$slots, "logo")
25
+ ])) : r("", !0),
26
+ e.$slots.header ? (l(), d("div", $, [
27
+ s(e.$slots, "header")
28
+ ])) : r("", !0)
29
+ ]),
30
+ o("div", b, [
31
+ o("div", g, [
32
+ o("div", k, [
33
+ s(e.$slots, "menu", u(h({ collapsed: t(a) })))
34
+ ]),
35
+ o("div", C, [
36
+ _(f, {
37
+ circle: "",
38
+ onClick: i[0] || (i[0] = (E) => a.value = !t(a))
39
+ }, {
40
+ icon: m(() => [
41
+ _(p, {
42
+ icon: t(a) ? "zl:slider-on-color" : "zl:slider-off-color"
43
+ }, null, 8, ["icon"])
44
+ ]),
45
+ _: 1
46
+ }),
47
+ s(e.$slots, "footer")
48
+ ])
49
+ ]),
50
+ o("div", N, [
51
+ e.$slots.breadcrumb ? (l(), d("div", V, [
52
+ s(e.$slots, "breadcrumb")
53
+ ])) : r("", !0),
54
+ o("div", A, [
55
+ s(e.$slots, "default")
56
+ ])
57
+ ])
58
+ ])
59
+ ], 2));
60
+ }
61
+ });
62
+ export {
63
+ I as default
64
+ };
65
+ //# sourceMappingURL=HeaderAside.vue.mjs.map
@@ -0,0 +1,6 @@
1
+ import o from "./HeaderAside.vue.mjs";
2
+ import './HeaderAside.css';/* empty css */
3
+ export {
4
+ o as default
5
+ };
6
+ //# sourceMappingURL=HeaderAside3.vue.mjs.map
@@ -1 +1 @@
1
- .zl-layout-horizontal{height:100%;display:flex;flex-direction:column}.zl-layout-horizontal__header{display:flex;align-items:center;background:var(--zl-layout-horizontal-header-bg, #fff)}.zl-layout-horizontal__logo{padding:10px 16px}.zl-layout-horizontal__menu{flex:1;width:1px}.zl-layout-horizontal__user{flex:0 0 auto;padding-right:16px}.zl-layout-horizontal__main{display:flex;flex-direction:column;flex:1;height:1px;padding:12px;border-radius:var(--zl-radius-medium, 4px);overflow:hidden}.zl-layout-horizontal__tabs{padding:12px 16px;background-color:var(--zl-bg-1, #fff);border-radius:var(--zl-radius-medium, 4px) var(--zl-radius-medium, 4px) 0 0}
1
+ .zl-layout-horizontal{height:100%;display:flex;flex-direction:column}.zl-layout-horizontal__header{display:flex;align-items:center;background:var(--zl-layout-header-bg, var(--zl-layout-horizontal-header-bg, #fff));background-size:cover;background-position:center}.zl-layout-horizontal__logo{padding:10px 16px}.zl-layout-horizontal__menu{flex:1;width:1px}.zl-layout-horizontal__user{flex:0 0 auto;padding-right:16px}.zl-layout-horizontal__main{display:flex;flex-direction:column;flex:1;height:1px;padding:12px;border-radius:var(--zl-radius-medium, 4px);overflow:hidden;background:var(--zl-layout-content-bg, none);background-size:cover;background-position:center}.zl-layout-horizontal__tabs{padding:12px 16px;background-color:var(--zl-bg-1, #fff);border-radius:var(--zl-radius-medium, 4px) var(--zl-radius-medium, 4px) 0 0}
@@ -1,6 +1,42 @@
1
- import o from "./Horizontal2.vue.mjs";
2
- import './Horizontal.css';/* empty css */
1
+ import { defineComponent as n, openBlock as e, createElementBlock as s, createElementVNode as a, renderSlot as t, createCommentVNode as l } from "vue";
2
+ const r = { class: "zl-layout-horizontal" }, i = { class: "zl-layout-horizontal__header" }, d = {
3
+ key: 0,
4
+ class: "zl-layout-horizontal__logo"
5
+ }, _ = {
6
+ key: 1,
7
+ class: "zl-layout-horizontal__menu"
8
+ }, u = {
9
+ key: 2,
10
+ class: "zl-layout-horizontal__user"
11
+ }, h = { class: "zl-layout-horizontal__main" }, c = {
12
+ key: 0,
13
+ class: "zl-layout-horizontal__tabs"
14
+ }, $ = /* @__PURE__ */ n({
15
+ name: "ZlHorizontalLayout",
16
+ __name: "Horizontal",
17
+ setup(m) {
18
+ return (o, z) => (e(), s("div", r, [
19
+ a("div", i, [
20
+ o.$slots.logo ? (e(), s("div", d, [
21
+ t(o.$slots, "logo")
22
+ ])) : l("", !0),
23
+ o.$slots.menu ? (e(), s("div", _, [
24
+ t(o.$slots, "menu")
25
+ ])) : l("", !0),
26
+ o.$slots.header ? (e(), s("div", u, [
27
+ t(o.$slots, "header")
28
+ ])) : l("", !0)
29
+ ]),
30
+ a("div", h, [
31
+ o.$slots.breadcrumb ? (e(), s("div", c, [
32
+ t(o.$slots, "breadcrumb")
33
+ ])) : l("", !0),
34
+ t(o.$slots, "default")
35
+ ])
36
+ ]));
37
+ }
38
+ });
3
39
  export {
4
- o as default
40
+ $ as default
5
41
  };
6
42
  //# sourceMappingURL=Horizontal.vue.mjs.map
@@ -0,0 +1,6 @@
1
+ import o from "./Horizontal.vue.mjs";
2
+ import './Horizontal.css';/* empty css */
3
+ export {
4
+ o as default
5
+ };
6
+ //# sourceMappingURL=Horizontal3.vue.mjs.map
@@ -1 +1 @@
1
- .zl-layout-vertical{height:100%;display:flex}.zl-layout-vertical.collapsed .zl-layout-vertical__aside{width:44px}.zl-layout-vertical.collapsed .zl-layout-vertical__aside__header{padding-inline:10px}.zl-layout-vertical.collapsed .zl-layout-vertical__aside__footer{padding-inline:8px}.zl-layout-vertical__aside{flex:0 0 auto;width:220px;background-image:var(--zl-layout-vertical-aside-bg, none);background-color:var(--zl-fill-1, #f9fbfd);background-size:cover;display:flex;flex-direction:column;transition:width .2s cubic-bezier(.34,.69,.1,1)}.zl-layout-vertical__aside__header{padding:12px 16px;overflow:hidden;border-bottom:1px solid var(--zl-border-1, #eff4f9);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.zl-layout-vertical__aside__content{flex:1;overflow-y:auto}.zl-layout-vertical__aside__footer{padding:12px 16px;display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:8px;transition:padding .2s cubic-bezier(.34,.69,.1,1)}.zl-layout-vertical__main{flex:1;width:1px;display:flex;flex-direction:column}.zl-layout-vertical__header{padding:10px 16px;border-bottom:1px solid var(--zl-border-2, #e3e9ef);line-height:24px;background-color:var(--zl-bg-1, #fff);display:flex;justify-content:space-between}.zl-layout-vertical__content{flex:1;padding:12px;height:1px}
1
+ .zl-layout-vertical{height:100%;display:flex}.zl-layout-vertical.collapsed .zl-layout-vertical__aside{width:64px}.zl-layout-vertical.collapsed .zl-layout-vertical__aside__header{padding-inline:10px}.zl-layout-vertical.collapsed .zl-layout-vertical__aside__footer{padding-inline:8px}.zl-layout-vertical__aside{flex:0 0 auto;width:220px;background:var(--zl-layout-aside-bg, var(--zl-fill-1, #f9fbfd));background-size:cover;background-position:center;display:flex;flex-direction:column;overflow:hidden;transition:width .2s cubic-bezier(.34,.69,.1,1)}.zl-layout-vertical__aside__header{padding:12px 16px;overflow:hidden;border-bottom:1px solid var(--zl-border-1, #eff4f9);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.zl-layout-vertical__aside__content{flex:1;overflow-y:auto;overflow-x:hidden}.zl-layout-vertical__aside__footer{padding:12px 16px;display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:8px;transition:padding .2s cubic-bezier(.34,.69,.1,1)}.zl-layout-vertical__main{flex:1;width:1px;display:flex;flex-direction:column}.zl-layout-vertical__header{padding:10px 16px;border-bottom:1px solid var(--zl-border-2, #e3e9ef);line-height:24px;background:var(--zl-layout-header-bg, var(--zl-bg-1, #fff));background-size:cover;background-position:center;display:flex;justify-content:space-between}.zl-layout-vertical__content{flex:1;padding:12px;height:1px;background:var(--zl-layout-content-bg, none);background-size:cover;background-position:center}
@@ -1,6 +1,54 @@
1
- import o from "./Vertical2.vue.mjs";
2
- import './Vertical.css';/* empty css */
1
+ import { defineComponent as _, openBlock as d, createElementBlock as n, normalizeClass as u, unref as t, createElementVNode as e, renderSlot as s, normalizeProps as i, guardReactiveProps as r, createVNode as c, withCtx as v } from "vue";
2
+ import { useToggle as m } from "@vueuse/core";
3
+ import p from "../ZlButton/index.vue.mjs";
4
+ import f from "../ZlIcon/index.vue.mjs";
5
+ const z = { class: "zl-layout-vertical__aside" }, h = { class: "zl-layout-vertical__aside__header" }, y = { class: "zl-layout-vertical__aside__content" }, $ = { class: "zl-layout-vertical__aside__footer" }, b = { class: "zl-layout-vertical__main" }, g = { class: "zl-layout-vertical__header" }, C = { class: "zl-layout-vertical__breadcrumb" }, V = { class: "zl-layout-vertical__app-header" }, k = { class: "zl-layout-vertical__content" }, I = /* @__PURE__ */ _({
6
+ name: "ZlVerticalLayout",
7
+ __name: "Vertical",
8
+ setup(B) {
9
+ const [o] = m(!1);
10
+ return (l, a) => (d(), n("div", {
11
+ class: u(["zl-layout-vertical", { collapsed: t(o) }])
12
+ }, [
13
+ e("div", z, [
14
+ e("div", h, [
15
+ s(l.$slots, "logo", i(r({ collapsed: t(o) })))
16
+ ]),
17
+ e("div", y, [
18
+ s(l.$slots, "menu", i(r({ collapsed: t(o) })))
19
+ ]),
20
+ e("div", $, [
21
+ c(p, {
22
+ circle: "",
23
+ onClick: a[0] || (a[0] = (E) => o.value = !t(o))
24
+ }, {
25
+ icon: v(() => [
26
+ c(f, {
27
+ icon: t(o) ? "zl:slider-on-color" : "zl:slider-off-color"
28
+ }, null, 8, ["icon"])
29
+ ]),
30
+ _: 1
31
+ }),
32
+ s(l.$slots, "footer")
33
+ ])
34
+ ]),
35
+ e("div", b, [
36
+ e("div", g, [
37
+ e("div", C, [
38
+ s(l.$slots, "breadcrumb")
39
+ ]),
40
+ e("div", V, [
41
+ s(l.$slots, "header")
42
+ ])
43
+ ]),
44
+ e("div", k, [
45
+ s(l.$slots, "default")
46
+ ])
47
+ ])
48
+ ], 2));
49
+ }
50
+ });
3
51
  export {
4
- o as default
52
+ I as default
5
53
  };
6
54
  //# sourceMappingURL=Vertical.vue.mjs.map
@@ -0,0 +1,6 @@
1
+ import o from "./Vertical.vue.mjs";
2
+ import './Vertical.css';/* empty css */
3
+ export {
4
+ o as default
5
+ };
6
+ //# sourceMappingURL=Vertical3.vue.mjs.map
@@ -1,23 +1,23 @@
1
1
  /**
2
- * 应用布局:horizontal(默认,顶部菜单)/ vertical(侧边菜单,可折叠)
2
+ * 应用布局:header-aside(默认,通栏顶栏 + 侧边菜单)/ horizontal(顶部菜单)/ vertical(侧边菜单,可折叠)
3
3
  * 插槽:logo/menu/breadcrumb/header/footer/default
4
4
  */
5
5
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
- /** 布局方向:横向用顶部菜单,纵向用侧边菜单 */
6
+ /** 布局方向:横向用顶部菜单,纵向用侧边菜单,header-aside 用通栏顶栏 + 侧边菜单 */
7
7
  layout: {
8
- type: () => "horizontal" | "vertical";
8
+ type: () => "horizontal" | "vertical" | "header-aside";
9
9
  default: string;
10
10
  };
11
11
  }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
12
12
  [key: string]: any;
13
13
  }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
14
- /** 布局方向:横向用顶部菜单,纵向用侧边菜单 */
14
+ /** 布局方向:横向用顶部菜单,纵向用侧边菜单,header-aside 用通栏顶栏 + 侧边菜单 */
15
15
  layout: {
16
- type: () => "horizontal" | "vertical";
16
+ type: () => "horizontal" | "vertical" | "header-aside";
17
17
  default: string;
18
18
  };
19
19
  }>> & Readonly<{}>, {
20
- layout: "horizontal" | "vertical";
20
+ layout: "horizontal" | "vertical" | "header-aside";
21
21
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
22
  export default _default;
23
23
  //# sourceMappingURL=index.vue.d.ts.map
@@ -1,18 +1,24 @@
1
- import { defineComponent as r, defineAsyncComponent as o, h as a } from "vue";
2
- const m = r({
1
+ import { defineComponent as a, h as i } from "vue";
2
+ import m from "./HeaderAside.vue.mjs";
3
+ import './Vertical.css';import './Horizontal.css';import './HeaderAside.css';/* empty css */
4
+ import n from "./Horizontal.vue.mjs";
5
+ /* empty css */
6
+ import p from "./Vertical.vue.mjs";
7
+ /* empty css */
8
+ const y = a({
3
9
  name: "ZlAppLayout",
4
10
  props: {
5
- /** 布局方向:横向用顶部菜单,纵向用侧边菜单 */
6
- layout: { type: String, default: "horizontal" }
11
+ /** 布局方向:横向用顶部菜单,纵向用侧边菜单,header-aside 用通栏顶栏 + 侧边菜单 */
12
+ layout: { type: String, default: "header-aside" }
7
13
  },
8
- setup(t, { slots: n, attrs: e }) {
14
+ setup(e, { slots: o, attrs: r }) {
9
15
  return () => {
10
- const p = t.layout === "horizontal" ? o(() => import("./Horizontal.vue.mjs")) : o(() => import("./Vertical.vue.mjs"));
11
- return a(p, { ...e }, n);
16
+ let t;
17
+ return e.layout === "vertical" ? t = p : e.layout === "header-aside" ? t = m : t = n, i(t, { ...r }, o);
12
18
  };
13
19
  }
14
20
  });
15
21
  export {
16
- m as default
22
+ y as default
17
23
  };
18
24
  //# sourceMappingURL=index.vue.mjs.map
@@ -1 +1 @@
1
- @charset "UTF-8";.zl-app-slogan{width:100%;overflow:hidden;display:flex;align-items:center;gap:6px}.zl-app-slogan__logo{width:24px;aspect-ratio:1;object-fit:cover}.zl-app-slogan__text{white-space:nowrap;font-family:var(--zl-slogan-font-family, "PingFang SC", "Microsoft YaHei", sans-serif);color:var(--zl-menu-text-color, var(--zl-text-2));font-size:16px;font-weight:400;letter-spacing:1.6px;line-height:24px}
1
+ @charset "UTF-8";.zl-app-slogan{width:100%;overflow:hidden;display:flex;align-items:center;gap:6px}.zl-app-slogan__logo{width:24px;aspect-ratio:1;object-fit:cover}.zl-app-slogan__logo--default{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;background-color:var(--zl-primary-6, var(--el-color-primary));color:#fff;font-size:14px}.zl-app-slogan__text{white-space:nowrap;font-family:"PingFang TC",var(--zl-slogan-font-family, "PingFang SC", "Microsoft YaHei", sans-serif);color:var(--zl-slogan-color, var(--zl-primary-6, var(--el-color-primary)));font-size:20px;font-weight:500;letter-spacing:1px;line-height:24px}
@@ -1,7 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  /** 为 true 时只显示 Logo,隐藏标题 */
3
3
  collapsed?: boolean;
4
- /** 品牌 Logo 的图片地址 */
4
+ /** 品牌 Logo 的图片地址;不传时渲染内置默认 Logo 图标 */
5
5
  logo?: string;
6
6
  /** 应用标题文案,折叠时隐藏 */
7
7
  title?: string;