When we use vue-admin-templete for secondary development, we will find that some are in English, such as the size of each page in the pagination.

Project scenario:

When we use vue-admin-templete for secondary development, we will find that some are in English, such as the size of each page in the pagination.


Problem Description

The situation looks like this:

insert image description here


Cause Analysis:

This is because when we use vue-admin-templete, we are main.jsusing the English package of the Element-UI component library.

import locale from 'element-ui/lib/locale/lang/en' // lang i18n


solution:

Just change the English package to Chinese package.

import 'element-ui/lib/theme-chalk/index.css'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n

insert image description here

Guess you like

Origin blog.csdn.net/qq_51602285/article/details/129468146