File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 129129 watch: {
130130 initialIndex (newIndex ) {
131131 if (newIndex !== this .currentPageIndex ) {
132- this .slide && this . slide . goToPage (newIndex)
132+ this ._goToPage (newIndex)
133133 }
134134 }
135135 },
208208
209209 this .slide .on (' scrollEnd' , this ._onScrollEnd )
210210
211- this .slide . goToPage (this .currentPageIndex , 0 , 0 )
211+ this ._goToPage (this .currentPageIndex , 0 )
212212
213213 /* dispatch scroll position constantly */
214214 if (this .options .listenScroll && this .options .probeType === 3 ) {
281281 }
282282 this ._refresh ()
283283 }, 60 )
284+ },
285+ _goToPage (index , time ) {
286+ if (this .direction === DIRECTION_H ) {
287+ this .slide && this .slide .goToPage (index, 0 , time)
288+ } else if (this .direction === DIRECTION_V ) {
289+ this .slide && this .slide .goToPage (0 , index, time)
290+ }
284291 }
285292 },
286293 mounted () {
You can’t perform that action at this time.
0 commit comments