From cd19dec7907cac5cff775f1cbde24cb3f384e87b Mon Sep 17 00:00:00 2001 From: roymondchen Date: Thu, 4 Jun 2026 16:59:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(editor):=20=E4=BF=AE=E5=A4=8D=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E5=AF=B9=E6=AF=94=E6=A0=B7=E5=BC=8F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .../editor/src/components/CompareForm.vue | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/CompareForm.vue b/packages/editor/src/components/CompareForm.vue index e9c3d423..f83a29f1 100644 --- a/packages/editor/src/components/CompareForm.vue +++ b/packages/editor/src/components/CompareForm.vue @@ -152,6 +152,24 @@ const showDiff = ({ curValue, lastValue, config }: { curValue: any; lastValue: a return !isEqual(curValue, lastValue); }; +const removeStyleDisplayConfig = (formConfig: FormConfig): FormConfig => + formConfig.map((item) => { + if (!('type' in item)) return item; + if (item?.type !== 'tab' || !Array.isArray(item.items)) return item; + + return { + ...item, + items: item.items.map((tabPane) => { + if (tabPane?.title !== '样式' || !Array.isArray(tabPane.items)) return tabPane; + + return { + ...tabPane, + display: true, + }; + }), + }; + }); + /** * 内置的默认 FormConfig 加载逻辑:按 `category` 从对应 service / 工具取配置。 * 作为 ctx.defaultLoadConfig 透传给自定义 `loadConfig`,方便复用与二次加工。 @@ -162,7 +180,7 @@ const defaultLoadConfig = async (): Promise => { if (!props.type) { return []; } - return await propsService.getPropsConfig(props.type); + return removeStyleDisplayConfig(await propsService.getPropsConfig(props.type)); } case 'data-source': { return dataSourceService.getFormConfig(props.type || 'base');