Bug:A page routes to page B, the removal of the "scroll bar drop down to the bottom to load more" event does not take effect, and the interface of page An is still being requested from the bottom of the B page scroll bar. The
code is as follows:
methods: {
//B
goCommodityDetails(e){
window.removeEventListener("scroll", this.addEventScrollTop ,true)
this.$router.push({
path: "/commodityDetails",
query: {
t: Math.random(),
id: e.id
}
});
},
},
created () {
window.addEventListener("scroll", this.addEventScrollTop ,true)
},
mounted () {
},
updated() {
},
destroyed(){
window.removeEventListener("scroll", this.addEventScrollTop ,true)
}