Skip to content

TFab: 新增 onLongPress 支持长按回调#939

Open
Luozf12345 wants to merge 15 commits into
developfrom
fix/issue-924-fab-on-long-press
Open

TFab: 新增 onLongPress 支持长按回调#939
Luozf12345 wants to merge 15 commits into
developfrom
fix/issue-924-fab-on-long-press

Conversation

@Luozf12345
Copy link
Copy Markdown
Collaborator

🤔 这个 PR 的性质是?

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

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

🔗 相关 Issue

需求来源:悬浮按钮需要长按扩展能力。

#924

💡 需求背景和解决方案

问题TFab 仅支持单击 onClick,业务无法实现长按菜单等交互。

方案

  • 新增可选参数 onLongPressVoidCallback?),并传给内部 InkWell.onLongPress
  • 将原先硬编码的反色与阴影改为 TTheme 中的 textColorAntishadowsMiddle / shadowsBase,满足主题规范与强制检查。

用法示例

TFab(
  theme: TFabTheme.primary,
  text: '操作',
  onClick: () {},
  onLongPress: () {},
)

📝 更新日志

  • feat(TFab): 新增 onLongPress,支持长按回调;图标反色与投影改为主题 token。

  • 本条 PR 不需要纳入 Changelog

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

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

  • pr目标分支为develop分支,请勿直接往main分支合并
  • 标题格式为:组件类名: 修改描述(示例:TBottomTabBar: 修复iconText模式,底部溢出2.5像素)
  • ”相关issue“处带上修复的issue链接
  • 相关文档已补充或无须补充

Luozf12345 and others added 9 commits May 13, 2026 14:28
Aligned with 5709639; .harness only (no regenerated .cursor).
- 将 onLongPress 透传至 InkWell,满足 issue #924
- 图标反色与投影改走 TTheme,移除硬编码 Colors
- 补充单测、示例与 API 表,完善 requirements 验收文档
- workflow / entry skill:commit 后先 push + gh pr create,失败再提示本地步骤

- issue-fix-process 规则与 reference 对齐
@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.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

完成

📱 APK 下载

tdesign-flutter-0.2.7-528.apk

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