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