隐藏1080样式

This commit is contained in:
2023-11-10 08:52:59 +08:00
parent 8ac9b4cb08
commit 2035134967
6 changed files with 21 additions and 18 deletions

View File

@@ -23,12 +23,12 @@ export default {
...mapGetters(['showToast', 'showAlert']) ...mapGetters(['showToast', 'showAlert'])
}, },
mounted () { mounted () {
const htmlStyle = document.getElementsByTagName('html')[0].style // const htmlStyle = document.getElementsByTagName('html')[0].style
if (window.screen.height <= 1080) { // if (window.screen.height <= 1080) {
htmlStyle.height = 1080 // htmlStyle.height = 1080
} else { // } else {
htmlStyle.height = 1200 // htmlStyle.height = 1200
} // }
} }
} }
</script> </script>

View File

@@ -82,7 +82,9 @@ li {
/* 顺安大屏尺寸1920*1200 */ /* 顺安大屏尺寸1920*1200 */
html, body { html, body {
width: 1920px; width: 1920px;
height: 100%; height: 1200px;
/* height: 1080px; */
/* height: 100%; */
} }
body { body {

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="canvas_container" @click="rectClick"> <!-- <div class="canvas_container" @click="rectClick"> -->
<!-- <div class="canvas_container"> --> <div class="canvas_container">
<canvas id="myCanvas" width="946" height="982"></canvas> <canvas id="myCanvas" width="946" height="982"></canvas>
</div> </div>
</template> </template>

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="canvas_container" @click="rectClick"> <!-- <div class="canvas_container" @click="rectClick"> -->
<!-- <div class="canvas_container"> --> <div class="canvas_container">
<canvas id="myCanvas" width="946" height="982"></canvas> <canvas id="myCanvas" width="946" height="982"></canvas>
</div> </div>
</template> </template>

View File

@@ -283,11 +283,11 @@ export default {
clearInterval(this.timer1) clearInterval(this.timer1)
clearInterval(this.timer2) clearInterval(this.timer2)
this.refresh() this.refresh()
if (window.screen.height <= 1080) { // if (window.screen.height <= 1080) {
this.$refs.container.style.paddingTop = '0.8%' // this.$refs.container.style.paddingTop = '0.8%'
this.$refs.container.style.height = '90%' // this.$refs.container.style.height = '90%'
this.$refs.bottom.style.height = '2%' // this.$refs.bottom.style.height = '2%'
} // }
}, },
beforeDestroy () { beforeDestroy () {
this.$once('hook:beforeDestroy', () => { this.$once('hook:beforeDestroy', () => {

View File

@@ -651,14 +651,15 @@
<script> <script>
import TCanvas1 from './canvas_1.vue' import TCanvas1 from './canvas_1.vue'
import TCanvas2 from './canvas_2.vue' // import TCanvas2 from './canvas_2.vue'
import DevicePop from '@components/devicepop.vue' import DevicePop from '@components/devicepop.vue'
import {homepageEquipment} from '@js/getData2.js' import {homepageEquipment} from '@js/getData2.js'
// import {homepageEquipment} from '@js/mork2.js' // import {homepageEquipment} from '@js/mork2.js'
export default { export default {
name: 'workshop', name: 'workshop',
components: { components: {
TCanvas: window.screen.height <= 1080 ? TCanvas2 : TCanvas1, // TCanvas: window.screen.height <= 1080 ? TCanvas2 : TCanvas1,
TCanvas: TCanvas1,
DevicePop: DevicePop DevicePop: DevicePop
}, },
data () { data () {