Skip to content

表格组件里面的按钮需要添加className #1812

@xingkoo

Description

@xingkoo

What problem does this feature solve?

表格组件里面的按钮需要添加className。
一个场景是:
buttons中包含多个button,
伪代码:

buttons:[
 {title: 'button1‘,}
 {title: 'button2‘, iif(i){return i.status>2;}}
 {title: 'button3‘, iif(i){return i.status<0;}}
 {title: 'button4‘, iif(i){return i.status>1;}}
 {title: 'button5‘,}
]

导致出来的顺序,可能是类似如下这种按钮组合:

1,2,3,5 或 1,3,5 或 1,3,5

我目前通过给不同的行增加ClassName,并使用伪类.eq(1) 类似的方式来来设置每个对应功能按钮的颜色。

但这是非常麻烦的。如果能够在button上直接加一个className属性。就不需要考虑这些问题了。

What does the proposed API look like?

buttons:[
  {
    title: 'button1',
    className: 'btn1',
  },
  .....
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions