Update Slider.vue

The event.preventDefault() method has been removed.

The touch event uses the .passive modifier, and also uses the preventDefault method. On mobile devices, the browser will report an error.

The official documentation for Vue.js is as follows:

https://vuejs.org/guide/essentials/event-handling.html#event-modifiers

Do not use .passive and .prevent together, because .passive already indicates to the browser that you do not intend to prevent the event's default behavior, and you will likely see a warning from the browser if you do so.
pull/6537/head
caryhuang 2024-10-08 09:16:38 +08:00 committed by GitHub
parent ad8ccb95ed
commit 5e1acab801
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 2 deletions

View File

@ -155,12 +155,10 @@ export default {
}
event.currentTarget.focus();
event.preventDefault();
},
onDrag(event) {
if (this.dragging) {
this.setValue(event);
event.preventDefault();
}
},
onDragEnd(event) {