import App from './App'

// #ifndef VUE3
import Vue from 'vue'

import './uni.promisify.adaptor'

Vue.config.productionTip = false

App.mpType = 'app'

import store from '@/store/store'
import i18n from './locale/index.js'

import './config'
import './utils/index.js'

import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);

uni.$uv.setConfig({
	// 修改$uv.config对象的属性
	config: {
		// 修改默认单位为rpx，相当于执行 uni.$uv.config.unit = 'rpx'
		unit: 'rpx'
	},
})

//组件注册
import configPopup from '@/components/config/configPopup.vue'
import changeLanguage from '@/components/base/changeLanguage.vue'
import navbar from '@/components/base/navbar.vue'

Vue.component('configPopup', configPopup)
Vue.component('changeLanguage', changeLanguage)
Vue.component('navbar', navbar)

const app = new Vue({
	...App,
	store,
	i18n
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif