-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.js
49 lines (34 loc) · 971 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
import './permission' // permission
import messages from './locale/index'
import { getDicts } from "@/api/system/dict/data";
import { getNameOpen,getName } from "@/api/iotos/connect/channel";
// 挂在全局自定义的tarbar
import tabBar from '@/components/tabbar/myTabbar.vue';
Vue.component('tabbar',tabBar) //挂载
import VueI18n from 'vue-i18n'
let i18nConfig = {
locale: uni.getLocale(),
messages
}
// 全局方法挂载
Vue.prototype.getDicts = getDicts
Vue.prototype.getNameOpen = getNameOpen
Vue.prototype.getName = getName
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
// 引入全局 uview 框架
import uView from 'uni_modules/uview-ui'
Vue.use(uView)
Vue.use(plugins)
Vue.config.productionTip = false
Vue.prototype.$store = store
App.mpType = 'app'
const app = new Vue({
i18n,
...App
})
app.$mount()