// #ifndef VUE3
|
import Vue from 'vue'
|
import App from './App'
|
import store from './store'
|
Vue.prototype.$store = store
|
import httpCommon from './plugins/http-common'
|
Vue.prototype.$https = httpCommon
|
import message from './plugins/message'
|
Vue.prototype.$message = message
|
import http from './plugins/http.js'
|
Vue.prototype.$http = http
|
import storage from './plugins/storage'
|
Vue.prototype.$storage = storage
|
import util from './plugins/util'
|
Vue.prototype.$util = util
|
import self_base from './common/self_base.js'
|
Vue.use(self_base);
|
import mixinsCommon from './mixin/mixin.js'
|
|
Vue.mixin(mixinsCommon)
|
|
// main.js
|
import uView from 'uview-ui'
|
Vue.use(uView)
|
|
// 调用setConfig方法,方法内部会进行对象属性深度合并,可以放心嵌套配置
|
// 需要在Vue.use(uView)之后执行
|
uni.$u.setConfig({
|
// 修改$u.config对象的属性
|
config: {
|
// 修改默认单位为rpx,相当于执行 uni.$u.config.unit = 'rpx'
|
unit: 'rpx'
|
},
|
// 修改$u.props对象的属性
|
props: {
|
// 修改radio组件的size参数的默认值,相当于执行 uni.$u.props.radio.size = 30
|
radio: {
|
size: 32,
|
labelSize:32
|
},
|
picker:{
|
confirmColor:'#20613D'
|
},
|
steps:{
|
size:32,
|
fontSize:32
|
}
|
// 其他组件属性配置
|
// ......
|
}
|
})
|
|
|
|
// #ifdef PUB_CUSTOMER
|
import customerFooter from '@/components/footer/customer-footer'
|
Vue.component('common-footer', customerFooter)
|
// #endif
|
|
// #ifndef PUB_CUSTOMER
|
import supplierfooter from '@/components/footer/supplier-footer'
|
Vue.component('common-footer', supplierfooter)
|
// #endif
|
|
import nodata from '@/components/no-data'
|
Vue.component('no-data', nodata)
|
// import bfooter from '@/components/footer/bussincess-footer'
|
// Vue.component('bussincess-footer', bfooter)
|
|
import footerMsg from '@/components/footer/footer-msg'
|
Vue.component('footer-msg', footerMsg)
|
|
|
// #ifdef PUB_CUSTOMER
|
import selectItems from '@/components/common-select-items'
|
Vue.component('common-select-items', selectItems)
|
|
import addressSelect from '@/components/common-address-select/common-address-select'
|
Vue.component('common-address-select', addressSelect)
|
// #endif
|
|
import topTabs from '@/components/top-tabs.vue'
|
Vue.component('top-tabs', topTabs)
|
|
|
|
Vue.config.productionTip = false
|
|
App.mpType = 'app'
|
|
const app = new Vue({
|
...App
|
})
|
app.$mount()
|
// #endif
|
|
// #ifdef VUE3
|
import {
|
createSSRApp
|
} from 'vue'
|
import App from './App.vue'
|
export function createApp() {
|
const app = createSSRApp(App)
|
return {
|
app
|
}
|
}
|
// #endif
|