如何正确缩进(对齐)溢出行标签? - (蚂蚁设计表,树数据)
我正在构建一个自定义组件,在其中使用Ant Design提供的表组件。对于大多数零件,一切都按预期工作,但是存在一个“小”问题。
我正在使用“树数据”(即嵌套的JSON)数据来填充 Table 组件。由于固定的列大小(这是一项要求),因此在质量检查期间已注意到 Row的标签如果溢出(即在新行开始)。
因此,我的问题是,如何缩进标签,以便当标签在新线上启动时,它是从这样的初始凹痕开始的:
目标将是将标签“挤压”在绿色破折的容器中。
此链接 您可以找到一个演示(与蚂蚁设计文档中的次要更改相同),该演示复制了我正在处理的问题。
- 打开链接
- 扩展第一行(即John Brown Sr。),因为它在上图中扩展。
I am building a custom component where I am using the table component provided by Ant Design. For most of the parts, everything works as expected, however, there is a "tiny" issue.
I am using the "tree-data" (i.e. nested JSON) data to populate the Table component. Due to the fixed column size (which is a requirement) it has been noted during QA that the row`s label is not properly indented if it overflows (i.e. starts on a new row).
So my question is, how can indent the label such that when the label starts on a new line it starts from the initial indentation like this:
The GOAL would be to have the label "squeezed" within the green-dashed container.
On THIS LINK you can find a demo (the same as the one in ant design documentation with minor changes) which replicates the issue I am working on.
- open the link
- expand the first row (i.e. John Brown sr.) as it is expanded in the picture above.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将显示“ Flex”应用于列
You can apply display 'flex' to the column