vue下面addEventListener触发filters

vue下面addEventListener为什么会触发filters

 filters: {
   isConcealPone: publi.isConcealPone 
 },
 mounted() {
   window.addEventListener("scroll" || "touchmove", this.canScroll, false);
 },

methods: {

canScroll() {
  let getScrollY =
    document.documentElement.scrollTop || document.body.scrollTop;
  if (getScrollY > 30) {
    this.bgColor = "#fff";
    this.textColor = "#333";
  } else {
    this.bgColor = "";
    this.textColor = "#fff";
  }
}

}

评论

暂无评论