paul-thebaud / v-phone-input

International and accessible phone input for Vuetify 3 and Vue 3.
https://paul-thebaud.github.io/v-phone-input/
MIT License
65 stars 6 forks source link

tutorial: usage in Nuxt 3 #23

Closed z0lo13 closed 9 months ago

z0lo13 commented 10 months ago

create file

  1. v-phone-input.client.ts inside plugins

  2. Put Code:

    
    import 'v-phone-input/dist/v-phone-input.css';
    import 'flag-icons/css/flag-icons.min.css';
    // @ts-ignore
    import { createVPhoneInput } from 'v-phone-input';

export default defineNuxtPlugin((nuxtApp) => { const vPhoneInput = createVPhoneInput({ label: 'Your phone number', countryIconMode: 'svg', }); nuxtApp.vueApp.use(vPhoneInput) })



3. In a component use like in readme
paul-thebaud commented 10 months ago

Hello @z0lo13, is this a question or a tutorial to use this on nuxt?

z0lo13 commented 9 months ago

Hello @z0lo13, is this a question or a tutorial to use this on nuxt?

My bad, didn't change the template. It is a tutorial indeed.

paul-thebaud commented 9 months ago

Thanks @z0lo13, I'm closing as this is not an issue and people will still be able to check it inside closed issues.