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

[Comment] actions prop 设计不太合理 #2259

Open
bemzhao opened this issue Jun 2, 2023 · 2 comments
Open

[Comment] actions prop 设计不太合理 #2259

bemzhao opened this issue Jun 2, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@bemzhao
Copy link

bemzhao commented Jun 2, 2023

tdesign-react 版本

1.1.8

重现链接

https://tdesign.tencent.com/react/components/comment?tab=demo

重现步骤

actions prop 类型接收一个 Array<TNode>,但是在渲染的时候会在最外层用 button 包裹

image

业务中通常有权限校验以及状态变化(点赞高亮、禁用状态等),这些没法作用在 button 容器上

另外,现在的逻辑看起来 onClick 只能写在里面的元素,好像也不太合理

为啥 actions 不是开放成一个插槽呢,是担心基本 UI 被破坏吗?

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2023

👋 @bemzhao,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2023

♥️ 有劳 @dreamsqin 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @bemzhao

@uyarn uyarn added the enhancement New feature or request label Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants