z-sms-verify
v1.0.0
Published
vue pagination
Downloads
4
Readme
Install
npm install --save z-sms-verify
Useage
use in the vue component
<template>
<div id="app">
<z-sms-verify :vant="true" send-url="xxxxx" @success="getSuccess" @error="getError"></z-sms-verify>
</div>
</template>
<script>
import ZSmsVerify from 'z-sms-verify'
export default {
name: 'Test',
components: {
ZSmsVerify
},
methods: {
getError (msg) {
console.log(msg)
},
getSuccess (msg) {
if (typeof msg === 'string') {
console.log('string')
} else {
console.log('object')
}
}
}
}
</script>
<style></style>
Component props
| propos | type | default value | explain | |--|--|--|--| | size | String | normal | normal or large | | border | Boolean | true | cell border bottom | | label-width | Number | 60 | cell label width | | maxlength | Number | 4 | verify input length | | sendUrl | String | '' | message send request url(required) | | checkUrl | String | '' | message check request url | | vant | Boolean | false | vant style |
License
copyright © 2019 zhaizhaohui