Browse Source

新建团 不置顶BUG

1
mo 4 years ago
parent
commit
ad2b910af4

+ 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 ||