2.0.0 • Published 8 years ago

mint-actionsheet v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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

optiondescriptiontypeacceptable valuesdefault
actionsarray of actionsArray
cancelTexttext of the cancel button. If this is an empty string, no cancel button will showString'取消'
closeOnClickModalif the action sheet turns off when the modal is clickedBooleantrue

License

MIT

2.0.0

8 years ago

0.1.0

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago