@zl-ui-kit/components 0.27.1 → 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.
- package/README.md +29 -12
- package/dist/components/ZlAppLayout/HeaderAside.css +1 -1
- package/dist/components/ZlAppLayout/HeaderAside.vue.mjs +62 -3
- package/dist/components/ZlAppLayout/HeaderAside3.vue.mjs +6 -0
- package/dist/components/ZlAppLayout/Horizontal.css +1 -1
- package/dist/components/ZlAppLayout/Horizontal.vue.mjs +39 -3
- package/dist/components/ZlAppLayout/Horizontal3.vue.mjs +6 -0
- package/dist/components/ZlAppLayout/Vertical.css +1 -1
- package/dist/components/ZlAppLayout/Vertical.vue.mjs +51 -3
- package/dist/components/ZlAppLayout/Vertical3.vue.mjs +6 -0
- package/dist/components/ZlAppLayout/index.vue.d.ts +0 -44
- package/dist/components/ZlAppLayout/index.vue.mjs +11 -23
- package/package.json +6 -6
- package/dist/components/ZlAppLayout/HeaderAside2.vue.mjs +0 -65
- package/dist/components/ZlAppLayout/Horizontal2.vue.mjs +0 -42
- package/dist/components/ZlAppLayout/Vertical2.vue.mjs +0 -54
package/README.md
CHANGED
|
@@ -4115,7 +4115,7 @@ const { i18n } = useLocale({ messages })
|
|
|
4115
4115
|
| [`ZlAction`](#zlaction) | 主入口 | 1 | 0 | 0 | 0 |
|
|
4116
4116
|
| [`ZlActionList`](#zlactionlist) | 主入口 | 6 | 1 | 1 | 0 |
|
|
4117
4117
|
| [`ZlAddSub`](#zladdsub) | 主入口 | 2 | 1 | 1 | 0 |
|
|
4118
|
-
| [`ZlAppLayout`](#zlapplayout) | 主入口 |
|
|
4118
|
+
| [`ZlAppLayout`](#zlapplayout) | 主入口 | 1 | 0 | 8 | 0 |
|
|
4119
4119
|
| [`ZlAppSlogan`](#zlappslogan) | 主入口 | 3 | 0 | 0 | 0 |
|
|
4120
4120
|
| [`ZlAutoTooltip`](#zlautotooltip) | 主入口 | 0 | 0 | 1 | 0 |
|
|
4121
4121
|
| [`ZlAvatar`](#zlavatar) | 主入口 | 3 | 0 | 0 | 0 |
|
|
@@ -4137,7 +4137,7 @@ const { i18n } = useLocale({ messages })
|
|
|
4137
4137
|
| [`ZlLoading`](#zlloading) | 主入口 | 2 | 0 | 1 | 0 |
|
|
4138
4138
|
| [`ZlLogin`](#zllogin) | 主入口 | 2 | 0 | 2 | 0 |
|
|
4139
4139
|
| [`ZlLoginForm`](#zlloginform) | 主入口 | 1 | 0 | 1 | 0 |
|
|
4140
|
-
| [`ZlMenu`](#zlmenu) | 主入口 |
|
|
4140
|
+
| [`ZlMenu`](#zlmenu) | 主入口 | 8 | 2 | 0 | 0 |
|
|
4141
4141
|
| [`ZlEmpty`](#zlempty) | 主入口 | 2 | 0 | 0 | 0 |
|
|
4142
4142
|
| [`ZlForm`](#zlform) | 主入口 | 3 | 0 | 3 | 9 |
|
|
4143
4143
|
| [`ZlFormChild`](#zlformchild) | 主入口 | 1 | 0 | 0 | 0 |
|
|
@@ -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
|
-
**接口概览**:
|
|
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`
|
|
4364
|
-
| `headerBg` | `string` | `undefined` | 否 | `header-bg="header-bg"` | 顶栏背景:支持颜色/渐变/图片URL |
|
|
4365
|
-
| `asideBg` | `string` | `undefined` | 否 | `aside-bg="aside-bg"` | 侧栏背景:支持颜色/渐变/图片URL |
|
|
4366
|
-
| `contentBg` | `string` | `undefined` | 否 | `content-bg="content-bg"` | 内容区背景:支持颜色/渐变/图片URL |
|
|
4367
|
-
| `breadcrumbBorder` | `string` | `undefined` | 否 | `breadcrumb-border="breadcrumb-border"` | 面包屑底边框样式,如 '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,6 +4379,28 @@ 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
|
|
|
4382
|
+
**CSS 变量(背景配置)**
|
|
4383
|
+
|
|
4384
|
+
各区域背景通过 CSS 变量配置,支持颜色、渐变色、图片:
|
|
4385
|
+
|
|
4386
|
+
| 变量 | 适用区域 | 默认值 | 说明 |
|
|
4387
|
+
| ------------------------- | -------- | ------------------------------------- | -------------------------------------- |
|
|
4388
|
+
| `--zl-layout-header-bg` | 顶栏 | `#fff` | 支持纯色、`linear-gradient`、`url()` |
|
|
4389
|
+
| `--zl-layout-aside-bg` | 侧边栏 | `var(--zl-fill-1, #f9fbfd)` | 支持纯色、`linear-gradient`、`url()` |
|
|
4390
|
+
| `--zl-layout-content-bg` | 内容区 | `transparent` | 支持纯色、`linear-gradient`、`url()` |
|
|
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
|
+
```
|
|
4403
|
+
|
|
4386
4404
|
#### `ZlAppSlogan`
|
|
4387
4405
|
|
|
4388
4406
|
<sub>入口 `@zl-ui-kit/components` · 源码 `packages/components/src/components/ZlAppSlogan/index.vue`</sub>
|
|
@@ -5415,7 +5433,7 @@ import { ZlLoginForm } from '@zl-ui-kit/components'
|
|
|
5415
5433
|
|
|
5416
5434
|
**简介**:ZlMenu —— 通用 el-menu 封装 items 数据驱动 + v-model:selected 选中态,可选 navigate 回调做路由跳转, 适用于侧栏 / 顶部导航等任意菜单场景(已取代原 `ZlAppMenu`)。
|
|
5417
5435
|
|
|
5418
|
-
**接口概览**:
|
|
5436
|
+
**接口概览**:8 props · 2 事件
|
|
5419
5437
|
|
|
5420
5438
|
**用法示例**
|
|
5421
5439
|
|
|
@@ -5442,7 +5460,6 @@ import { ZlMenu } from '@zl-ui-kit/components'
|
|
|
5442
5460
|
| `uniqueOpened` | `boolean` | `false` | 否 | `unique-opened` | 是否只展开一个子菜单 |
|
|
5443
5461
|
| `defaultOpeneds` | `string[]` | `() => []` | 否 | `:default-openeds="[]"` | 默认展开的子菜单 key 列表 |
|
|
5444
5462
|
| `collapseTransition` | `boolean` | `false` | 否 | `collapse-transition` | 折叠动画(默认关闭,避免布局抖动) |
|
|
5445
|
-
| `collapseWidth` | `number` | `64` | 否 | `:collapse-width="1"` | 折叠后的宽度(px),需与侧栏折叠宽度一致,默认 64(EP 默认值) |
|
|
5446
5463
|
| `navigate` | `(item: MenuOption) => void` | — | 否 | `:navigate="() => {}"` | 点击菜单项后的跳转回调(通常传 router.push),不传则只触发 select |
|
|
5447
5464
|
|
|
5448
5465
|
**`items` 条目字段(`MenuOption`)**
|
|
@@ -1 +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:
|
|
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}
|
|
@@ -1,6 +1,65 @@
|
|
|
1
|
-
import o from "
|
|
2
|
-
import
|
|
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
|
+
});
|
|
3
62
|
export {
|
|
4
|
-
|
|
63
|
+
I as default
|
|
5
64
|
};
|
|
6
65
|
//# sourceMappingURL=HeaderAside.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-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-
|
|
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
|
|
2
|
-
|
|
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
|
-
|
|
40
|
+
$ as default
|
|
5
41
|
};
|
|
6
42
|
//# sourceMappingURL=Horizontal.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
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:
|
|
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
|
|
2
|
-
import
|
|
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
|
-
|
|
52
|
+
I as default
|
|
5
53
|
};
|
|
6
54
|
//# sourceMappingURL=Vertical.vue.mjs.map
|
|
@@ -8,26 +8,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
8
8
|
type: () => "horizontal" | "vertical" | "header-aside";
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
|
-
/** 顶栏背景:支持颜色/渐变/图片URL */
|
|
12
|
-
headerBg: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: undefined;
|
|
15
|
-
};
|
|
16
|
-
/** 侧栏背景:支持颜色/渐变/图片URL */
|
|
17
|
-
asideBg: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
default: undefined;
|
|
20
|
-
};
|
|
21
|
-
/** 内容区背景:支持颜色/渐变/图片URL */
|
|
22
|
-
contentBg: {
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
default: undefined;
|
|
25
|
-
};
|
|
26
|
-
/** 面包屑底边框样式,如 '1px solid #e3e9ef',传 'none' 隐藏 */
|
|
27
|
-
breadcrumbBorder: {
|
|
28
|
-
type: StringConstructor;
|
|
29
|
-
default: undefined;
|
|
30
|
-
};
|
|
31
11
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
32
12
|
[key: string]: any;
|
|
33
13
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -36,32 +16,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
36
16
|
type: () => "horizontal" | "vertical" | "header-aside";
|
|
37
17
|
default: string;
|
|
38
18
|
};
|
|
39
|
-
/** 顶栏背景:支持颜色/渐变/图片URL */
|
|
40
|
-
headerBg: {
|
|
41
|
-
type: StringConstructor;
|
|
42
|
-
default: undefined;
|
|
43
|
-
};
|
|
44
|
-
/** 侧栏背景:支持颜色/渐变/图片URL */
|
|
45
|
-
asideBg: {
|
|
46
|
-
type: StringConstructor;
|
|
47
|
-
default: undefined;
|
|
48
|
-
};
|
|
49
|
-
/** 内容区背景:支持颜色/渐变/图片URL */
|
|
50
|
-
contentBg: {
|
|
51
|
-
type: StringConstructor;
|
|
52
|
-
default: undefined;
|
|
53
|
-
};
|
|
54
|
-
/** 面包屑底边框样式,如 '1px solid #e3e9ef',传 'none' 隐藏 */
|
|
55
|
-
breadcrumbBorder: {
|
|
56
|
-
type: StringConstructor;
|
|
57
|
-
default: undefined;
|
|
58
|
-
};
|
|
59
19
|
}>> & Readonly<{}>, {
|
|
60
20
|
layout: "horizontal" | "vertical" | "header-aside";
|
|
61
|
-
headerBg: string;
|
|
62
|
-
asideBg: string;
|
|
63
|
-
contentBg: string;
|
|
64
|
-
breadcrumbBorder: string;
|
|
65
21
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
66
22
|
export default _default;
|
|
67
23
|
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -1,32 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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({
|
|
7
9
|
name: "ZlAppLayout",
|
|
8
10
|
props: {
|
|
9
11
|
/** 布局方向:横向用顶部菜单,纵向用侧边菜单,header-aside 用通栏顶栏 + 侧边菜单 */
|
|
10
|
-
layout: { type: String, default: "header-aside" }
|
|
11
|
-
/** 顶栏背景:支持颜色/渐变/图片URL */
|
|
12
|
-
headerBg: { type: String, default: void 0 },
|
|
13
|
-
/** 侧栏背景:支持颜色/渐变/图片URL */
|
|
14
|
-
asideBg: { type: String, default: void 0 },
|
|
15
|
-
/** 内容区背景:支持颜色/渐变/图片URL */
|
|
16
|
-
contentBg: { type: String, default: void 0 },
|
|
17
|
-
/** 面包屑底边框样式,如 '1px solid #e3e9ef',传 'none' 隐藏 */
|
|
18
|
-
breadcrumbBorder: { type: String, default: void 0 }
|
|
12
|
+
layout: { type: String, default: "header-aside" }
|
|
19
13
|
},
|
|
20
|
-
setup(e, { slots:
|
|
21
|
-
const o = l(() => ({
|
|
22
|
-
"--zl-layout-header-bg": a(e.headerBg),
|
|
23
|
-
"--zl-layout-aside-bg": a(e.asideBg),
|
|
24
|
-
"--zl-layout-content-bg": a(e.contentBg),
|
|
25
|
-
"--zl-breadcrumb-border": e.breadcrumbBorder
|
|
26
|
-
}));
|
|
14
|
+
setup(e, { slots: o, attrs: r }) {
|
|
27
15
|
return () => {
|
|
28
16
|
let t;
|
|
29
|
-
return e.layout === "vertical" ? t =
|
|
17
|
+
return e.layout === "vertical" ? t = p : e.layout === "header-aside" ? t = m : t = n, i(t, { ...r }, o);
|
|
30
18
|
};
|
|
31
19
|
}
|
|
32
20
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zl-ui-kit/components",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ZL UI 业务组件库(Element Plus 体系,Zl 前缀)——首批:Icon/AutoTooltip/Tag/CornerTag/Text/Title/Copy/Empty/Pagination/DictTag",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"file-type": "^20.4.1",
|
|
40
40
|
"dt-sql-parser": "^4.3.1",
|
|
41
41
|
"sql-formatter": "^15.4.2",
|
|
42
|
-
"@zl-ui-kit/
|
|
43
|
-
"@zl-ui-kit/
|
|
44
|
-
"@zl-ui-kit/utils": "0.27.
|
|
42
|
+
"@zl-ui-kit/icons": "0.27.2",
|
|
43
|
+
"@zl-ui-kit/composables": "0.27.2",
|
|
44
|
+
"@zl-ui-kit/utils": "0.27.2"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@vueuse/core": "^12.3.0 || ^13.0.0 || ^14.0.0 || ^15.0.0",
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
"@vue-office/pptx": "1.0.1",
|
|
101
101
|
"echarts": "^5.6.0",
|
|
102
102
|
"@jichuang/eslint-config": "1.0.0",
|
|
103
|
-
"@jichuang/vite-config": "1.0.0",
|
|
104
103
|
"@jichuang/tsconfig": "1.0.0",
|
|
105
|
-
"@
|
|
104
|
+
"@jichuang/vite-config": "1.0.0",
|
|
105
|
+
"@zl-ui-kit/theme": "0.27.2"
|
|
106
106
|
},
|
|
107
107
|
"repository": {
|
|
108
108
|
"type": "git",
|
|
@@ -1,65 +0,0 @@
|
|
|
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=HeaderAside2.vue.mjs.map
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
});
|
|
39
|
-
export {
|
|
40
|
-
$ as default
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=Horizontal2.vue.mjs.map
|
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
});
|
|
51
|
-
export {
|
|
52
|
-
I as default
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=Vertical2.vue.mjs.map
|