From 37733952809b3c723a8e9e4f0e79327d0c89a216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=96=87=E5=BA=86?= Date: Mon, 5 Sep 2022 07:55:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=ADiframe?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=98=AF=E5=90=A6=E6=8F=90=E4=BE=9BReconnect?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E6=9C=89=E6=8F=90=E4=BE=9B=E7=9A=84?= =?UTF-8?q?=E8=AF=9D=EF=BC=8C=E7=9B=B4=E6=8E=A5=E8=B0=83=E7=94=A8Reconnect?= =?UTF-8?q?=EF=BC=8C=E8=80=8C=E4=B8=8D=E6=98=AF=E5=88=B7=E6=96=B0=E6=95=B4?= =?UTF-8?q?=E4=B8=AA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/elements/iframe/iframe.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/elements/iframe/iframe.component.ts b/src/app/elements/iframe/iframe.component.ts index 4c25cb42..2b899917 100644 --- a/src/app/elements/iframe/iframe.component.ts +++ b/src/app/elements/iframe/iframe.component.ts @@ -45,6 +45,9 @@ export class ElementIframeComponent implements OnInit, AfterViewInit, OnDestroy case 'CLOSE': this.view.connected = false; break; + case 'CONNECTED': + this.view.connected = true; + break; case 'CLICK': document.body.click(); break; @@ -86,6 +89,12 @@ export class ElementIframeComponent implements OnInit, AfterViewInit, OnDestroy } reconnect() { + // @ts-ignore + if (typeof (this.iframeWindow.Reconnect) === 'function') { + // @ts-ignore + this.iframeWindow.Reconnect(); + return; + } const url = this.src; this.src = 'about:blank'; setTimeout(() => {