1.前提是你得下载Element-plus
2.下面是代码环节,超级简单
//app.vue
<template>
<el-config-provider :locale="locale">
<router-view></router-view>
</el-config-provider>
</template>
<script >
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
export default {
components: {
ElConfigProvider
},
setup(props) {
let locale = zhCn
return {
locale
};
},
};
</script>
<style>
@import "./assets/css/main.css";
@import "./assets/css/color-dark.css";
#app {
width: 100%;
height: 100%;
}
</style>
效果如下