Files
template-MP/main.js

34 lines
920 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import App from './App'
import uviewPlus from '/uview-plus'
import globalMixin from './mixins/global'
import store from './store'
import tool from './common/utils/tool'
import { createSSRApp } from 'vue'
import './uni.promisify.adaptor'
uni.$zp = {
config: {
'empty-view-text': '空空如也~~',
'refresher-enabled': true,
},
}
export function createApp() {
const app = createSSRApp(App)
app.use(uviewPlus)
app.use(globalMixin)
app.use(store)
// 初始化全局错误监控
// 注意只有在生产环境下才会启用错误监控和WebHook上报
// 开发环境和体验版会自动禁用错误监控
tool.initErrorMonitor({
enableGlobalError: true,
enablePromiseError: true,
enableConsoleError: false, // 可选开启console错误监控
// forceEnable: true, // 如需强制启用,可取消注释此行
})
return { app }
}