mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-18 11:37:31 +08:00
异步组件 优化首屏加载速度
This commit is contained in:
@@ -14,10 +14,15 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import RecommendSinger from "@/components/RecommendSinger.vue";
|
||||
import PlaylistType from "@/components/PlaylistType.vue";
|
||||
import RecommendSonglist from "@/components/RecommendSonglist.vue";
|
||||
import RecommendAlbum from "@/components/RecommendAlbum.vue";
|
||||
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"));
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user