fix(接口测试): 修复Mock编辑页面不会随着浏览器窗口自动调整大小的问题
修复Mock编辑页面不会随着浏览器窗口自动调整大小的问题
This commit is contained in:
parent
428cc2ccef
commit
c9e87d73cd
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue