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: global config and default value #501

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

liweijie0812
Copy link
Member

@liweijie0812 liweijie0812 commented Dec 25, 2024

Tencent/tdesign-react#3001

popup:attach 默认值移除

-- | -- | -- | -- | --
attach | String / Function | 'body' | 制定挂载节点。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`AttachNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
attach | String / Function | - | 指定挂载节点。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`AttachNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档描述可能还是得体现默认是body

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档描述可能还是得体现默认是body

这个问题需要统一处理了,跟 closeOnOverlayClick 情况一样,仅文档体现默认值

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要跟Avatar size 一样描述吗
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还有一个方案 新增 doc_default_value 字段,用于配置文档显示的默认值, 文档显示默认值优先级 高于 field_default_value

Copy link
Member Author

@liweijie0812 liweijie0812 Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api 生成md 默认值处理,组件有全局配置同属性 ,组件属性默认值未定义会取全局配置的默认值 ,
例如。attach 在dialog组件 全局配置 DialogConfig 下,默认值body
image

image image

@uyarn uyarn changed the title Feat/popup/attach feat: global config and default value Dec 30, 2024
@uyarn uyarn added the documentation Improvements or additions to documentation label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants