物理宽高

This commit is contained in:
2023-05-30 14:14:54 +08:00
parent 4992231ce5
commit 8983bf908f

View File

@@ -5,6 +5,8 @@
<p>b: {{b}}</p>
<p>c: {{c}}</p>
<p>d: {{d}}</p>
<p>e: {{ e }}</p>
<p>f: {{ f }}</p>
</div>
</div>
</template>
@@ -17,7 +19,9 @@ export default {
a: '',
b: '',
c: '',
d: ''
d: '',
e: '',
f: ''
}
},
mounted () {
@@ -29,6 +33,8 @@ export default {
this.b = document.body.clientHeight
this.c = window.screen.width
this.d = window.screen.height
this.e = window.screen.width * window.devicePixelRatio
this.f = window.screen.height * window.devicePixelRatio
}
}
</script>