From 135e4c604019bc4e16ba4504ba3d32086cf85958 Mon Sep 17 00:00:00 2001 From: mahaonan Date: Thu, 9 Nov 2023 09:49:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=8E=20platform=5Fview?= =?UTF-8?q?=20=E7=95=8C=E9=9D=A2=E8=BF=94=E5=9B=9E=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=90=8E=EF=BC=8Cplatform=5Fview=20=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=88=A0=E9=99=A4=E7=9A=84=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E6=94=B6=E5=88=B0=20dispose=20=E6=B6=88=E6=81=AF=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=BB=8E=20RootModel=20=E5=88=A0=E9=99=A4=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E7=9A=84=20platformView?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mahaonan --- .../src/main/ets/plugin/platform/PlatformViewsController.ets | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/platform/PlatformViewsController.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/platform/PlatformViewsController.ets index cddb97aa45..0d244a9d96 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/platform/PlatformViewsController.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/platform/PlatformViewsController.ets @@ -117,6 +117,10 @@ export default class PlatformViewsController implements PlatformViewsAccessibili let viewWrapper: PlatformViewWrapper | null = this.viewWrappers.get(viewId) || null; if (viewWrapper != null) { + let children = viewWrapper.getDvModel().children; + let index = RootDvModeManager.getRootDvMode().model.children.indexOf(viewWrapper.getDvModel()); + children.splice(0, children.length); + RootDvModeManager.getRootDvMode().model.children.splice(index, 1); this.viewWrappers.delete(viewId); } -- Gitee