|
@@ -1,22 +1,18 @@
|
|
|
import App from './App'
|
|
|
+import { createSSRApp } from 'vue'
|
|
|
+import setupPinia from './store/init'
|
|
|
|
|
|
-// #ifndef VUE3
|
|
|
-import Vue from 'vue'
|
|
|
-import './uni.promisify.adaptor'
|
|
|
-Vue.config.productionTip = false
|
|
|
-App.mpType = 'app'
|
|
|
-const app = new Vue({
|
|
|
- ...App
|
|
|
-})
|
|
|
-app.$mount()
|
|
|
-// #endif
|
|
|
+import 'uno.css'
|
|
|
+
|
|
|
+//挂载全局
|
|
|
+import {setupComponents} from './components/index'
|
|
|
|
|
|
-// #ifdef VUE3
|
|
|
-import { createSSRApp } from 'vue'
|
|
|
export function createApp() {
|
|
|
- const app = createSSRApp(App)
|
|
|
- return {
|
|
|
- app
|
|
|
- }
|
|
|
+ const app = createSSRApp(App)
|
|
|
+ // 挂载状态管理
|
|
|
+ app.use(setupPinia)
|
|
|
+ // 组件注册全局
|
|
|
+ setupComponents(app);
|
|
|
+
|
|
|
+ return {app}
|
|
|
}
|
|
|
-// #endif
|