v-monoplasty-slide-verify
v1.0.8
Published
vue slide verify
Downloads
7
Readme
v-monoplasty-slide-verify
A Vue plugin to slide verify Demo
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
Quick Start
1. Import v-monoplasty-slide-verify into your vue.js project.
Using build tools:
npm install --save v-monoplasty-slide-verify
import Vue from 'vue';
import SlideVerify from 'v-monoplasty-slide-verify';
Vue.use(SlideVerify);
2. Now you have it. The simplest usage:
<slide-verify :l="42"
:r="10"
:w="310"
:h="155"
@success="onSuccess"
@fail="onFail"
@refresh="onRefresh"
></slide-verify>
<div>{{msg}}</div>
export default {
name: 'App',
data(){
return {
msg: '',
}
},
methods: {
onSuccess(){
this.msg = 'login success'
},
onFail(){
this.msg = ''
},
onRefresh(){
this.msg = ''
}
}
}
Document
argument
| Param | Type | Describe | | :------: | :------: | :------: | | l | Number | block length | | r | Number | block circle radius | | w | Number | canvas width | | h | Number | canvas height |
callBack
| Event | Type | Describe | | :------: | :------: | :------: | | success | Function | success callback | | fail | Function | fail callback | | refresh | Function | refresh button callback |
Log
V1.0.2
- Mobile terminal touch event support