Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(search): 增加action和onActionClick属性 #263

Merged
merged 4 commits into from
Aug 24, 2024

Conversation

Ezer015
Copy link
Contributor

@Ezer015 Ezer015 commented Jul 28, 2024

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

#209

💡 需求背景和解决方案

问题:Search组件不支持自定义右侧文字和文字的点击操作。

方案:为Search组件增加以下属性

  • action:表示自定义右侧操作按钮文字,默认为“取消”;
  • onActionClick:表示右侧操作内容点击时的响应,默认为清空输入框。
    (因 focusnode 以及 animation 等未向用户暴露,故实现为:提供该回调函数不影响失去焦点动效)

结果:

  • 测试:搜索 (action)
    tdesign_search_action_1
  • 测试:搜索结果 (onActionClick)
    tdesign_search_action_2
  • API
    tdesign_search_action_3
  • 演示代码
    tdesign_search_action_4

📝 更新日志

  • feat(search): 增加action和onActionClick属性

  • 本条 PR 不需要纳入 Changelog

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

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

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • Changelog 已提供或无须提供

@tencent-adm
Copy link
Member

tencent-adm commented Jul 28, 2024

CLA assistant check
All committers have signed the CLA.

@Luozf12345 Luozf12345 merged commit 6e73838 into Tencent:develop Aug 24, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request Oct 15, 2024
15 tasks
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.

3 participants