PLATINE drag to play & random tracks
This commit is contained in:
@@ -57,6 +57,12 @@ export const useDataStore = defineStore('data', {
|
||||
if (box) {
|
||||
box.activeSide = side
|
||||
}
|
||||
},
|
||||
|
||||
getRandomPlaylistTrack() {
|
||||
if (this.tracks.length === 0) return null
|
||||
const randomIndex = Math.floor(Math.random() * this.tracks.length)
|
||||
return this.tracks[randomIndex]
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user