How to set the Element-UI paging component to Chinese

preface

Today WHEN I was writing a project, I noticed that the pagination component using the Element-UI component displayed in English instead of Chinese:But what I saw on the official website was in Chinese, and I also wanted the page component to be displayed in Chinese, so I looked at the instructions on the official website and figured out why it was not displayed in Chinese.

The solution

The original Element component used to use Chinese by default, but I added this line of code to use it:Let’s see what the official website says:The pagination component is displayed in English because of this extra line of code. When this line is commented out, the component should display Chinese normally:

Of course, if you need to use other languages for the internationalization of the project later, you can also temporarily change the imported language to zh-CN as I did: