1.0.2 • Published 2 years ago

vue-auth-code-number-input v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue-auth-code-input

Authentication code input component in vue

Install

yarn add vue-auth-code-input

Usage

<template>
  <div>
    <vue-auth-code-input @inputChange="handleChange"/>
  </div>
</template>
<script>
import VueAuthCodeInput from 'vue-auth-code-input'
export default {
  components: {
    VueAuthCodeInput
  },
  methods: {
    handleChange(code, index){
      console.log(code)
    }
  }
}
</script>

Attributes

nametypedescriptionrequireddefault
codeLengthNumberset the length of authentication codeNo6

Event

nameparametersdescription
inputChangecodeArray, changedIndexWhen some input value changes
inputCompletecodeArray, changedIndexWhen all input value are not empty