vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

feat(VOtpInput): add number password type to component

Open developer-diganta opened this issue 2 years ago • 0 comments

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>

developer-diganta avatar Jan 17 '24 19:01 developer-diganta