1.0.6 • Published 4 years ago

et-verify-code v1.0.6

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

et-verify-code

A vue component for verify code input.

show

show

install

npm install et-verify-code -S

use

用法一:
// main.js
import EtVerifyCode from 'et-verify-code'
Vue.use(EtVerifyCode)
// demo.js
<template>
  <et-verify-code @sendCodeInput="currentCode" @goNext="submitCode" :length="4" /> <!-- 属性length:验证码位数,不传则默认为4位 -->
</template>
<script>
export default {
  name: 'VcodeTest',
  data () {
    return {
      curCode: ''
    }
  },
  methods: {
    currentCode (val) {
      this.curCode = val
    },
    submitCode () {
      alert('submitCode')
    }
  }
}
</script>
用法二:
// demo.js
<template>
  <et-verify-code @sendCodeInput="currentCode" @goNext="submitCode" :length="4" /> <!-- 属性length:验证码位数,不传则默认为4位 -->
</template>
<script>
import EtVerifyCode from './components/et-verify-code.vue'
export default {
  name: 'VcodeTest',
  components: {
    EtVerifyCode
  },
  data () {
    return {
      curCode: ''
    }
  },
  methods: {
    currentCode (val) {
      this.curCode = val
    },
    submitCode () {
      alert('submitCode')
    }
  }
}
</script>
1.0.2

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago