breaking(TSwitch): 独立加载状态并收敛示例 - #1050
Merged
Merged
Conversation
Contributor
Web DemoAPK 下载 |
Open
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.

🤔 这个 PR 的性质是?
🔗 相关 Issue
Related: #1027
💡 需求背景和解决方案
TSwitch 原先通过
TSwitchVariant.loading同时表达内容样式和加载状态,导致variant承担两类语义。本次将加载状态收敛为独立的loading参数,并同步整理公开 Demo 的分组、状态和尺寸展示。final bool loading,默认值为false;加载时显示加载指示器并禁用交互。TSwitchVariant仅保留filled、text、icon三种内容样式。loading与variant同时设置时,加载状态临时覆盖滑块内容;加载结束后恢复对应variant。onChanged == null仍是普通禁用状态的唯一入口,不新增disabled、defaultValue或customValue。ExamplePage、ExampleModule与TCellGroup,未修改ExampleItem或新增公共示例组件。迁移方式:
验证结果:
341/358 = 95.25%。49/49 = 100%。--update-goldens的模式下完成比对。tdesign-component与example的flutter analyze均为 0 issues。📝 更新日志
breaking(TSwitch): 将加载状态迁移为独立的
loading参数,移除TSwitchVariant.loading本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单
type(<scope>?): 修改描述。示例:
fix(TBottomTabBar): 修复 iconText 模式底部溢出