From 74de5e848a68e5bfc131d3a52b60f451a1a69dcd Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 2 Jul 2021 18:01:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=BE=91=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E6=BB=91=E5=8A=A8=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/automation/scenario/EditApiScenario.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 1dbcb84aa2..59ca7df93b 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -1252,12 +1252,14 @@ export default { handleScroll() { let stepInfo = this.$refs.stepInfo; let debugHeader = this.$refs.debugHeader; - let originWidth = debugHeader.clientWidth; - if (stepInfo.getBoundingClientRect().top <= 178) { - this.isTop = true; - debugHeader.style.width = originWidth + 'px'; - } else { - this.isTop = false; + if (debugHeader) { + let originWidth = debugHeader.clientWidth; + if (stepInfo.getBoundingClientRect().top <= 178) { + this.isTop = true; + debugHeader.style.width = originWidth + 'px'; + } else { + this.isTop = false; + } } } }