fix(接口测试): 修复Mock编辑页面不会随着浏览器窗口自动调整大小的问题
修复Mock编辑页面不会随着浏览器窗口自动调整大小的问题
This commit is contained in:
parent
923fc38ea7
commit
b167f975bf
|
@ -88,7 +88,11 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setfullScreen(){
|
setfullScreen(){
|
||||||
this.isFullScreen = true;
|
if(this.isFullScreen){
|
||||||
|
this.fullScreen();
|
||||||
|
}else {
|
||||||
|
this.isFullScreen = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
window.addEventListener("resize", this.listenScreenChange,false);
|
window.addEventListener("resize", this.listenScreenChange,false);
|
||||||
|
@ -157,23 +161,28 @@
|
||||||
window.removeEventListener("resize", this.listenScreenChange);
|
window.removeEventListener("resize", this.listenScreenChange);
|
||||||
},
|
},
|
||||||
listenScreenChange() {
|
listenScreenChange() {
|
||||||
switch (this.direction) {
|
if(this.isFullScreen){
|
||||||
case 'left':
|
this.w = document.body.clientWidth;
|
||||||
this.h = document.documentElement.clientHeight;
|
this.h = document.body.clientHeight;
|
||||||
break;
|
}else {
|
||||||
case 'right':
|
switch (this.direction) {
|
||||||
this.h = document.documentElement.clientHeight;
|
case 'left':
|
||||||
break;
|
this.h = document.documentElement.clientHeight;
|
||||||
case 'top':
|
break;
|
||||||
this.w = document.documentElement.clientWidth;
|
case 'right':
|
||||||
break;
|
this.h = document.documentElement.clientHeight;
|
||||||
case 'bottom':
|
break;
|
||||||
this.w = document.documentElement.clientWidth;
|
case 'top':
|
||||||
break;
|
this.w = document.documentElement.clientWidth;
|
||||||
default:
|
break;
|
||||||
this.h = document.documentElement.clientHeight;
|
case 'bottom':
|
||||||
this.w = document.documentElement.clientWidth;
|
this.w = document.documentElement.clientWidth;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
this.h = document.documentElement.clientHeight;
|
||||||
|
this.w = document.documentElement.clientWidth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue