mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
fix(components): [number-input] cannot scroll the container when the mouse pointer over an input (#15211)
This commit is contained in:
parent
73f4d0f57b
commit
9c9ebec0ea
@ -50,7 +50,7 @@
|
||||
:name="name"
|
||||
:label="label"
|
||||
:validate-event="false"
|
||||
@wheel.prevent
|
||||
@wheel="handleWheel"
|
||||
@keydown.up.prevent="increase"
|
||||
@keydown.down.prevent="decrease"
|
||||
@blur="handleBlur"
|
||||
@ -288,6 +288,10 @@ const setCurrentValueToModelValue = () => {
|
||||
data.currentValue = props.modelValue
|
||||
}
|
||||
}
|
||||
const handleWheel = (e: MouseEvent) => {
|
||||
if (document.activeElement === e.target) e.preventDefault()
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(value, oldValue) => {
|
||||
|
Loading…
Reference in New Issue
Block a user