0.2.0 • Published 1 year ago

vue-antd-layout v0.2.0

Weekly downloads
26
License
MIT
Repository
github
Last release
1 year ago

使用

建议使用vue-cli@3.0以上版本创建一个项目,使用前请确保已安装vue和ant-design-vue

npm i vue-antd-layout --save
// or
yarn add vue-antd-layout
import { VueAntdLayout } from 'vue-antd-layout';

Vue.use(VueAntdLayout);

```html
 <vue-antd-layout :menu-data="data"></vue-antd-layout>

API

参数说明类型默认值
menu-data左侧菜单数据,树状结构Array[]
layoutlayout布局'sidemenu'-
logo左上角图标String-
title左上角标题String-
isCollapse左侧菜单是否可折叠Booleantrue
collapse设置菜单收起展开Booleanfalse
defaultActive选中的菜单keyString-
defaultOpeneds默认打开的菜单keyString-
uniqueOpened菜单手风琴模式Booleantrue
showFooter是否展示页脚Booleantrue
onMenuHeaderClickmenu 菜单的头部点击事件event-
menuHeader自定义slider logoslot-
asideExtra在slider菜单底部追加domslot-
header自定义Headerslot-
collapsedButton自定义折叠按钮slot-
rightContent自定义头部右侧domslot-
navTabs自定义导航tabsslot-
footer自定义页脚slot-

说明

使用antd Menu 的api :

  • unique-opened
  • default-active
  • default-active
  • default-openeds

menu-data 数据格式 :

[{
  "name": "level1",
  "title": "一级菜单",
  "icon": "el-icon-eleme",
  "children": [{
    "name": "level2-0",
    "title": "二级菜单",
    "icon": "el-icon-eleme",
    "children": [{
      "name": "level3",
      "title": "三级菜单",
      "icon": "el-icon-eleme",
    }]
  },{
    "name": "level2-1",
    "title": "二级菜单",
    "icon": "el-icon-eleme",
  }],
},{
  "name": "level1-1",
  "title": "一级菜单",
  "icon": "el-icon-eleme",
}]
0.2.0

1 year ago

0.1.4

2 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.3

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago