Skip to content

Commit

Permalink
Merge pull request imsyy#230 from first19326/dev
Browse files Browse the repository at this point in the history
fix: 修复了播放器未加载完成或加载失败时,键盘控制事件仍旧生效的问题
  • Loading branch information
imsyy committed Jan 3, 2024
2 parents f016348 + c94b230 commit c068f67
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.vue --fix"
},
"dependencies": {
"@worstone/vue-aplayer": "^1.0.4",
"@worstone/vue-aplayer": "^1.0.6",
"aplayer": "^1.10.1",
"axios": "^1.6.3",
"element-plus": "^2.4.4",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/components/Music.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ const changeMusicIndex = (type) => {
onMounted(() => {
// 空格键事件
window.addEventListener("keydown", (e) => {
if (!store.musicIsOk) {
return ;
}
if (e.code == "Space") {
changePlayState();
}
Expand Down

0 comments on commit c068f67

Please sign in to comment.