Let’s take a look at the problem I encountered, and follow the steps of the official website to use paging, but the following paging components are displayed in English, and the entire system is in Chinese. If English appears, it is not allowed to have this problem of inconsistency in the theme according to the development requirements: the
official website also gives Solution: https://element.eleme.cn/#/zh-CN/component/i18n
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN'
// en是英文 zh-CN是中文
import App from './App'
import store from './store'
import router from './router'
Vue.use(ElementUI, {
locale })
// 全局引用 locale
Vue.config.productionTip = false
new Vue({
el: '#app',
router,
components: {
Power
},
render: h => h(App)
})
Now run the code: the
text has been converted successfully!