Skip to content

breaking(radio): 对齐默认勾选、分割线与文本省略样式 - #1049

Merged
RSS1102 merged 21 commits into
developfrom
rss1102/style/radio-miniprogram-alignment
Aug 27, 2026
Merged

breaking(radio): 对齐默认勾选、分割线与文本省略样式#1049
RSS1102 merged 21 commits into
developfrom
rss1102/style/radio-miniprogram-alignment

Conversation

@RSS1102

@RSS1102 RSS1102 commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

🤔 这个 PR 的性质是?

勾选规则:
1.只要有新增参数,就勾选”新特性提交“
2.只修改内部bug,未新增参数,才勾选”日常 bug 修复“
3.其他选项视具体改动判断

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

Related: #1027

💡 需求背景和解决方案

Radio 单选框的默认勾选视觉、分割线与文本省略规则调整为组件统一默认样式,并收敛示例分组与文案。

  • 新增 TRadioIconType 枚举(dot / check / fill)及 TRadio.iconTypeTRadioGroup.iconType 参数,默认 fill:未选中显示边框圆环,选中时显示 TDesign 实心勾选图标(check-circle-filled),check 选中时显示勾选图标(check)。
  • TRadioTRadioGrouptitleMaxLines / subTitleMaxLines 默认值调整为 3 / 5,TRadioGroup 新增透传这两个配置到默认子项。
  • TRadioTRadioGroupshowDivider 默认值调整为 true;显式传入 false 仍可关闭,卡片模式不绘制分割线。
  • 块级 Radio 按 TRadioSize 使用 TDesign token 组合三档高度与指示器尺寸,上下留白由目标高度、标题行高和指示器尺寸动态计算;带副标题时内置指示器与主标题行垂直居中;分割线自正文起点开始。
  • 示例重排为“组件类型 / 组件状态 / 组件样式 / 特殊样式”四组,拆分展示勾选样式与勾选显示位置;横向单选框与 Form 表单性别项使用通栏容器与 token 化内边距。
  • 增加示例分组回归测试、指示器 / 对齐 / 省略规则 / 默认分割线 / 自定义 token 组件测试,并补充亮 / 暗整页视觉快照;Demo 内部测试模块在 release 构建中不展示。

相关实现与行为契约见 specs/015-radio-demo-alignment/

📝 更新日志

  • breaking(radio): 默认选中标记由圆点调整为 TDesign 实心勾选图标,并新增 TRadioIconType 与 TRadio.iconType / TRadioGroup.iconType 参数

  • breaking(radio): 默认主标题 / 副标题最大行数由 1 行调整为 3 / 5 行,TRadioGroup 新增标题行数与图标样式透传

  • breaking(radio): TRadio 与 TRadioGroup 默认显示分割线,显式关闭方式保持不变,卡片模式不显示分割线

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 标题遵循 Conventional Commits 格式:type(<scope>?): 修改描述
    示例:fix(TBottomTabBar): 修复 iconText 模式底部溢出
  • “相关 Issue”处带上修复的 Issue 链接或无关联 Issue
  • 已添加对应的 Spec 链接,或已由 Review 确认本次改动无需 Spec
  • 相关文档已补充或无须补充

@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

完成

Web Demo

APK 下载

@tencent-adm

Copy link
Copy Markdown
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ RSS1102
❌ autofix-ci[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@RSS1102 RSS1102 changed the title style(radio): 对齐小程序示例分组与特殊样式 breaking(radio): 对齐小程序默认样式与示例 Aug 27, 2026
@RSS1102
RSS1102 force-pushed the rss1102/style/radio-miniprogram-alignment branch from 5947827 to 3befc1d Compare August 27, 2026 15:59
@RSS1102 RSS1102 changed the title breaking(radio): 对齐小程序默认样式与示例 breaking(radio): 调整默认勾选样式与文本省略规则并收敛示例分组 Aug 27, 2026
@RSS1102 RSS1102 changed the title breaking(radio): 调整默认勾选样式与文本省略规则并收敛示例分组 breaking(radio): 对齐默认勾选、分割线与文本省略样式 Aug 27, 2026
@RSS1102
RSS1102 merged commit ff76485 into develop Aug 27, 2026
17 of 18 checks passed
@RSS1102
RSS1102 deleted the rss1102/style/radio-miniprogram-alignment branch August 27, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants