From 33c32ce124f9af6d2ef7938b9500f2254ce14046 Mon Sep 17 00:00:00 2001 From: AntoXa PRO Date: Fri, 22 Sep 2023 14:10:52 +0300 Subject: [PATCH] phone format --- package.json | 2 +- src/components/FieldPhone.vue | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 14e48f7..7952ead 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "axp-ui", "descriiption": "My helper ui lib", - "version": "1.7.1", + "version": "1.7.2", "homepage": "https://antoxahub.ru/antoxa/axp-ui", "repository": { "type": "git", diff --git a/src/components/FieldPhone.vue b/src/components/FieldPhone.vue index c8ca011..9c30b19 100644 --- a/src/components/FieldPhone.vue +++ b/src/components/FieldPhone.vue @@ -19,7 +19,11 @@ const emit = defineEmits() // 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))