mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [number-input] cannot scroll the container when the mouse pointer over an input (#15211)
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user