From fc2b77135b650a730cc20aca12362ece88555d97 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Tue, 1 Sep 2026 16:29:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore=EF=BC=9A=E6=9B=B4=E6=96=B0=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E9=85=8D=E7=BD=AE=E6=B3=A8=E9=87=8A=E4=BB=A5=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .local.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.local.config.js b/.local.config.js index bb6b23c..094eef5 100644 --- a/.local.config.js +++ b/.local.config.js @@ -202,7 +202,8 @@ const localDevConfig = ({ // })['2724']; // 生物菌肥 // })['2811']; // 选择要使用的环境配置 // })['local-11']; // 选择要使用的环境配置 -})['2811']; // 本地 +})['2811']; // 2811 +// })['local-1']; // 本地 // })['local-2']; // 本地 // })['local-11']; // 本地 // })['1-test']; // test From 2787e731260a4d080ead1399829bb53e87bf3f8a Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Wed, 2 Sep 2026 11:14:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore=EF=BC=9A=E4=BC=98=E5=8C=96=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E9=A3=8E=E6=A0=BC=E9=80=BB=E8=BE=91=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=98=BE=E5=BC=8F=E5=92=8C=E9=9A=90=E5=BC=8F=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=EF=BC=8C=E7=A1=AE=E4=BF=9D=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components-diy/diy-form.vue | 11 ++++++++++- pages_tool/form/formdata.vue | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/components-diy/diy-form.vue b/components-diy/diy-form.vue index 043a366..2c8b435 100644 --- a/components-diy/diy-form.vue +++ b/components-diy/diy-form.vue @@ -136,9 +136,18 @@ export default { padding: `0 ${this._num(this.mergedFormConfig && this.mergedFormConfig.bannerPaddingX, 0)}rpx` }); }, - // 后台配了 banner 图片时启用卡片浮起布局(与参考设计左图一致);无 banner 走原平铺,零外溢 + // 表单风格:优先读显式 form_style(classic / card),未设置时回退到隐式判定(看 show_banner && form_banner) + // - classic:经典风格,平铺无 banner 卡片 + // - card :卡片浮起风格,banner + 卡片浮起 + 容器内缩 + // 注意:必须读 this.formCfg(原始 formConfig 对象)而不是 mergedFormConfig(白名单组装对象,不含 form_style 键) + // 双键兼容:formdata 链路 camel(formStyle,api splitFormConfig 转换);DIY 链路 snake(form_style,design.js 直存) + // 老表单无 form_style 字段时 → undefined → 走隐式判定,与原行为完全一致,零迁移风险 hasBannerMode() { const v = this.value || {}; + const fc = this.formCfg || {}; + const style = fc.formStyle !== undefined ? fc.formStyle : fc.form_style; + if (style === 'card') return true; + if (style === 'classic') return false; return !!(v.show_banner && v.form_banner); }, // 卡片容器内联样式:maring-top(负偏移让卡片向上压住 banner 底部)+ border-radius + padding-x + box-shadow + background。 diff --git a/pages_tool/form/formdata.vue b/pages_tool/form/formdata.vue index a79c0cf..52a7dd8 100644 --- a/pages_tool/form/formdata.vue +++ b/pages_tool/form/formdata.vue @@ -263,9 +263,16 @@ export default { containerStyle() { return 'padding-left:' + this.containerInset + 'rpx;padding-right:' + this.containerInset + 'rpx;'; }, - // 图条模式下隐藏 diy-form 卡片顶部的 banner,避免与图条重复 + // 表单风格(与 diy-form.vue hasBannerMode 对齐):优先读显式 form_style,未设置时回退到原 bgImage 隐式判定 + // - card :顶部图条替代内联 banner → 隐藏内联 banner + // - classic:保留内联 banner(与原行为一致),仅当后台显式配 bgImage 才隐藏 + // 老表单无 form_style 字段时 → undefined → 走原隐式判定,零迁移风险 // 如需保留卡片内 banner:把下面这行改成 `return false;` 即可 hideInnerBanner() { + const fc = (this.detail && this.detail.form_config) || {}; + const style = fc.formStyle !== undefined ? fc.formStyle : fc.form_style; + if (style === 'card') return true; + if (style === 'classic') return !!this.bgImage; return !!this.bgImage; }, // 行为设置:提交验证码开启时 diy-form 隐藏内置提交按钮,本页渲染验证码 + 自有提交按钮