Merge pull request #230 from first19326/dev

fix: 修复了播放器未加载完成或加载失败时,键盘控制事件仍旧生效的问题
This commit is contained in:
底层用户 2024-01-03 13:48:13 +08:00 committed by GitHub
commit c068f676d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

View File

@ -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",

View File

@ -6,8 +6,8 @@ settings:
dependencies:
'@worstone/vue-aplayer':
specifier: ^1.0.4
version: 1.0.4
specifier: ^1.0.6
version: 1.0.6
aplayer:
specifier: ^1.10.1
version: 1.10.1
@ -1899,8 +1899,8 @@ packages:
- vue
dev: false
/@worstone/vue-aplayer@1.0.4:
resolution: {integrity: sha512-74zJaAsuNa20TjmDI4cpsk38vmP3v+mW+uTj5AhGjikzIEkPmVcHg+cNrX8G6ar7m8I+p4li/VRF0Ufu6JPJ5w==}
/@worstone/vue-aplayer@1.0.6:
resolution: {integrity: sha512-si0ShhO9xuENpFQdpJqKEWy3NR1Lt0r+T88u/gwZVw3b15CUizhrWpn8QdM08Ele+7FFkegsd2YDyANYhGtR6A==}
dependencies:
smoothscroll: 0.4.0
vue: 3.4.3

View File

@ -119,6 +119,9 @@ const changeMusicIndex = (type) => {
onMounted(() => {
//
window.addEventListener("keydown", (e) => {
if (!store.musicIsOk) {
return ;
}
if (e.code == "Space") {
changePlayState();
}