antd 设置DescriptionList列数col无效

2020-07-16  本文已影响0人  小二二二7

今天设置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>
上一篇 下一篇

猜你喜欢

热点阅读