Skip to content

table columns customRender 中添加class失败,页面没有效果 #2004

@JinPengGeng

Description

@JinPengGeng
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.5.0

Environment

os: win10, npm: 6.12.1 @vue/cli: 4.2.3, brower: chrome 78.0.3904.97(Official Build) (64 ビット)

Reproduction link

Edit on CodeSandbox

Steps to reproduce

customCell 中添加class: OK
customCell 中添加colSpan: 0 和 rowSpan:0 : 没效果

customRender 中添加class: 没效果
customRender 中添加colSpan: 0 和 rowSpan:0 :ok

在ant.design.vue 1.4 系列版本中,class和 行列合并可以由customRender 一个API 独立完成,
但在1.5 系列的所有版本中,class和 行列合并必须由customRender 和customCell 两个API 配合完成

What is expected?

customCell 和 customRender中这两种属性添加能够正常显示

What is actually happening?

customCell 和 customRender中这两种属性在table实际渲染中失败


目前只能在customRender中设置行列合并,同时在customCell中设置class才能满足(没有尝试行内样式,不知道是否会成功)
是否能够在某一个单独的API中完成这两种操作,不用每一个column中都要写两个Render
在相关财务系统中,经常用到的就是行列合并,且不同类型金额显示不同背景色或颜色,在1.4版本中,只需要写customRender 就可以实现,但在1.5.0及对应的rc 和beta版本中必须在customRender中设置行列合并,同时在customCell中设置class,当表头(columns length)过长时,太过局限

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions