项目初始化
This commit is contained in:
35
RuoYi-App-master/main.js
Normal file
35
RuoYi-App-master/main.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import store from './store' // store
|
||||
import plugins from './plugins' // plugins
|
||||
import VueI18n from 'vue-i18n'
|
||||
import './permission' // permission
|
||||
|
||||
// 引入语言包
|
||||
import enUS from './locales/en-US.json'
|
||||
import zhCN from './locales/zh-CN.json'
|
||||
|
||||
Vue.use(plugins)
|
||||
Vue.use(VueI18n)
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$store = store
|
||||
|
||||
// 创建i18n实例
|
||||
const i18n = new VueI18n({
|
||||
locale: uni.getStorageSync('language') || 'zh-CN', // 默认语言
|
||||
messages: {
|
||||
'en-US': enUS,
|
||||
'zh-CN': zhCN
|
||||
}
|
||||
})
|
||||
|
||||
Vue.prototype._i18n = i18n
|
||||
|
||||
App.mpType = 'app'
|
||||
|
||||
const app = new Vue({
|
||||
i18n,
|
||||
...App
|
||||
})
|
||||
|
||||
app.$mount()
|
||||
Reference in New Issue
Block a user