This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(plugin-form): dedupe master-detail create toast + localize Cancel - #2279
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
baozhoutao
force-pushed
the
claude/gifted-lehmann-d135a8
branch
from
July 5, 2026 09:31
69925ea to
a05a147
Compare
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2278
问题
带明细子表(master-detail / subforms)的对象在新建记录弹窗里:
Created+ 本地化线索创建成功;Cancel(提交按钮却是本地化的「创建」)。普通(无明细)对象走
ModalForm页脚,不复现;只有 master-detail 走MasterDetailForm自带操作栏才暴露。根因
MasterDetailForm这套自带 UI 与 host 约定没对齐:ObjectForm契约是「有onSuccess就不自弹,交给 host」;而MasterDetailForm.handleSaved既自弹Created又调onSuccess,host 的onSuccess→crud_successhandler 又弹本地化一条 → 撞车。cancelText,host 也没传下去。改动
MasterDetailForm.handleSaved:内置成功 toast 加if (!schema.onSuccess)兜底——host 负责提示时不再重复;无 host 场景保留 toast,不静默。MasterDetailFormschema 增加cancelText,操作栏用{schema.cancelText ?? 'Cancel'};ModalForm/DrawerForm/ObjectForm的 subforms 分支透传本地化取消文案(console 本就传t('common.cancel'))。onSuccess→ 不双弹;无 → 兜底自弹 + 清表;cancelText本地化渲染。验证
pnpm --filter @object-ui/plugin-form test→ 191 passedturbo run type-check --filter=@object-ui/plugin-form→ 11/11 通过浏览器验证:该改动需完整 console + master-detail 对象 + 后端(重型环境),属纯逻辑/文案层且已被上述回归测试精确覆盖,故以单测为验证依据。
遗留
同操作栏的
Saving…(提交中短暂显示)仍硬编码英文,可后续一并本地化。