mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-24 08:07:23 +08:00
异步组件 优化首屏加载速度
This commit is contained in:
@@ -30,7 +30,13 @@
|
||||
import type { SongResult } from '@/type/music';
|
||||
import { computed } from 'vue';
|
||||
import { useStore } from 'vuex';
|
||||
import { AppMenu, PlayBar, SearchBar } from './components';
|
||||
// import { AppMenu, PlayBar, SearchBar } from './components';
|
||||
import {defineAsyncComponent} from 'vue';
|
||||
const AppMenu = defineAsyncComponent(() => import('./components/AppMenu.vue'));
|
||||
const PlayBar = defineAsyncComponent(() => import('./components/PlayBar.vue'));
|
||||
const SearchBar = defineAsyncComponent(() => import('./components/SearchBar.vue'));
|
||||
|
||||
|
||||
|
||||
const store = useStore();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user