fix(接口测试): 修复Mock编辑页面不会随着浏览器窗口自动调整大小的问题

修复Mock编辑页面不会随着浏览器窗口自动调整大小的问题
This commit is contained in:
song-tianyang 2022-02-18 18:55:30 +08:00 committed by CountryBuilder
parent 428cc2ccef
commit c9e87d73cd
1 changed files with 27 additions and 18 deletions

View File

@ -88,7 +88,11 @@
},
methods: {
setfullScreen(){
if(this.isFullScreen){
this.fullScreen();
}else {
this.isFullScreen = true;
}
},
init() {
window.addEventListener("resize", this.listenScreenChange,false);
@ -157,6 +161,10 @@
window.removeEventListener("resize", this.listenScreenChange);
},
listenScreenChange() {
if(this.isFullScreen){
this.w = document.body.clientWidth;
this.h = document.body.clientHeight;
}else {
switch (this.direction) {
case 'left':
this.h = document.documentElement.clientHeight;
@ -178,6 +186,7 @@
}
}
}
}
</script>
<style scoped>