Commit f436acd5 authored by 郭志伟's avatar 郭志伟

"docs: isFirstRoll补丁注释"

parent 2092a104
This diff is collapsed.
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
videoPause: false, videoPause: false,
showPopup: false, showPopup: false,
videoLoading: true, videoLoading: true,
isFirstRole: true isFirstRoll: true // 是否是首次加载。_last设置为1时,会出现首次加载的第二个视频不自动播放,设置为其他的值时会出现后续乱序的问题。此处为补丁
}, },
watch: { watch: {
videoList (list) { videoList (list) {
...@@ -145,12 +145,12 @@ ...@@ -145,12 +145,12 @@
// 一次最多只展示3个video标签,提高加载视频的速度 // 一次最多只展示3个video标签,提高加载视频的速度
const current = e.$wx.detail.current; const current = e.$wx.detail.current;
const diff = current - _last; const diff = current - _last;
if (this.isFirstRole && current === 1) { if (this.isFirstRoll && current === 1) {
this.playCurrent(1); this.playCurrent(1);
this.isFirstRole = false; this.isFirstRoll = false;
} }
if (diff === 0) return; if (diff === 0) return;
this.isFirstRole = false; this.isFirstRoll = false;
this._last = current; this._last = current;
this.playCurrent(current); this.playCurrent(current);
// 如果上滑的时候,当前滑动到第0元素,那么被划走,放入prevQueue是第一个元素,这个要自己画图才会更理解 // 如果上滑的时候,当前滑动到第0元素,那么被划走,放入prevQueue是第一个元素,这个要自己画图才会更理解
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment