0.0.3 • Published 5 years ago

hex-actionsheet v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 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/style.css');

// ES6 mudule
import Actionsheet from 'mint-actionsheet';

// CommonJS
const Actionsheet = require('mint-actionsheet').default;

Register component:

Vue.component('actionsheet', Actionsheet);

Then use it:

<actionsheet :actions="actions" :visible.sync="sheetVisible"></actionsheet>

Usage

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.

Sync visible with one of your vue instance variables. Toggle it to switch on/off the action sheet.

API

OptionDescriptionValueDefault
actionsarray of actionsArray
visiblevisibility of the action sheetBoolean'false'
cancelTexttext of the cancel buttonString'取消'
closeOnClickModaldetermines if the action sheet turn off when the modal is clickedBoolean'true'

License

MIT

0.0.5

5 years ago

0.0.4

5 years ago

0.0.4-alpha.0

5 years ago

0.0.3

5 years ago