Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mini-program-wepy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mini-program-wepy
Commits
f436acd5
Commit
f436acd5
authored
Jul 17, 2020
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"docs: isFirstRoll补丁注释"
parent
2092a104
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
.eslintcache
.eslintcache
+1
-1
video.wpy
src/components/custom/video.wpy
+4
-4
No files found.
.eslintcache
View file @
f436acd5
This diff is collapsed.
Click to expand it.
src/components/custom/video.wpy
View file @
f436acd5
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
videoPause: false,
videoPause: false,
showPopup: false,
showPopup: false,
videoLoading: true,
videoLoading: true,
isFirstRol
e: true
isFirstRol
l: 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.isFirstRol
e
&& current === 1) {
if (this.isFirstRol
l
&& current === 1) {
this.playCurrent(1);
this.playCurrent(1);
this.isFirstRol
e
= false;
this.isFirstRol
l
= false;
}
}
if (diff === 0) return;
if (diff === 0) return;
this.isFirstRol
e
= false;
this.isFirstRol
l
= false;
this._last = current;
this._last = current;
this.playCurrent(current);
this.playCurrent(current);
// 如果上滑的时候,当前滑动到第0元素,那么被划走,放入prevQueue是第一个元素,这个要自己画图才会更理解
// 如果上滑的时候,当前滑动到第0元素,那么被划走,放入prevQueue是第一个元素,这个要自己画图才会更理解
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment