| 123456789101112131415161718192021222324252627282930313233343536373839 |
- import App from './App'
- import store from './store'
- import global from './utils/global.js'
- import IndexedDB from '@/utils/IndexedDB'
- // #ifndef VUE3
- import Vue from 'vue'
- import './uni.promisify.adaptor'
- Vue.config.productionTip = false
- App.mpType = 'app'
- // 挂载为全局方法
- Vue.prototype.$store = store
- Vue.prototype.$global = global
- Vue.prototype.$dbHelper = IndexedDB
- const app = new Vue({
- ...App
- })
- app.$mount()
- // #endif
- // #ifdef VUE3
- import {
- createSSRApp
- } from 'vue'
- export function createApp() {
- const app = createSSRApp(App)
- app.config.globalProperties.$store = store
- app.config.globalProperties.$global = global
- app.config.globalProperties.$dbHelper = IndexedDB
- return {
- app
- }
- }
- // #endif
|