Repository navigation
Conversation
lnuxe
requested review from
anlyyao,
chaishi,
liweijie0812 and
uyarn
as code owners
October 21, 2026 07:55
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
描述 (Description)
修复 issue #1021 中提出的
FormValidateResult类型定义过于宽泛的问题。根据 Form 组件文档,校验通过时
validateResult的值为true,校验不通过时为校验结果列表(ValidateResultObj<T>),不存在值为false的情况。因此将类型定义从boolean | ValidateResultObj<T>缩窄为true | ValidateResultObj<T>,避免对使用者和编译器造成误导。变更内容 (Changes)
按照仓库数据流(
db/TDesign.db→api.json→ 各框架生成产物)同步修改:db/TDesign.db:更新t_api表中 Form 组件submit事件的event_input(id=178)与validate的event_output(id=1401、1773716995)共 3 条记录的类型定义文本packages/scripts/api.json:通过本地服务执行npm run api:download从数据库同步生成packages/products/:同步更新 7 个技术栈框架的 Form 组件产物(type.ts7 个 + 中英文文档 14 个):核心变更:
已知影响 (Breaking Note)
对于依赖
FormValidateResult类型并进行validateResult === false判断的代码,TypeScript 编译器将提示该分支不可达(此前文档与实际行为也不存在false分支,属于类型与文档不一致的修正)。实际运行时行为不变。自查清单 (Checklist)
npm run lint通过db/api.json/products三处数据保持一致Fixes #1021