File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 11<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 >
37</template >
48
59<script >
10+ import { ElConfigProvider } from ' element-plus'
11+ import zhCn from ' element-plus/lib/locale/lang/zh-cn'
12+
613export default {
14+ components: {
15+ [ElConfigProvider .name ]: ElConfigProvider,
16+ },
17+ data () {
18+ return {
19+ locale: zhCn,
20+ }
21+ },
722 mounted () {
823 document .getElementById (' loader' ).style .display = ' none'
924 },
Original file line number Diff line number Diff line change 66</template >
77
88<script type="text/ecmascript-6">
9- import { onMounted } from ' vue'
9+ import { getCurrentInstance , onMounted } from ' vue'
1010
1111export default {
12- setup (props , ctx ) {
12+ setup () {
1313 onMounted (() => {
1414 const headerHeight = 72
1515 const { clientHeight } = document .body
16+
17+ const ctx = getCurrentInstance ()
1618 ctx .refs .container .style .height = ` ${ clientHeight - headerHeight} px`
1719 })
1820 }
You can’t perform that action at this time.
0 commit comments