美文网首页
antd 设置DescriptionList列数col无效

antd 设置DescriptionList列数col无效

作者: 小二二二7 | 来源:发表于2020-07-16 10:22 被阅读0次

今天设置DescriptionList列数col=‘5’无效,后来在DescriptionList外层设置了<Row>用栅格形式来设置每个Description的宽度,就成功显示了一行五列

    const colSize = {
      sm: { span: 24 },
      md: { span: 12 },

      xl: { span: 4 },
      xxl: { span: 4 },
    };
                          <Row gutter={4}>
                             <DescriptionList
                                className={styles.descriptionStyle}
                                size="small"
                                col="5"
                              >
                                <Col {...colSize}>
                                  <Description term={intl.get('moveRoute')}>
                                    {item.name}
                                  </Description>
                                </Col>
                                <Col {...colSize}>
                                  <Description term={intl.get('groupNumber1')}>
                                    {item.sendBatchCode}
                                  </Description>
                                </Col>
                                <Col {...colSize}>
                                  <Description term={intl.get('moveOrderAmount')}>
                                    {item.billCodes.length}
                                  </Description>
                                </Col>
                                <Col {...colSize}>
                                  <Description term={intl.get('goodsQuantity')}>
                                    {this.sumCount(item.prodQtys)}
                                  </Description>
                                </Col>
                                <Col {...colSize}>
                                  <Description term={intl.get('spotGoodNo')}>
                                    {item.sptCode[0]}
                                  </Description>
                                </Col>
                              </DescriptionList>
                            </Row>

相关文章

网友评论

      本文标题:antd 设置DescriptionList列数col无效

      本文链接:https://www.haomeiwen.com/subject/doauhktx.html