refactor: use a default value from a prop

This commit is contained in:
Piotr Wasak 2024-11-16 14:00:35 +01:00
parent e9082b2e3d
commit 48df94ddf5
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ const props = defineProps<{
defaultValue?: string | number
}>()
const modelValue = defineModel<string | number>({ default: '' })
const modelValue = defineModel<string | number>()
modelValue.value = props.defaultValue
</script>

View File

@ -7,7 +7,7 @@ const props = defineProps<{
defaultValue?: string | number
}>()
const modelValue = defineModel<string | number>({ default: '' })
const modelValue = defineModel<string | number>()
modelValue.value = props.defaultValue
</script>