隐藏1080样式
This commit is contained in:
12
src/App.vue
12
src/App.vue
@@ -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>
|
||||
|
||||
@@ -82,7 +82,9 @@ li {
|
||||
/* 顺安大屏尺寸1920*1200 */
|
||||
html, body {
|
||||
width: 1920px;
|
||||
height: 100%;
|
||||
height: 1200px;
|
||||
/* height: 1080px; */
|
||||
/* height: 100%; */
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user