1.0.7 • Published 7 years ago

wox-admin-menu v1.0.7

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

Menu image

菜单组件

API

属性说明类型默认值
theme主题颜色String:light darkdark
mode菜单类型,现在支持垂直 vertical、水平 horizontal、和内嵌模式 inline 三种String
menuDdata菜单数据,例如:{title: '菜单标题', key: 'title' , url: '菜单链接',child:'是否有子元素'}Array
currentmenuData 数据中的 key 值相对应,用于初始化选中的项Array
onClick点击 menuitem 调用此函数,参数为 {item, key, keyPath}function

menuDdata.child (array)

属性说明类型默认值
group子级元素是否为一个组(组的标题)String非必填
key如果子级元素是一个组,为组的keyString非必填
item子元素内容, 例如:{title: '子级菜单标题', key: 'keys' , url: '子级菜单链接',}array

Usage

import WoxMenu from 'wox-admin-menu';

const data = [
  {title: '批量维护', key: 'maintain', url: 'supplier/hotel/save.html?pid='},
  {title: '产品鉴证', key: 'product', url: 'supplier/hotel/save.html'},
  { 
    title: '库存管理',
    key: 'stockManage', 
    child:[
      {
        group : '男歌星',
        key: 'sing',
        item:[
          {
            title:'周杰伦',
            key:'jie',
            url:'www.baidu.com'
          },
          {
            title:'林俊杰',
            key:'jj',
            url:'www.baidu.com'
          }
        ]
      },
      {
        item:[{
          title: '动物世界',
          key:'zoology',
          url:'www.baidu.com'
        }]
      }
    ],
];

ReactDOM.render(<WoxMenu mode="horizontal" menuDdata={data} current={['maintain']} onClick={this.handleClick.bind(this)}/>, rootEle);
1.0.7

7 years ago

1.0.6

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago