Merge pull request #285 from MrWillCom/issue-280

Fix ev.target.children.forEach is not a function (#280)
This commit is contained in:
qier222 2021-02-14 13:15:02 +08:00 committed by GitHub
commit a75c039a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -276,7 +276,9 @@ export default {
this.$parent.$refs.player.player.seek(value); this.$parent.$refs.player.player.seek(value);
}, },
blurEffect(ev) { blurEffect(ev) {
ev.target.children.forEach((el) => { for (let i = 0; i < ev.target.children.length; i++) {
const el = ev.target.children[i];
const distanceToCenterPercentage = const distanceToCenterPercentage =
Math.abs( Math.abs(
el.getBoundingClientRect().y + el.getBoundingClientRect().y +
@ -290,7 +292,7 @@ export default {
"--func-val", "--func-val",
isNaN(functionedEffectValue) ? "" : functionedEffectValue.toFixed(2) isNaN(functionedEffectValue) ? "" : functionedEffectValue.toFixed(2)
); );
}); }
}, },
setLyricsInterval() { setLyricsInterval() {
this.lyricsInterval = setInterval(() => { this.lyricsInterval = setInterval(() => {