1.0.5 • Published 5 years ago
cxh-v-code v1.0.5
#author @skycius-chan 陈旭辉
Use
// vue
...
<cxh-v-code :compareValue="compareValue" @comparison="comparison"></cxh-v-code>
...
// js
...
import cxhVCode from 'cxh-v-code'
...
data(){
return {
compareValue:""
}
}
...
components:{
cxhVCode
},
...
comparison(status){
console.log(status)
},
...
Attributes
名称 | 说明 | 类型 | 默认值 |
---|---|---|---|
background | 背景颜色 | String | lightcyan |
width | 验证码宽度 | Number | 60 |
height | 验证码高度 | Number | 20 |
compareValue | 需要验证的值 | String | ---- |
isCaseSensitive | 是否区分大小写 | Boolean | false |
Methods
名称 | 说明 | 参数 |
---|---|---|
comparison | 验证返回值 | (status)=>{console.log(status) // false or true} |