vueマウススクロールイベントスクロール方向

936 ワード

 @wheel.prevent="scrollBarWheel"

 
scrollBarWheel(e) {
                if (this.synchronizationVar === 1) {
                    e = e || window.event;
                    if (e.wheelDelta) {  //     IE,      
                        if (e.wheelDelta > 0) { //        
                            console.log('    ')
                        }
                        if (e.wheelDelta < 0) {
                            console.log('    ')
                        }
                    } else if (e.detail) {  //Firefox    
                        if (e.detail > 0) { //        
                            console.log('    ')
                        }
                        if (e.detail < 0) {
                            console.log('    ')
                        }
                    }
                }
            },