|
@@ -1,23 +1,55 @@
|
|
|
<template>
|
|
|
- <!--<dv-full-screen-container id="app">-->
|
|
|
- <div id="app">
|
|
|
+ <!--<dv-full-screen-container style="display: flex;flex-direction: column;height:1080px;width:1920px;">-->
|
|
|
+ <div id="app"
|
|
|
+ :class="screenHeight>500&&screenHeight<760?'appWindowSize1366':(
|
|
|
+ screenHeight>760&&screenHeight<900?'appWindowSize1440':(
|
|
|
+ screenHeight>900&&screenHeight<1070?'appWindowSize1920':''
|
|
|
+ ))">
|
|
|
+ <!--大于上一个尺寸的最大基数小于当前尺寸的最大基数-->
|
|
|
<router-view />
|
|
|
</div>
|
|
|
<!--</dv-full-screen-container>-->
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-export default {
|
|
|
- name: 'App',
|
|
|
+ export default {
|
|
|
+ name: 'App',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ screenHeight:'',
|
|
|
+ screenWidth:'',
|
|
|
+ num:this.screenHeight - 100,
|
|
|
+ }
|
|
|
+ },
|
|
|
metaInfo() {
|
|
|
- return {
|
|
|
- title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
|
|
|
- titleTemplate: title => {
|
|
|
- return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ return {
|
|
|
+ title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
|
|
|
+ titleTemplate: title => {
|
|
|
+ return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ this.screenHeight = screen.height;
|
|
|
+ this.screenWidth = document.body.clientWidth;
|
|
|
+ console.log("document.body.clientWidth",document.body.clientWidth);
|
|
|
+ console.log("screen.height",screen.height);
|
|
|
+ document.getElementById('app').style.transform = `scale(${document.body.clientWidth / 1920})`
|
|
|
+ if(document.body.clientWidth<1540){
|
|
|
+ document.getElementById('app').style.marginLeft = '-'+((1-document.body.clientWidth/1920)*1920/2)+'px'
|
|
|
+ document.getElementById('app').style.marginTop = '-'+((1-document.body.clientWidth/1920)*1080/2)+'px'
|
|
|
+ }
|
|
|
+ window.onresize = () => {
|
|
|
+ return (() => {
|
|
|
+ document.getElementById('app').style.transform = `scale(${document.body.clientWidth / 1920})`
|
|
|
+ if(document.body.clientWidth<1540){
|
|
|
+ document.getElementById('app').style.marginLeft = '-'+((1-document.body.clientWidth/1920)*1920/2)+'px'
|
|
|
+ document.getElementById('app').style.marginTop = '-'+((1-document.body.clientWidth/1920)*1080/2)+'px'
|
|
|
+ }
|
|
|
+ })();
|
|
|
+ };
|
|
|
+ },
|
|
|
+ }
|
|
|
</script>
|
|
|
<style>
|
|
|
html,body{
|
|
@@ -25,8 +57,26 @@ export default {
|
|
|
height:100%;
|
|
|
width:100%;
|
|
|
}
|
|
|
+
|
|
|
+ body::-webkit-scrollbar{
|
|
|
+ width: 4px; /*高宽分别对应横竖滚动条的尺寸*/
|
|
|
+ height: 4px;
|
|
|
+ }
|
|
|
+ body::-webkit-scrollbar-thumb{
|
|
|
+ border-radius: 5px;
|
|
|
+ -webkit-box-shadow: inset 0 0 5px #999;
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+ body::-webkit-scrollbar-track{
|
|
|
+ -webkit-box-shadow: inset 0 0 5px rgba(255,255,255,0);
|
|
|
+ border-radius: 0;
|
|
|
+ background: rgba(255,255,255,0);
|
|
|
+ }
|
|
|
#app{
|
|
|
- height:100%!important;
|
|
|
- width:100%!important;
|
|
|
+ height:1080px;
|
|
|
+ width:1920px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ flex:1;
|
|
|
}
|
|
|
</style>
|