import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import '.env.js'
import './uni.promisify.adaptor'
import uView from 'uview-ui'
import VueI18n from 'vue-i18n'
import messages from './assets/lang/index.js'
import store from './store' //store相关
import { formaterUpcase } from "./assets/utils/index.js"
// import Vue from 'vue';
import ElementUI from 'element-ui';
import vant from "vant"
import locale from 'element-ui/lib/locale/lang/en'
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI, {
    size: 'medium' ,// set element-ui default size
    locale
})
Vue.use(VueI18n)
Vue.use(vant)
// 创建实例
const i18n = new VueI18n({
    locale: "zh-Hans",
	messages,
	silentFallbackWarn:true
});
// console.log = (function (fn) {
//     return function () {
//         // 关闭日志
//         //fn("开启日志",...arguments);
//     }
// })(console.log)
Vue.use(uView)
uni.$u.config.unit = 'rpx'
Vue.prototype.$store = store
Vue.prototype.$formaterUpcase = formaterUpcase
require('./api/config.js')
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	i18n,
	store,
  ...App
})
app.$mount()
// #endif

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