iframe嵌套页面没有办法获取浏览器滚动条,就监听嵌入页面DIV的滚动
<div id="app" @scroll="handleScroll">
<div>
methods:{
handleScroll(){
let appScroll = document.getElementById("app");
console.log(appScroll.scrollTop)
this.$store.commit('SETSCROLLTOP',appScroll.scrollTop)
}
iframe嵌套页面没有办法获取浏览器滚动条,就监听嵌入页面DIV的滚动
<div id="app" @scroll="handleScroll">
<div>
methods:{
handleScroll(){
let appScroll = document.getElementById("app");
console.log(appScroll.scrollTop)
this.$store.commit('SETSCROLLTOP',appScroll.scrollTop)
}