feat: 修复搜索播放 bug 优化搜索 mv播放器

This commit is contained in:
alger
2024-12-05 21:29:13 +08:00
parent c5e7c87658
commit 5d4c4922fd
6 changed files with 43 additions and 25 deletions
+10 -2
View File
@@ -18,14 +18,15 @@
:song-list="songList"
:list-info="listInfo"
/>
<PlayVideo v-if="item.type === 'mv'" v-model:show="showPop" :title="item.name" :url="url" />
<mv-player v-if="item.type === 'mv'" v-model:show="showPop" :current-mv="getCurrentMv()" no-list />
</div>
</template>
<script setup lang="ts">
import { getAlbum, getListDetail } from '@/api/list';
import { getMvUrl } from '@/api/mv';
import MvPlayer from '@/components/MvPlayer.vue';
import { IMvItem } from '@/type/mv';
import { getImgUrl } from '@/utils';
const props = defineProps<{
@@ -45,6 +46,13 @@ const songList = ref<any[]>([]);
const showPop = ref(false);
const listInfo = ref<any>(null);
const getCurrentMv = () => {
return {
id: props.item.id,
name: props.item.name,
} as unknown as IMvItem;
};
const handleClick = async () => {
listInfo.value = null;
if (props.item.type === '专辑') {