物理宽高
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user