mirror of
https://github.com/imsyy/home.git
synced 2024-11-16 03:32:17 +08:00
fix: 修复了播放器未加载完成或加载失败时,键盘控制事件仍旧生效的问题
This commit is contained in:
parent
f016348b97
commit
27780c6558
|
@ -119,6 +119,9 @@ const changeMusicIndex = (type) => {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 空格键事件
|
// 空格键事件
|
||||||
window.addEventListener("keydown", (e) => {
|
window.addEventListener("keydown", (e) => {
|
||||||
|
if (!store.musicIsOk) {
|
||||||
|
return ;
|
||||||
|
}
|
||||||
if (e.code == "Space") {
|
if (e.code == "Space") {
|
||||||
changePlayState();
|
changePlayState();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user