From e57fc7b718beda944d7df47cc3d8178035a47e5f Mon Sep 17 00:00:00 2001 From: roymondchen Date: Mon, 6 Jan 2025 19:32:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor(editor):=20form-panel=20mounted?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor/src/layouts/props-panel/PropsPanel.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/layouts/props-panel/PropsPanel.vue b/packages/editor/src/layouts/props-panel/PropsPanel.vue index 20c6c5dd..9e09a9f5 100644 --- a/packages/editor/src/layouts/props-panel/PropsPanel.vue +++ b/packages/editor/src/layouts/props-panel/PropsPanel.vue @@ -148,8 +148,10 @@ const errorHandler = (e: any) => { emit('form-error', e); }; -const mountedHandler = (e: InstanceType) => { - emit('mounted', e); +const mountedHandler = () => { + if (propertyFormPanelRef.value) { + emit('mounted', propertyFormPanelRef.value); + } }; const propsPanelEl = useTemplateRef('propsPanel');