Tencent / Tencent/tdesign-react

[Dialog] 样式被破坏了

Open
#3,198 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

need more info
Dominant language
TypeScript
Stars
965
Forks
373
Avg merge
3d 6h
Merged PRs (30d)
17

Description

tdesign-react 版本

1.9.3

重现链接

No response

重现步骤

这行代码破坏了 DialogCard 的样式,display 被强制改为了 block

https://github.com/Tencent/tdesign-react/blob/683e35973347714b662b0ec018cb98023ef3b496/src/dialog/Dialog.tsx#L163

比如我这个 dialogCardRef 写的是 display: flex 的布局,但是经过这个代码后,被强制格式化成了 block

期望结果

能保留原有的样式,比如组件 onMounted 的时候记一下 dialogCardRef 最初的 display,方便还原

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect src/dialog/Dialog.tsx around line 163 and reproduce the issue with a DialogCard whose ref uses display: flex. Verify how that code forces display to block, then confirm the fix preserves the element's original display style without changing other Dialog behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.