|
@@ -53,12 +53,15 @@
|
|
|
})
|
|
|
|
|
|
// 更新vuex中的缩放比例
|
|
|
- // axios.get('static/Data/EnityWindow.Data').then(async res => {
|
|
|
- // if (res.status === 200) {
|
|
|
- // const bigScale = window.screen.height/res.data[0].Height
|
|
|
- // this.$store.dispatch('updateScale',bigScale)
|
|
|
- // }
|
|
|
- // })
|
|
|
+ axios.get('static/Data/EnityWindow.Data').then(async res => {
|
|
|
+ if (res.status === 200) {
|
|
|
+ // 当屏幕分辨率小于客户端分辨率时,所有元素大小位置同样缩小
|
|
|
+ if(window.screen.width<res.data[0].Width){
|
|
|
+ const bigScale = window.screen.width/res.data[0].Width
|
|
|
+ this.$store.dispatch('updateScale',bigScale)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|