Skip to content

Commit 4997bb3

Browse files
committed
updated component
1 parent 50cf7ab commit 4997bb3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/component.vue

+2-6
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,15 @@ export default defineComponent({
8383
const unmaskedValue = ref('' as Input | undefined)
8484
const config = computed(() => ({ ...props }))
8585
86-
const emittedValue = computed(() => {
87-
return props.masked ? maskedValue.value : unmaskedValue.value
88-
})
89-
9086
const input = (event: Event) => {
9187
const { target } = event as CustomInputEvent
9288
maskedValue.value = target.value
9389
unmaskedValue.value = target.unmaskedValue
94-
emit('input:model-value', emittedValue.value)
90+
emit('input:model-value', props.masked ? maskedValue.value : unmaskedValue.value)
9591
}
9692
9793
const change = () => {
98-
emit('update:model-value', emittedValue.value)
94+
emit('update:model-value', props.masked ? maskedValue.value : unmaskedValue.value)
9995
}
10096
10197
watch(

0 commit comments

Comments
 (0)