S2 icon indicating copy to clipboard operation
S2 copied to clipboard

🙏明细表希望可以增加一个对某一列的居中方式的支持

Open aimerthyr opened this issue 2 years ago • 3 comments

image 例如我想设置红框圈住的部分居左显示 目前是没有办法对单独某一列进行设置的 所以希望考虑增加一个对某一列进行设置居中方式的功能

aimerthyr avatar May 17 '22 09:05 aimerthyr

可以自定义 dataCell。写一个 Class 继承 TableDataCell,然后重写 getTextStyle 方法。

  protected getTextStyle() {
    const textStyle = super.getTextStyle();
    const colName = this.meta.valueField;

    if (colName === '编号') {
      textStyle.textAlign = 'left';
    }

    return textStyle;
  }

内置特性方面,可能需要全盘考虑,是否支持每个单元格粒度的自定义样式,可能是以 Style Hooks 的形式透出,这个我们再考虑一下。

zxc0328 avatar May 18 '22 01:05 zxc0328

好嘞 了解了 谢谢

aimerthyr avatar May 18 '22 02:05 aimerthyr

你好 @Leon-0606,经过我们的反复讨论, 你的需求现已被采纳, 我们会排期开发, 但人力资源有限, 短期内无法支持, 请关注后续发布日志。当然, 如果能贡献 PR 帮助我们改进, 不胜感激!

Hello, @, your feature request has been accepted after our repeated discussion. We will schedule the development. However, it could not be supported in the short term since limited time, please pay attention to the follow-up release logs. Of course, looking forward for your PR!

github-actions[bot] avatar May 31 '22 08:05 github-actions[bot]