File tree 2 files changed +20
-3
lines changed
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <div id =" app" ><router-view /></div >
2
+ <el-config-provider :locale =" locale" >
3
+ <div id =" app" >
4
+ <router-view />
5
+ </div >
6
+ </el-config-provider >
3
7
</template >
4
8
5
9
<script >
10
+ import { ElConfigProvider } from ' element-plus'
11
+ import zhCn from ' element-plus/lib/locale/lang/zh-cn'
12
+
6
13
export default {
14
+ components: {
15
+ [ElConfigProvider .name ]: ElConfigProvider,
16
+ },
17
+ data () {
18
+ return {
19
+ locale: zhCn,
20
+ }
21
+ },
7
22
mounted () {
8
23
document .getElementById (' loader' ).style .display = ' none'
9
24
},
Original file line number Diff line number Diff line change 6
6
</template >
7
7
8
8
<script type="text/ecmascript-6">
9
- import { onMounted } from ' vue'
9
+ import { getCurrentInstance , onMounted } from ' vue'
10
10
11
11
export default {
12
- setup (props , ctx ) {
12
+ setup () {
13
13
onMounted (() => {
14
14
const headerHeight = 72
15
15
const { clientHeight } = document .body
16
+
17
+ const ctx = getCurrentInstance ()
16
18
ctx .refs .container .style .height = ` ${ clientHeight - headerHeight} px`
17
19
})
18
20
}
You can’t perform that action at this time.
0 commit comments