mint-actionsheet

2.0.0 • Public • Published

Overview

mint-actionsheet is an action sheet component for vue.js

Installation

First, install mint-actionsheet from npm:

$ npm install mint-actionsheet

Import it:

require ('mint-actionsheet/lib/index.css');
 
// ES6 mudule
import Actionsheet from 'mint-actionsheet';
 
// CommonJS
const Actionsheet = require('mint-actionsheet').default;

Register component:

Vue.component('actionsheet', Actionsheet);

Example

actions is an array of objects. Each object has two keys: name and method. name is the text showing on the sheet, and method(optional) is the callback when clicked.

Bind v-model with one of your vue instance variables. Toggle it to switch on/off the action sheet.

<mt-actionsheet
  :actions="actions"
  v-model="sheetVisible">
</mt-actionsheet>

API

option description type acceptable values default
actions array of actions Array
cancelText text of the cancel button. If this is an empty string, no cancel button will show String '取消'
closeOnClickModal if the action sheet turns off when the modal is clicked Boolean true

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i mint-actionsheet

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • qingwei.li
  • yi.yang