File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export default {
35
35
searchTimer: null ,
36
36
loading: true ,
37
37
timer: null ,
38
+ isScrolled: false ,
38
39
};
39
40
},
40
41
async mounted () {
@@ -98,8 +99,8 @@ export default {
98
99
next ();
99
100
},
100
101
updated () {
101
- this .$nextTick (function () {
102
- if (this .scrollOffset .length === 32 ) {
102
+ this .$nextTick (() => {
103
+ if (this .scrollOffset .length === 32 && ! this . isScrolled ) {
103
104
setTimeout (() => {
104
105
VueScrollTo .scrollTo (` [data-uuid="${ this .scrollOffset } "]` , 500 , {
105
106
duration: 500 ,
@@ -109,6 +110,7 @@ export default {
109
110
});
110
111
}, 100 );
111
112
}
113
+ this .isScrolled = true ;
112
114
});
113
115
},
114
116
beforeRouteEnter (to , from , next ) {
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export const store = new Vuex.Store({
32
32
players : { } ,
33
33
playerList : [ ] ,
34
34
scrollOffset : '' ,
35
+ keyword : '' ,
35
36
} ,
36
37
mutations : {
37
38
setInfo ( state , payload ) {
You can’t perform that action at this time.
0 commit comments