rightmenu-js

1.0.0 • Public • Published

vue 自定义指令 鼠标右键菜单

/*
 *main.js 引入 Vue.use(rightmenu)
 *局部使用v-rightmenu='menu[Object]'
 */

/**
 * direction 鼠标左右键
 * boxStyle  菜单列表样式
 * optionStyle 菜单选项样式
 * menus 菜单列表(以下所有都是menus[Array]每一项的属性)
 * content 菜单显示的文字 <支持html>
 * callback:菜单点击要触发函数  需要在methods定义
 * style : 本项菜单的单独样式 可以覆盖掉optionStyle
 * icon : icon图片地址
 * iconStyle: icon 图片的样式(例如大小等 直接作用于图片)
 * iconPosition : 支持left / right (其余全部按照left处理);
 */

/**
 * 字段(field)           类型(type)                 是否可以为空(is can null)    默认值
 * direction           [left | right]                       Y                   right
 * boxStyle               [ css ]                           Y                   ""
 * optionStyle            [ css ]                           Y                   ""
 * menus                 [ Array ]                          N                   ""
 * content            [ html | text ]                       Y                   ""
 * callback           [  methods function ]                 Y                   return false
 * style                  [ css ]                           Y                   ""
 * icon               [ url | className ]                   Y                   ""
 * iconStyle              [ css ]                           Y                   ""
 * iconPosition          [ string ]                         Y                   "left"
 */

Readme

Keywords

Package Sidebar

Install

npm i rightmenu-js

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

10.2 kB

Total Files

3

Last publish

Collaborators

  • cao15340019117