Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue3-rightmenus

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-rightmenus

ContextMenu based on Vue 3.x

  • 2.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

基于Vue 3.x的右键上下文菜单

一、下载

npm i vue3-rightmenus

二、引入

// main.ts
import "vue3-rightmenus/dist/css/default.css";
import rightMenus from "vue3-rightmenus";
const app = createApp(App)
app.use(rightMenus);

三、使用

<template>
  <div>
    <div class="box" v-rightMenu:contextmenu="{ id: 123 }">右键点击我2222</div>
    <v-rightmenus ref="contextmenu" @show="showMenuBox">
      <v-rightmenus-item> 授权 </v-rightmenus-item>
      <v-rightmenus-divider />
      <v-rightmenus-submenu title="排序方式">
        <v-rightmenus-item>名称</v-rightmenus-item>
        <v-rightmenus-item>日期</v-rightmenus-item>
        <v-rightmenus-submenu title="更多">
          <v-rightmenus-item>大小</v-rightmenus-item>
          <v-rightmenus-item>标记</v-rightmenus-item>
          <v-rightmenus-item>类型</v-rightmenus-item>
        </v-rightmenus-submenu>
      </v-rightmenus-submenu>
      <v-rightmenus-item disabled>测试</v-rightmenus-item>
      <v-rightmenus-divider />
      <v-rightmenus-item>打开属性</v-rightmenus-item>
    </v-rightmenus>
  </div>
</template>
<script setup lang="ts">
const showMenuBox = (options: any) => {
  console.log("回调参数", options);
};
</script>

alt

FAQs

Package last updated on 26 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc