🌈 style: 去除无用代码

This commit is contained in:
alger
2024-01-02 09:22:31 +08:00
parent ecd7a56df0
commit adb539fbde
4 changed files with 1 additions and 5 deletions

View File

@@ -47,7 +47,6 @@ const formatDetail = computed(() => (detail: any) => {
const handlePlay = (item: any) => {
const tracks = props.songList || []
const musicIndex = (tracks.findIndex((music: any) => music.id == item.id) || 0)
store.commit('setPlayList', tracks)
}

View File

@@ -44,7 +44,6 @@ onMounted(() => {
})
const handlePlay = (item: any) => {
const musicIndex = (recommendMusic.value?.result.findIndex((music: any) => music.id == item.id) || 0) + 1
store.commit('setPlayList', recommendMusic.value?.result)
}
</script>

View File

@@ -41,7 +41,7 @@
<SongItem :item="item" @play="handlePlay"/>
</div>
<template v-for="(list, key) in searchDetail">
<template v-if="key !== 'songs'">
<template v-if="key.toString() !== 'songs'">
<div
v-for="(item, index) in list"
:key="item.id"
@@ -139,7 +139,6 @@ const store = useStore()
const handlePlay = (item: any) => {
const tracks = searchDetail.value?.songs || []
const musicIndex = (tracks.findIndex((music: any) => music.id == item.id) || 0)
store.commit('setPlayList', tracks)
}
</script>

View File

@@ -67,7 +67,6 @@ const formatDetail = computed(() => (detail: any) => {
const handlePlay = (item: any) => {
const tracks = recordList.value || []
const musicIndex = (tracks.findIndex((music: any) => music.id == item.id) || 0)
store.commit('setPlayList', tracks)
}