FIX Firefox 标签滚动事件&滚动顺序

This commit is contained in:
sc 2021-07-13 16:06:45 +08:00
parent 6694010b06
commit b187e17bee
1 changed files with 3 additions and 2 deletions

View File

@ -197,13 +197,14 @@
//
scrollInit(){
const scrollDiv = this.$refs.tags;
scrollDiv.addEventListener('mousewheel', handler, false)
scrollDiv.addEventListener('mousewheel', handler, false) || scrollDiv.addEventListener("DOMMouseScroll", handler, false)
function handler(event) {
const detail = event.wheelDelta || event.detail;
//-3 3120 -120
const moveForwardStep = 1;
const moveBackStep = -1;
let step = 0;
if (detail < 0) {
if (detail == 3 || detail < 0 && detail != -3) {
step = moveForwardStep * 50;
}else{
step = moveBackStep * 50;