Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

播放进度条锚点位置有bug #40

Open
RybinLi opened this issue May 8, 2020 · 0 comments
Open

播放进度条锚点位置有bug #40

RybinLi opened this issue May 8, 2020 · 0 comments

Comments

@RybinLi
Copy link

RybinLi commented May 8, 2020

全屏播放器的进度条锚点图标位置有些问题,如果是使用mini播放器点击暂停时,再点击打开全屏播放器,此时进度条的progress-btn定位在初始位置,只有点击播放时,progress-btn才会再次自动移动到正确的位置。经过分析代码,主要是这里的代码导致的
文件:src/base/progress-bar/progress-bar.vue
watch: { percent (newPercent) { if (newPercent >= 0 && !this.touch.initiated) { const barWidth = this.$refs.progressBar.clientWidth - progressBtnWidth const offsetWidth = newPercent * barWidth this._offset(offsetWidth) } } }

当全屏播放器隐藏时,this.$refs.progressBar.clientWidth = 0,所以此时设置offsetWidth就变成在初始位置了。

暂时还在想办法修复,等修复完了,再回来评论。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant