phone format

This commit is contained in:
2023-09-22 14:10:52 +03:00
parent 7c20f070f1
commit 33c32ce124
2 changed files with 6 additions and 2 deletions

View File

@@ -19,7 +19,11 @@ const emit = defineEmits<TUiFieldPhoneEmits>()
// Value string.
const valueStr = computed({
get: () => getPhoneNumberFormat(props.modelValue),
get: () => {
if (props.modelValue) {
return getPhoneNumberFormat(props.modelValue)
}
},
set: val => {
emit('update:error')
emit('update:model-value', getPhoneNumberValue(val))