ow
This commit is contained in:
1 parent
1404640f16
commit
2bbf016cbf
167 files changed
+18941
-589
No files matched your search
@@ -0,0 +1,43 @@
|
||||
import { createApp } from "vue";
|
||||
|
||||
import App from "./App.vue";
|
||||
|
||||
import { setupStore } from "./store";
|
||||
//使用了Top await
|
||||
import { setupRouter } from "./router";
|
||||
|
||||
import {
|
||||
setupAntd,
|
||||
setupAssets,
|
||||
setupCustomComponents,
|
||||
setupVueVideoPlayer,
|
||||
setupVuePhoto,
|
||||
} from "./plugins";
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
function setupPlugins() {
|
||||
// 注册全局常用的ant-design-vue组件
|
||||
setupAntd(app);
|
||||
// 注册全局常用的VueVideoPlayer组件
|
||||
setupVueVideoPlayer(app);
|
||||
// 注册全局常用的VuePhoto组件
|
||||
setupVuePhoto(app);
|
||||
// 引入静态资源
|
||||
setupAssets();
|
||||
// 注册全局自定义组件,如:<svg-icon />
|
||||
setupCustomComponents(app);
|
||||
}
|
||||
|
||||
async function setupApp() {
|
||||
// 挂载pinia状态管理
|
||||
setupStore(app);
|
||||
// 挂载路由
|
||||
await setupRouter(app);
|
||||
|
||||
app.mount("#app");
|
||||
}
|
||||
|
||||
setupPlugins();
|
||||
|
||||
setupApp();
|
||||
Reference in new issue
Block a user