Element-ui plug-in pagination pagination Chinese and English language switching

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
Insert picture description here
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
Insert picture description here
text has been converted successfully!

Guess you like

Origin blog.csdn.net/qq_44469200/article/details/108221954