fix: 🐛 修复InputNumber的change事件无法取到当前绑定值的更新的问题

修改@change逻辑,应该先传值,再触发change,这样新的值可以被@change事件取到
This commit is contained in:
Creat55 2024-04-23 20:21:21 +08:00 committed by GitHub
parent 0456596975
commit 45980c526a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,8 +169,8 @@ function handleBlur() {
function dispatchChangeEvent(value: string | number, change: boolean = true) { function dispatchChangeEvent(value: string | number, change: boolean = true) {
inputValue.value = value inputValue.value = value
change && emit('change', { value })
change && emit('update:modelValue', inputValue.value) change && emit('update:modelValue', inputValue.value)
change && emit('change', { value })
} }
function formatValue(value: string | number) { function formatValue(value: string | number) {