|
@@ -137,7 +137,6 @@ const app = new Vue({
|
|
|
let obj = {
|
|
|
objectFit: "fill"
|
|
|
}
|
|
|
-
|
|
|
if (this.isLandscape) {
|
|
|
obj = {
|
|
|
width: `${this.layoutViewHeight}px`,
|
|
@@ -732,10 +731,12 @@ const app = new Vue({
|
|
|
// 高度、悬浮球相关配置
|
|
|
this.height = window.innerHeight
|
|
|
this.width = window.innerWidth
|
|
|
- // 云机画面宽高
|
|
|
- let layoutView = document.querySelector('.layout-view')
|
|
|
- this.layoutViewWidth = layoutView.offsetWidth
|
|
|
- this.layoutViewHeight = layoutView.offsetHeight
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // 云机画面宽高
|
|
|
+ let layoutView = document.querySelector('.layout-view')
|
|
|
+ this.layoutViewWidth = layoutView.offsetWidth
|
|
|
+ this.layoutViewHeight = layoutView.offsetHeight
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
})
|