重新设计组件结构

This commit is contained in:
zyronon
2023-09-06 18:34:23 +08:00
parent 4310cbe95a
commit 1606d58a04
10 changed files with 406 additions and 114 deletions

View File

@@ -19,7 +19,7 @@ export function useSound(srcList?: string[], num?: number) {
})
let index = $ref(0)
const play = () => {
const play: Function = () => {
index++
if (audioList.length > 1 && audioList.length !== audioLength) {
audioList[index % audioList.length].play()