1.0.1 • Published 1 year ago

bbu-contextmenu v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

bbu-contextmenu

A contextmenu for Vue3

Homepage

https://sumcets.github.io/bbu-contextmenu/

Installation

npm install bbu-contextmenu

Attributes

AttributeTypeDefault
menuListArrayoptions[]

Options

AttributeTypeDefault
disabledbooleanfalse

Event

NameDescriptionParameters
onMenuClicktriggers when user clicks the menuoptions

Demo

<template>
    <BbuContextmenu :menu-list="menuList" @onMenuClick="onMenuClick">
      <div class="context">
          bbu-contextmenu
      </div>
    </BbuContextmenu>
</template>

<script setup>
    import {BbuContextmenu} from 'bbu-contextmenu'
    import 'bbu-contextmenu/bbu-contextmenu/style.css'
    const menuList = [
        {
          name: 'COPY',
          disabled: false
        },
        {
          name: 'EDIT',
          disabled: true
        },
        {
          name: 'VUE3',
          disabled: false
        }
     ]
    const onMenuClick = menu => {
        // todo
        // { name: 'xxx', disabled: true }
    }
    
</script>

View

img

img

1.0.1

1 year ago

1.0.0

1 year ago