0.0.3 • Published 4 years ago
vue-user-auth v0.0.3
vue-user-auth
This is a digital authentication component based on vue3.0
Installation
$ npm i vue-user-authExample
import { createApp } from 'vue'
import App from './App.vue'
import VueUserAuth from 'vue-user-auth'
createApp(App)
.use(VueUserAuth)
.mount('#app')Basic usage
</template>
<vue-user-auth ref="verificationId" :id-code="idCode" @update:id-code="idCode = $event" :contentHeight="38" />
<template>
<script lang="ts" setup>
import { ref } from 'vue'
let idCode = ref<string>("");
</scipt>VueUserAuth Attributes
| Attribute | Description | Type | Accepted Values | Default |
|---|---|---|---|---|
| contentWidth | Width of the container | number | — | 100 |
| contentHeight | Height of the container | number | — | 40 |
| idCode | Verification Code | string | — | random |
| fontSizeMin | Font minimum | number | — | 20 |
| fontSizeMax | Font maximum | number | — | 35 |
| backgroundColorMin | Minimum background color of verification code | number | — | 200 |
| backgroundColorMax | Maximum background color of verification code | number | — | 220 |
| dotColorMin | Minimum interference point of verification code | number | — | 60 |
| dotColorMax | Maximum interference point of verification code | number | — | 120 |