You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.5 KiB

<!--
* @Author: your name
* @Date: 2021-10-08 08:41:57
* @LastEditTime: 2021-12-10 14:15:19
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/App.vue
-->
<template>
<a-config-provider :locale="locale">
<div id="app">
<router-view></router-view>
</div>
</a-config-provider>
</template>
<script>
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
export default {
name: "App",
data() {
return {
locale: zhCN,
appStyle: {}
};
},
created() {
console.log(this.getToken)
this.changeZoom()
},
mounted() {
document.getElementById('appLoading').style.display = 'none';
},
methods: {
changeZoom() {
let h = document.body.clientHeight; // 可是区域的高度
let zoom = 1;
if (760 < h && h <= 1080) {
zoom = (h + 120) / 1080;
} else if (h < 760) {
zoom = 760 / 1080;
} else {
zoom = 1;
}
this.appStyle = {transform: `scaleY(${zoom})`}
this.setZoom(zoom);
},
},
};
</script>
<style>
html,
body {
width: 100%;
height: 100%;
min-height: 760px;
font-family: "Arial", "Microsoft YaHei", "黑体", "宋体", sans-serif;
font-size: 62.5%;
background: #010b19;
}
#app {
width: 100%;
height: 100%;
background: #010b19;
}
</style>