App.vue:
<template>
<el-config-provider :locale="locale">
<router-view />
</el-config-provider>
</template>
<script lang="ts">
import { Options, Vue } from "vue-class-component";
import { ElConfigProvider } from "element-plus";
import zhCn from "element-plus/lib/locale/lang/zh-cn"; //国际化(中文)
@Options({
components: {
ElConfigProvider
}
})
export default class MyComponent extends Vue {
locale = zhCn;
}
</script>
<style lang="scss">
html,
body {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
}
body {
background-size: cover;
background-position: center;
background-color: #f5f5fb;
-webkit-font-smoothing: antialiased;
font-family: "PingFang SC";
font-weight: bold;
color: #452020;
}
</style>