add:国际化
This commit is contained in:
@@ -19,6 +19,7 @@ import './assets/styles/element-variables.scss'
|
|||||||
// global css
|
// global css
|
||||||
import './assets/styles/index.scss'
|
import './assets/styles/index.scss'
|
||||||
// add-xy start
|
// add-xy start
|
||||||
|
import i18n from './i18n'
|
||||||
import { fetchMessages } from '@/api/i18n' // 有一个API模块来获取语言文件
|
import { fetchMessages } from '@/api/i18n' // 有一个API模块来获取语言文件
|
||||||
// 当前语言,可以从本地存储、用户设置或URL参数中获取
|
// 当前语言,可以从本地存储、用户设置或URL参数中获取
|
||||||
const currentLocale = localStorage.getItem('lang')
|
const currentLocale = localStorage.getItem('lang')
|
||||||
@@ -82,6 +83,7 @@ Vue.config.productionTip = false
|
|||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
router,
|
router,
|
||||||
|
i18n,
|
||||||
store,
|
store,
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user