Tencent / Tencent/tdesign-react

[Dialog] 对话框的 t-dialog__body 样式支持自定义,使得可以完全自定义对话框的主体内容

Open
#3,636 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💪🏻 enhancement
Dominant language
TypeScript
Stars
965
Forks
373
Avg merge
3d 6h
Merged PRs (30d)
17

Description

这个功能解决了什么问题

原始需求:
能完全自定义模态对话框的显示内容,目的是实现类似下图的效果:

Image

问题:

  1. header, footer 目前都已经支持不显示。
  2. 但是对话框内容中,有一个 t-dialog__body,里边定义了 padding ,导致无法做到完全自定义整个对话框的效果,目前能实现的效果如下图
  3. 问题:图中顶部跟底部,绿色的部分无法去掉:

Image

你建议的方案是什么

希望对话框的属性,支持自定义这个 t-dialog__body 样式的功能。

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

Start with the Dialog component and inspect how the t-dialog__body styles apply padding. Define and verify the requested customization for that body styling, then reproduce the reported layout to confirm the unwanted top and bottom spacing can be removed while header and footer remain optional.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.