🦄 refactor(lrc): 重构歌词展示逻辑 优化样式

This commit is contained in:
algerkong
2023-12-17 14:48:21 +08:00
parent 9ff0b50b8d
commit 480c5510fa
6 changed files with 345 additions and 423 deletions
-25
View File
@@ -15,35 +15,10 @@
<script lang="ts" setup>
import { defineAsyncComponent } from 'vue';
// import RecommendSinger from "@/components/RecommendSinger.vue";
// import PlaylistType from "@/components/PlaylistType.vue";
// import RecommendSonglist from "@/components/RecommendSonglist.vue";
// import RecommendAlbum from "@/components/RecommendAlbum.vue";
const RecommendSinger = defineAsyncComponent(() => import("@/components/RecommendSinger.vue"));
const PlaylistType = defineAsyncComponent(() => import("@/components/PlaylistType.vue"));
const RecommendSonglist = defineAsyncComponent(() => import("@/components/RecommendSonglist.vue"));
const RecommendAlbum = defineAsyncComponent(() => import("@/components/RecommendAlbum.vue"));
/*
异步组件的定义方式
const asyncComponents = defineAsyncComponent({
// 异步组件的路径
loader: () => import("@/components/RecommendSinger.vue"),
// 异步组件的占位
loadingComponent:aaa,
// 异步组件的错误
errorComponent:bbb,
// 在显示loading组件之前,等待多长时间
delay:1000,
// 监听错误
// error 错误信息 retry 再次请求 attempts 当前重试次数
onError:(err,retry,attempts)=>{
console.log("错误")
}
})
*/
</script>
<style lang="scss" scoped>