File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -83,15 +83,19 @@ 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+
8690 const input = (event : Event ) => {
8791 const { target } = event as CustomInputEvent
8892 maskedValue .value = target .value
8993 unmaskedValue .value = target .unmaskedValue
90- emit (' input:model-value' , props . masked ? maskedValue . value : unmaskedValue .value )
94+ emit (' input:model-value' , emittedValue .value )
9195 }
9296
9397 const change = () => {
94- emit (' update:model-value' , props . masked ? maskedValue . value : unmaskedValue .value )
98+ emit (' update:model-value' , emittedValue .value )
9599 }
96100
97101 watch (
You can’t perform that action at this time.
0 commit comments