vue3.0中使用Element-plus默认英文组件修改为中文修改方法
说明:本方法Element-plus 1.0.2-beta.59 之前的版本可以,1.0.2-beta.59之后版本请看下一篇博客
1,引入element
// ! element-plus vue3.0import element from 'element-plus'import 'element-plus/lib/theme-chalk/index.css'import 'dayjs/locale/zh-cn' //中文import locale from 'element-plus/lib/locale/lang/zh-cn' //中文
2,使用,加上{ locale }
createApp(App).use(router).use(element, {locale }).mount('#app')
至此,已经ok了。
若是1.0.2-beta.59之后版本请看下一篇博客。