main.uts 518 字节
Newer Older
1 2 3 4
// 仅测试 console.log 时机问题
import './test-main-console.uts'

import App from './App.uvue'
DCloud-WZF's avatar
DCloud-WZF 已提交
5

6
import { createSSRApp } from 'vue'
DCloud-WZF's avatar
DCloud-WZF 已提交
7 8
export function createApp() {
  const app = createSSRApp(App)
9 10 11
  app.config.errorHandler = (err, vm, info) => {
    console.log(err, vm, info)
  }
Q
qiang 已提交
12 13
  app.mixin({
    onReady() {
DCloud-WZF's avatar
DCloud-WZF 已提交
14
      // #ifdef APP-ANDROID
Q
qiang 已提交
15 16 17
      setTimeout(() => {
        console.log((this as BasePage).$nativePage!.getDomJson())
      }, 100)
DCloud-WZF's avatar
DCloud-WZF 已提交
18
      // #endif
Q
qiang 已提交
19 20
    }
  })
DCloud-WZF's avatar
DCloud-WZF 已提交
21 22 23
  return {
    app
  }
DCloud-WZF's avatar
DCloud-WZF 已提交
24
}