You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/main.js

35 lines
1.2 KiB

5 months ago
import App from './App'
import { createSSRApp } from 'vue'
import store from './store'
import bootstrap from './core/bootstrap'
import mixin from './core/mixins/app'
import uView from './uni_modules/vk-uview-ui'
import { navTo, showToast, showSuccess, showError, getShareUrlParams, checkModuleKey, checkModules } from './core/app'
import Config from '@/core/config'
import addShuiyin from './components/add-shuiyin';
const picUrl = Config.get('picUrl')
// 不能修改createApp方法名,不能修改从Vue中导入的createSSRApp
export function createApp() {
// 创建应用实例
const app = createSSRApp({ ...App, store, created: bootstrap })
app.component('addShuiyin',addShuiyin)
// 挂载全局函数
app.config.globalProperties.$toast = showToast
app.config.globalProperties.$success = showSuccess
app.config.globalProperties.$error = showError
app.config.globalProperties.$navTo = navTo
app.config.globalProperties.$getShareUrlParams = getShareUrlParams
app.config.globalProperties.$checkModule = checkModuleKey
app.config.globalProperties.$checkModules = checkModules
app.config.globalProperties.$picUrl = picUrl
// 使用 uView UI
app.use(uView)
// 全局mixin
app.mixin(mixin)
return { app }
}