A grid password vue component
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# somewhere
import GridPassword from '../components/GridPassword'
# in your component
components: {
GridPassword
}
<template>
<div>
<GridPassword
:passwordLength='gridNum'
:onConfirm='onConfirm'
:onClose='onClose'
:isNumber='isNumber'
:isPassword='isPassword'
:isBtn='isBtn'>
</GridPassword>
</div>
<template/>
Name | type | default | description |
---|---|---|---|
tip | String | '请输入密码' | 输入提示语 |
passwordLength | Number | 6 | 格子位数 |
isPassword | Boolean | true | 显示明文或者密码黑点 |
isNumber | Boolean | true | 调出数字键盘或者混合键盘 |
isBtnCtr | Boolean | true | 使用确认按钮或者自动提交 |
Name | isRequire | description |
---|---|---|
onConfirm | require | 输入完成时的回调函数 |
onClose | require | 关闭输入框的回调函数 |
Copyright (c) 2017 60kmlh Licensed under the MIT license.