mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
fix: scrolling wheel cannot horizontally scroll
This commit is contained in:
@@ -5,7 +5,7 @@ const scrollListWrap = ref<HTMLElement>() as Ref<HTMLElement>
|
||||
const showLeftMask = ref<boolean>(false)
|
||||
const showRightMask = ref<boolean>(false)
|
||||
|
||||
window.onload = () => {
|
||||
onMounted(() => {
|
||||
scrollListWrap.value.addEventListener('scroll', () => {
|
||||
if (scrollListWrap.value.scrollLeft > 0) {
|
||||
showLeftMask.value = true
|
||||
@@ -28,7 +28,7 @@ window.onload = () => {
|
||||
event.preventDefault()
|
||||
scrollListWrap.value.scrollLeft += event.deltaY
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user