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