fix phone input (#294)
This commit is contained in:
parent
d0dd1cfe39
commit
4f56867d75
|
@ -11,7 +11,7 @@
|
||||||
:data="countries"
|
:data="countries"
|
||||||
:disabled="(disabled || countries.length===1)?true:null" :searchable="true" :search-keys="['name']" :option-key="'code'" :color="color"
|
:disabled="(disabled || countries.length===1)?true:null" :searchable="true" :search-keys="['name']" :option-key="'code'" :color="color"
|
||||||
:has-error="hasValidation && form.errors.has(name)"
|
:has-error="hasValidation && form.errors.has(name)"
|
||||||
:placeholder="'Select a country'" :uppercase-labels="true" :theme="theme" @change="onChangeCountryCode"
|
:placeholder="'Select a country'" :uppercase-labels="true" :theme="theme" @update:model-value="onChangeCountryCode"
|
||||||
>
|
>
|
||||||
<template #option="props">
|
<template #option="props">
|
||||||
<div class="flex items-center space-x-2 hover:text-white">
|
<div class="flex items-center space-x-2 hover:text-white">
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { inputProps, useFormInput } from './useFormInput.js'
|
import { inputProps, useFormInput } from './useFormInput.js'
|
||||||
import InputWrapper from './components/InputWrapper.vue'
|
import InputWrapper from './components/InputWrapper.vue'
|
||||||
import countryCodes from '../../../data/country_codes.json'
|
import countryCodes from '~/data/country_codes.json'
|
||||||
import CountryFlag from 'vue-country-flag-next'
|
import CountryFlag from 'vue-country-flag-next'
|
||||||
import parsePhoneNumber from 'libphonenumber-js'
|
import parsePhoneNumber from 'libphonenumber-js'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue