case-data/main.js
zoujiandong a31fc3c1e6 6.13
2025-06-13 19:09:30 +08:00

38 lines
754 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 navTo from './utils/navTo'
import uviewPlus, { setConfig } from 'uview-plus'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
app.use(uviewPlus, () => {
return {
options: {
// 修改$u.config对象的属性
config: {
// 修改默认单位为rpx相当于执行 uni.$u.config.unit = 'rpx'
unit: 'rpx'
}
}
}
})
console.log(uni.$u.config.v);
app.config.globalProperties.$navTo = navTo
return {
app
}
}
// #endif