From ef3bc4d5709ff9f243dd302cfc03e4ae7dcfbab7 Mon Sep 17 00:00:00 2001 From: sunhao Date: Wed, 13 Nov 2024 14:37:22 +0800 Subject: [PATCH] * core: add z-use to elements with components instances. --- lib/core/src/component/component.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/core/src/component/component.ts b/lib/core/src/component/component.ts index edf563c0f5..87cc624fa8 100644 --- a/lib/core/src/component/component.ts +++ b/lib/core/src/component/component.ts @@ -152,10 +152,12 @@ export class Component x.constructor.NAME))].join(',')); if (MULTI_INSTANCE) { const dataName = `${KEY}:ALL`; let instanceMap: Map | undefined = $element.data(dataName); @@ -310,6 +312,13 @@ export class Component x.constructor.NAME))].join(',')); + } + this.options.$onDestroy?.call(this); }