فهرست منبع

新建团 不置顶BUG

1
mo 4 سال پیش
والد
کامیت
ad2b910af4
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

+ 3 - 1
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -137,8 +137,8 @@ export default {
   mounted() {
     if (this.$route.query.id) {
       this.teamid = this.$route.query.id;
-      window.addEventListener("scroll", this.getScroll);
     }
+      window.addEventListener("scroll", this.getScroll);
     this.init();
   },
   deactivated() {
@@ -149,6 +149,7 @@ export default {
       `${this.teamid}sound`,
       JSON.stringify(this.activeSoundList)
     );
+     window.removeEventListener("scroll", this.getScroll);
   },
   activated() {
     if (
@@ -621,6 +622,7 @@ export default {
       return obj;
     },
     getScroll() {
+
       this.scrollTop =
         window.pageYOffset ||
         document.documentElement.scrollTop ||