From 13a670160ff9b23ec905d79748c90ae59e940b46 Mon Sep 17 00:00:00 2001 From: RonnyChan96 Date: Mon, 28 Apr 2025 11:38:36 +0800 Subject: [PATCH] =?UTF-8?q?[elsa]=20=E4=BA=A4=E4=BA=92=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A1.=E7=BC=96=E6=8E=92=E6=97=B6?= =?UTF-8?q?=E5=8D=95=E5=87=BB=E7=A9=BA=E7=99=BD=E5=A4=84=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=AF=A6=E6=83=85=E7=AA=97=E5=8F=A3=202.?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=85=B3=E9=97=AD=E8=AF=A6=E6=83=85=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=97=B6=EF=BC=8C=E5=AF=B9=E5=BA=94shape=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fit-elsa-react/src/components/DefaultRoot.jsx | 2 +- .../fit-elsa-react/src/components/base/jadeNode.jsx | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/framework/elsa/fit-elsa-react/src/components/DefaultRoot.jsx b/framework/elsa/fit-elsa-react/src/components/DefaultRoot.jsx index 16e8b0642..35c046214 100644 --- a/framework/elsa/fit-elsa-react/src/components/DefaultRoot.jsx +++ b/framework/elsa/fit-elsa-react/src/components/DefaultRoot.jsx @@ -161,7 +161,7 @@ export const DefaultRoot = forwardRef(function (
{shape.drawer.getHeaderComponent(data, shapeStatus)}
{ - shape.page.onConfigShape = undefined; + shape.unSelect(); setOpen(false); }}> diff --git a/framework/elsa/fit-elsa-react/src/components/base/jadeNode.jsx b/framework/elsa/fit-elsa-react/src/components/base/jadeNode.jsx index 770feeb0a..6d96e96a3 100644 --- a/framework/elsa/fit-elsa-react/src/components/base/jadeNode.jsx +++ b/framework/elsa/fit-elsa-react/src/components/base/jadeNode.jsx @@ -505,5 +505,16 @@ export const jadeNode = (id, x, y, width, height, parent, drawer) => { } }; + /** + * @override + */ + const unSelect = self.unSelect; + self.unSelect = () => { + unSelect.apply(self, []); + if (self.page.onConfigShape === self.id) { + self.page.onConfigShape = undefined; + } + }; + return self; };