feat: refine sidenav and layout demo, update veui

This commit is contained in:
Justineo
2022-04-21 23:23:30 +08:00
parent eadaad2e22
commit f516b26edd
18 changed files with 1596 additions and 157 deletions

View File

@@ -10,15 +10,15 @@
`Layout` 组件支持多种典型布局。
[[ demo src="/demo/layout/basic.vue" ]]
[[ demo src="/demo/layout/basic.vue" browser="/demos/layout/basic.vue" ]]
### 通顶侧边栏
[[ demo src="/demo/layout/global-sidebar.vue" ]]
[[ demo src="/demo/layout/global-sidebar.vue" browser="/demos/layout/global-sidebar.vue" ]]
### 通栏底部
[[ demo src="/demo/layout/global-footer.vue" ]]
[[ demo src="/demo/layout/global-footer.vue" browser="/demos/layout/global-footer.vue" ]]
### 吸顶/吸底布局
@@ -32,7 +32,7 @@
当吸底的布局底部和吸顶侧边栏一起使用需要在布局底部的父组件 `Layout` 上设置 `--dls-layout-footer-height` 来指定布局底部的高度。
:::
[[ demo src="/demo/layout/sticky.vue" ]]
[[ demo src="/demo/layout/sticky.vue" browser="/demos/layout/sticky.vue" ]]
## API

View File

@@ -1,4 +1,4 @@
# Menu <small>边栏菜单</small>
# Sidenav <small>边栏菜单</small>
## 示例
@@ -6,17 +6,17 @@
结合 Vue Router 使用边栏菜单。
[[ demo src="/demo/menu/normal.vue" ]]
[[ demo src="/demo/sidenav/normal.vue" ]]
### 可折叠
使用 [`collapsible`](#props-collapsible) 属性控制菜单是否可以折叠
配合 `Sidebar` [`collapsible`](./sidebar#props-collapsible) 属性可以控制菜单的展开/收起
[[ demo src="/demo/menu/collaspible.vue" ]]
[[ demo src="/demo/sidenav/collaspible.vue" browser="/demo/sidenav/collaspible.vue" ]]
### 自定义插槽
[[ demo src="/demo/menu/slot.vue" ]]
[[ demo src="/demo/sidenav/slot.vue" ]]
## API
@@ -28,7 +28,6 @@
| ``items`` | `Array<Object>=` | `[]` | [^items] |
| ``active`` | `string` | - | [^active] |
| ``matches`` | `function(Object, string): boolean` | - | [^matches] |
| ``collapsible`` | `boolean` | `false` | 整个导航菜单是否可折叠。 |
| ``collapsed`` | `boolean` | `false` | [^collapsed] |
| ``expanded`` | `Array<string>=` | `[]` | [^expanded] |
@@ -139,9 +138,3 @@
| -- | -- |
| ``activate`` | 用户点击有 `to` 的节点触发,参数是激活节点的整个 `item` 数据。 |
| ``click`` | 用户点击节点时触发,参数是激活节点整个 `item` 数据。 |
### 图标
| 名称 | 描述 |
| -- | -- |
| ``expand`` | 展开。 |
| ``collapse`` | 折叠。 |