mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-17 21:32:51 +08:00
fix(components): [input] @change
event value formatter (#20000)
* fix: change事件值没有被格式化 fix: change事件值没有被格式化 * Update packages/components/input/src/input.vue --------- Co-authored-by: btea <2356281422@qq.com>
This commit is contained in:
@ -417,7 +417,12 @@ const handleInput = async (event: Event) => {
|
||||
}
|
||||
|
||||
const handleChange = (event: Event) => {
|
||||
emit('change', (event.target as TargetElement).value)
|
||||
let { value } = event.target as TargetElement
|
||||
|
||||
if (props.formatter && props.parser) {
|
||||
value = props.parser(value)
|
||||
}
|
||||
emit('change', value)
|
||||
}
|
||||
|
||||
const {
|
||||
|
Reference in New Issue
Block a user