ant design vue描述列表设置列宽

这是默认的样子,没有数据时会显得label特别宽

设置列宽为200px后如图所示

方式如下

自定义style

.label .ant-descriptions-item-label{
  width: 200px;
}

给descriptions应用样式

<a-descriptions id="jbxx" class="label" title="基本信息" bordered>
          <a-descriptions-item label="事项说明" :span="3"></a-descriptions-item>
          <a-descriptions-item label="事项类型"></a-descriptions-item>
          <a-descriptions-item label="事项编码"></a-descriptions-item>

如果要设置内容列表宽度

同理加上

.label .ant-descriptions-item-content{
  width: 350px;
}
posted @ 2023-07-19 10:44  buhuo  阅读(3802)  评论(0)    收藏  举报