隐藏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'])
},
mounted () {
const htmlStyle = document.getElementsByTagName('html')[0].style
if (window.screen.height <= 1080) {
htmlStyle.height = 1080
} else {
htmlStyle.height = 1200
}
// const htmlStyle = document.getElementsByTagName('html')[0].style
// if (window.screen.height <= 1080) {
// htmlStyle.height = 1080
// } else {
// htmlStyle.height = 1200
// }
}
}
</script>

View File

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

View File

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

View File

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

View File

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

View File

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