1.0.61 • Published 4 years ago

@cloud-sn/v-menu v1.0.61

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

v-menu


Vue Menu component

Development

yarn

yarn start

Example

http://localhost:8000/example/default.html

Feature

  • Support IE9+, Chrome, Firefox

Install

npm config set @cloud-sn:registry http://snpm.cnsuning.com

yarn add @cloud-sn/v-menu

Usage

import Vue from 'vue';
import VMenu, { VMenuItem, VMenuItemGroup, VSubMenu } from '@cloud-sn/v-menu';

API

VMenu

Props

参数名描述类型默认
theme主题stringlight
mode菜单类型 , 支持水平 , 内嵌两种模式horizontal | inlineinline
inlineIndentinline 模式时菜单缩进宽度24
selectedKeys选中的菜单项, 与 name 属性关联string[]
openKeys展开的 vSubMenu 项 ,name 属性关联string[]
visible是否展示booleantrue
className类名string''
styles样式string''
uniqueOpened是否同时只展开一个菜单booleantrue

Events

参数名描述类型默认
click点击 vMenuItem 触发Function({name,item, eventPath,domevent})
open-changevSubMenu 展开或关闭时触发Function(openKeys:string[])
deselectvMenuItem 取消选中时触发Function(selectedKeys:string[])
selectvMenuItem 选中时触发Functioin(selectedKeys:string[])

vMenuItem

Props

参数名描述类型默认
name唯一标识String|Number''
disabled是否禁用Booleanfalse
styles样式String''
className类名String''

Events

vSubMenu

Props

参数名描述类型默认
name唯一标识String|Number''
disabled是否禁用Booleanfalse
styles样式String''
className类名String''

Events

参数名描述类型默认
click点击 vSubMenu 时触发Function({name, domevent})

vMenuItemGroup

Props

参数名描述类型默认
title分组标题string''
styles样式string''
className类名string''

Events