(1)scroll没有事件冒泡
!Vue.prototype.$isServer && on(document, 'mouseup', e => {
console.log('1')
});
!Vue.prototype.$isServer && on(document, 'scroll', e => {
console.log('2')
});
点击事件,在document上监听,但可以获取任意元素
滚动事件,在document上监听,只能从document上触发
(1)scroll没有事件冒泡
!Vue.prototype.$isServer && on(document, 'mouseup', e => {
console.log('1')
});
!Vue.prototype.$isServer && on(document, 'scroll', e => {
console.log('2')
});
点击事件,在document上监听,但可以获取任意元素
滚动事件,在document上监听,只能从document上触发