JSPM

vue-diy-rightmenu

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q33129F
  • License MIT

vue2版 自定义右键菜单

Package Exports

  • vue-diy-rightmenu
  • vue-diy-rightmenu/dist/vue-diy-rightmenu.min.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-diy-rightmenu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

自定义右键菜单(vue2版)

vue3版本 | vue2版本

安装

npm i vue-diy-rightmenu

使用

import vueDiyRightmenu from 'vue-diy-rightmenu';

Vue.use(vueDiyRightmenu);

1. 参数

  • cname:自定义class-->String;非必传;

  • hide-on-click:点击menu列表后是否隐藏menu列表-->Boolean;非必传,默认true;

2. 插槽

  • 默认插槽:替换显示的内容

  • menu插槽:替换默认menu列表

    <ul>
      <li>1</li>
      <li>2</li>
    </ul>
    <ul slot="menu">
      <li>11</li>
      <li>22</li>
    </ul>

3. 返回默认事件

  • clickDom:鼠标右击的回调,返回选中的DOM

  • defaultEdit:默认菜单列表的编辑回调,返回之前选中的DOM

  • defaultDelete:默认菜单列表的删除回调,返回之前选中的DOM