password-keyboard
v0.1.8
Published
```vue npm install --save password-keyboard ```
Downloads
32
Maintainers
Readme
适用于vue的移动端密码输入框插件
安装
npm install --save password-keyboard
使用
import passwordKeyboard from 'password-keyboard'
components:{
passwordKeyboard
}
props
属性 | 类型|是否必填 | 默认值
-|-|-|-
show | Boolean | 是 |false
tradeAmount | String,Number | 否 |无,不传时不显示
title | String | 否 |无,不传时不显示
passLength|Number|否|6
mask|Boolean|否|true
方法
//输入完成后触发,(输入长度为密码长度时完成)
@complet
示例
<template>
<div id="app">
<button @click="showHandler">显示密码框</button>
<passwordKeyboard @complet="completHandler" :show="show"> </passwordKeyboard>
</div>
</template>
<script>
import passwordKeyboard from 'vue-password-keyboard'
export default {
name: 'App',
components: {
passwordKeybord
},
data() {
return {
show: false,
isHave: null
}
},
mounted() {},
methods: {
showHandler() {
this.show = true
},
completHandler(pass) {
this.show = false
}
}
}
</script>
在线预览
https://password-keybord-beryl.vercel.app