purchase-let/main.js

29 lines
610 B
JavaScript
Raw Permalink Normal View History

2024-04-25 18:02:30 +08:00
import App from './App'
import uviewPlus from '@/uni_modules/uview-plus'
// #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
// #ifdef VUE3
import { createSSRApp } from 'vue'
//导入pinia
import * as Pinia from 'pinia'
export function createApp() {
const app = createSSRApp(App)
// 创建Pinia实例 // 将pinia实例挂载到vue实例上
app.use(Pinia.createPinia());
2024-05-20 15:43:48 +08:00
app.use(uviewPlus);
2024-04-25 18:02:30 +08:00
return {
app,
Pinia, // 此处必须将 Pinia 返回
}
}
// #endif