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({
83
83
const unmaskedValue = ref (' ' as Input | undefined )
84
84
const config = computed (() => ({ ... props }))
85
85
86
+ const emittedValue = computed (() => {
87
+ return props .masked ? maskedValue .value : unmaskedValue .value
88
+ })
89
+
86
90
const input = (event : Event ) => {
87
91
const { target } = event as CustomInputEvent
88
92
maskedValue .value = target .value
89
93
unmaskedValue .value = target .unmaskedValue
90
- emit (' input:model-value' , props . masked ? maskedValue . value : unmaskedValue .value )
94
+ emit (' input:model-value' , emittedValue .value )
91
95
}
92
96
93
97
const change = () => {
94
- emit (' update:model-value' , props . masked ? maskedValue . value : unmaskedValue .value )
98
+ emit (' update:model-value' , emittedValue .value )
95
99
}
96
100
97
101
watch (
You can’t perform that action at this time.
0 commit comments