vc-popup-bottom-menu

vc-popup-bottom-menu
883
Install
npm install vc-popup-bottom-menu
Latest Version:0.1.26
License:MIT
Last Updated:Aug 9, 2018
Links: npm
Maintainer: deepkolos

vc-popup-bottom-menu


模仿微信底部弹出菜单~

添加依赖

> yarn add vc-popup-bottom-menu || npm i vc-popup-bottom-menu || cnpm i vc-popup-bottom-menu --by=yarn

引入

import Vue from 'vue'
import VcPopupBottomMenu from 'vc-popup-bottom-menu'
// 这里名字可以随意

Vue.use(VcPopupBottomMenu)

在具体页面中使用

this.bottomMenu = new this.$popup.BottomMenu({
  ...config
  propsData: {}
})

this.bottomMenu.open(e, {
  ...config
  propsData: {}
})

this.bottomMenu.close()

e为事件Event, 比如click时候取得的evt, 与一些定位方法相关 config可参考popup-base/readme.md

propsData配置定义

{
  e: Object, // 从open(e, {})传进来的e
  items: {
    type: Array,
    required: true,
    example: [
      {
        name:  String,
        click: Function,
      },
      {
        name: '扫描',
        click: e => console.log('btn0 clicked'),
      },
      ...
    ]
  }
}

效果预览

License

MIT 一起来扣细节~

Related Packages

vc-popup-press-menu

vc-popup-press-menu

1,200
vc-popup-center-menu

vc-popup-center-menu

1,045
@floating-ui/vue

Floating UI for Vue

61,895,694 32,773
@fastkit/vue-stack

Library for displaying dialogs, tooltips and menus in Vue applications.

13,088 6
hs-menu

A common menu

1,817

Version History

Version Released License
0.1.26 MIT
0.1.25 MIT
0.1.24 MIT
0.1.23 MIT
0.1.22 MIT
Pre-releases (4)
Version Released License
0.1.0-alpha-2 MIT
0.1.0-3 MIT
0.1.0-2 MIT
0.1.0-0 MIT