Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(blockheader): supprt cant collapse child #480

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

LuckyFBB
Copy link
Collaborator

@LuckyFBB LuckyFBB commented Sep 9, 2024

变更类型

请选择以下选项以描述 PR 的类型:

  • Bug 修复(修复现有问题)
  • 新功能(添加了一个功能)
  • 代码优化(性能改进、代码重构)
  • 文档更新
  • 单测新增或修改
  • 其他(请说明):

相关问题

变更内容

目前传入 children 的时候,默认就会展示 “展开/收起” 按钮

还有这种情况,不需要展开收起的情况,可以通过支持传入 children 来做

image
  • defaultExpand 默认更改 undefined
  • 只传入 children ,不支持展开收起
  • 传入 childrendefaultExpand | expand,支持展开收起

详细描述

对应 Previewer

@LuckyFBB LuckyFBB force-pushed the feat/blockHeader_child branch from 479bcf3 to 87e496e Compare September 9, 2024 08:53
@LuckyFBB LuckyFBB changed the title Feat/block header child feat(blockheader): supprt cant collapse child Sep 9, 2024
@@ -38,6 +38,10 @@ export interface IBlockHeaderProps {
className?: string;
/** 标题的样式类名 */
style?: React.CSSProperties;
// 展示内容(children)的样式类名
Copy link
Collaborator

Choose a reason for hiding this comment

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

用块级注释吧,和其他参数保持统一

background = true,
defaultExpand = true,
defaultExpand,
Copy link
Collaborator

Choose a reason for hiding this comment

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

defaultExpand 的默认值是不是应该默认为 true,去除后应该就不默认展开了吧

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants