A powerful security code input supports dynamic configuration of the number of input boxes.
- Automatic next input box.
- Page initialization automatic countdown.
- The number of custom input boxes.
- Support copy and paste.
- Support tailwindcss by version >=2.0.0
npm install --save ofcold-vue-security-code // OR yarn add ofcold-vue-security-code
<!-- Html --> <input-code v-model="code"/>
// Javascript import InputCode from 'ofcold-vue-security-code'; export default { data:() => ({ code: '' }), components: { InputCode } } // OR ... import {defineComponent, ref} from 'vue' import InputCode from 'ofcold-vue-security-code' export default defineComponent({ components: { InputCode }, setup(props, ctx) { const code = ref('') return { code } } })
isArrayDeprecated version 2.x please usereturnArray.returnArrayboolean default false The return data type.valstring|array default ''.lenThe code length default6.sizeThe input size defaultmdThe options aresmall,default,lg,xl.
