main.uts 761 字节
Newer Older
M
mehaotian 已提交
1 2
// 仅测试 console.log 时机问题
import './test-main-console.uts'
3 4 5
// #ifdef APP-ANDROID || APP-IOS || WEB
import { uniStat } from '@/uni_modules/uni-stat/plugin.uts'
// #endif
M
mehaotian 已提交
6
import App from './App.uvue'
DCloud-WZF's avatar
DCloud-WZF 已提交
7

M
mehaotian 已提交
8 9
import { createSSRApp } from 'vue'

10
// 统计配置
M
mehaotian 已提交
11
const uniStatCollectItems = {
12 13
	uniStatPageLog: true
}
M
mehaotian 已提交
14

15 16
const uniStatOptions = {
	debug: true,
M
mehaotian 已提交
17
	collectItems: uniStatCollectItems,
18
}
DCloud-WZF's avatar
DCloud-WZF 已提交
19 20

export function createApp() {
M
mehaotian 已提交
21
  const app = createSSRApp(App)
22 23 24
  // #ifdef APP-ANDROID || APP-IOS || WEB
  app.use(uniStat, uniStatOptions)
  // #endif
Q
qiang 已提交
25 26 27 28 29 30 31
  // app.mixin({
  //   onReady() {
  //     setTimeout(() => {
  //       console.log((this as BasePage).$nativePage!.getDomJson())
  //     }, 100)
  //   }
  // })
DCloud-WZF's avatar
DCloud-WZF 已提交
32 33 34
  return {
    app
  }
DCloud-WZF's avatar
DCloud-WZF 已提交
35
}