Skip to content

feat(Card): 为什么不能单独自定义页头、主体及页脚的背景颜色? #8078

Closed

Description

@bicijinlian

我想单独定义卡片(Card)组件的页头、主体及页脚的背景颜色,但是没办法做到!如果在模板做背景,又不能整个充满(有自带的间隙)。看源码有相关的类,但不公开。Bootstrap5里面的Card,很容易做到。

Image

可能的方案

1、方便的单独设置页头、主体、页脚的背景(可以把私有类公开为属性)
2、可以在各自的模板中设置背景,但要保持上级标签不留间隙(Margin Padding

Activity

  1. bb-auto commented on Jun 3, 2026

    @bb-auto

    @bicijinlian Thank you for contacting us. We will give feedback later.

  2. added this to the v10.7.0 milestone on Jun 3, 2026
  3. changed the title [-]feat 卡片(Card)组件,为什么不能单独自定义页头、主体及页脚的背景颜色?[/-] [+]feat: 卡片(Card)组件,为什么不能单独自定义页头、主体及页脚的背景颜色?[/+] on Jun 3, 2026
  4. ArgoZhang commented on Jun 3, 2026

    @ArgoZhang
    Member

    @bicijinlian 这种设置颜色问题,均属于样式问题,自己项目中写个全局样式,所有的 card 都会按照你的需求改变(不需要每个组件设置),组件设置属性来做这件事非常不方便。

  5. changed the title [-]feat: 卡片(Card)组件,为什么不能单独自定义页头、主体及页脚的背景颜色?[/-] [+]feat(Card): 为什么不能单独自定义页头、主体及页脚的背景颜色?[/+] on Jun 3, 2026
  6. locked and limited conversation to collaborators on Jun 3, 2026
  7. converted this issue into a discussion #8081 on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions