vuetify
vuetify copied to clipboard
feat(VOtpInput): add number password type to component
resolves #18964
Description
As mentioned in the issue, I have added an attribute called numeric which can be used with type password. Once numeric is set to true, VOtpInput would not accept non-numeric values.
Markup:
eslint-disable vue/script-indent
<template>
<v-app>
<v-container>
<!-- -->
<v-otp-input v-model="otp" type="password" numeric/>
{{ otp }}
</v-container>
</v-app>
</template>
<script>
import { ref } from 'vue';
import { VOtpInput } from '../src/components/VOtpInput/index.ts'
export default {
name: 'Playground',
components: {
VOtpInput,
},
setup () {
const otp = ref('')
return {
otp,
//
}
},
}
</script>