赞
踩
项目中引入ElementPlus的el-date-picker日期选择器时,引入的组件是英文
但是想要中文办的组件,所以需要在main.js中对ElementPlus进行中文配置
- import { createApp } from 'vue'
- import App from './App.vue'
- import ElementPlus from 'element-plus'
- import zhCn from 'element-plus/lib/locale/lang/zh-cn'
- import 'element-plus/dist/index.css'
- import router from './router'
-
-
- const app = createApp(App)
-
- app.use(ElementPlus, { locale: zhCn })
- app.use(router)
- app.mount('#app')
效果:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。