From 368d0a8f9ae53880fe563c121b380cba89d0da74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=B1=E7=BF=B0?= Date: Tue, 8 Aug 2023 22:31:10 +0800 Subject: [PATCH] fix: clearing the _container & el in the dispose function --- src/component/tooltip/TooltipHTMLContent.ts | 3 +++ src/component/tooltip/TooltipModel.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/component/tooltip/TooltipHTMLContent.ts b/src/component/tooltip/TooltipHTMLContent.ts index 9836d9d723..aafdb2b0ab 100644 --- a/src/component/tooltip/TooltipHTMLContent.ts +++ b/src/component/tooltip/TooltipHTMLContent.ts @@ -524,6 +524,9 @@ class TooltipHTMLContent { dispose() { this.el.parentNode.removeChild(this.el); + this.el = null; + this._container = null; + this._api = null; } } diff --git a/src/component/tooltip/TooltipModel.ts b/src/component/tooltip/TooltipModel.ts index 36f3daef62..b761240672 100644 --- a/src/component/tooltip/TooltipModel.ts +++ b/src/component/tooltip/TooltipModel.ts @@ -70,7 +70,7 @@ export interface TooltipOption extends CommonTooltipOption HTMLElement | undefined | null) | string | HTMLElement + appendTo?: ((chartContainer: HTMLElement) => HTMLElement | undefined | null) | string | HTMLElement /**