breaking(TSteps): 收敛进度、可选择与纯展示模式 - #1084
Merged
Merged
Conversation
Open
Member
|
|
Contributor
Web DemoAPK 下载 |
…teps-design-alignment # Conflicts: # tdesign-component/example/test/fonts/README.md
…teps-design-alignment # Conflicts: # tdesign-component/example/test/fonts/README.md # tdesign-component/test/components/goldens/navigation_components_dark.png # tdesign-component/test/components/goldens/navigation_components_light.png # tdesign-component/tool/component_test_manifest.dart
…teps-design-alignment # Conflicts: # tdesign-component/example/test/fonts/README.md
…teps-design-alignment # Conflicts: # tdesign-component/example/test/fonts/README.md
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
💡 需求背景和解决方案
旧版
TSteps由一个构造函数同时承载进度、点状、只读和垂直选择能力,并允许实例参数与TStepsThemeData共同持有业务模式,导致有效组合、状态所有权和主题优先级不清晰。本 PR 将公开契约收敛为三个职责明确的命名构造:TSteps.progress:普通受控进度步骤条。value是唯一进度状态,status只描述当前步骤的process/error状态,indicator选择standard/dot;onChange可选且只报告点击索引。TSteps.selectable:垂直可选择步骤条。固定点状指示器、必填value/onChange并显示右箭头,由调用方在回调中更新value。TSteps.display:纯展示步骤条。不接收进度、状态或交互参数,横向与纵向均以完成态节点和连线展示。同时完成以下收敛与修复:
TSteps(...)、simple/readOnly/verticalSelect以及持有业务模式的TStepsThemeData;新增TStepsIndicator.standard/dot。TStepsStatus.success更名为process,TStepsItemData.successIcon更名为icon;customTitle/customContent继续优先于字符串便利字段。_selectedStep受控状态派生“已完成步骤 / 当前步骤 / 未完成步骤”,点击后同步更新节点样式、状态文案并显示 Toast;生成代码片段同步说明 State 宿主和回调重建方式。Spec 与视觉证据:行为契约、验收记录、浅色 Golden、深色 Golden。
验证结果:
📝 更新日志
breaking(TSteps): 使用
TSteps.progress/selectable/display收敛进度、可选择与纯展示模式,使用indicator/onChange替代simple/readOnly/verticalSelectbreaking(TSteps): 将
TStepsStatus.success更名为process、TStepsItemData.successIcon更名为icon,移除持有业务模式的TStepsThemeDatafix(TSteps): 修复局部文字主题覆盖失效、横向纯展示节点状态不一致以及可选择示例状态文案不随选择更新的问题
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单
type(<scope>?): 修改描述。示例:
fix(TBottomTabBar): 修复 iconText 模式底部溢出