Skip to content
目录

Descriptions组件

案例

基础用法

vue
<template>
  <ws-descriptions title="用户信息">
    <ws-descriptions-item  label="姓名">张三</ws-descriptions-item>
    <ws-descriptions-item  label="年龄">18</ws-descriptions-item>
    <ws-descriptions-item  label="电话">13612345678</ws-descriptions-item>
    <ws-descriptions-item  label="地址">广东省深圳市宝安区</ws-descriptions-item>
  </ws-descriptions>
</template>

内容使用插槽

2.11.2 版本支持

vue
<template>
  <ws-descriptions title="用户信息">
    <ws-descriptions-item  label="姓名">张三</ws-descriptions-item>
    <ws-descriptions-item  label="年龄">18</ws-descriptions-item>
    <ws-descriptions-item  label="电话">13612345678</ws-descriptions-item>
    <ws-descriptions-item  label="地址">
      <template #content>
        <div>
          这块内容可以自己定制,但是,样式需要自己维护,比如右边框和下边框
        </div>
      </template>
    </ws-descriptions-item>
  </ws-descriptions>
</template>

descriptions 属性

对应 ws-descriptions 组件

参数说明类型默认值
title标题String-
alignlabel对齐方式Stringright
showToggle是否显示展开收起Booleantrue
border是否展示边框Booleantrue
backgroundlabel背景颜色String#f5f7fa
labelWidthlabel宽度String150px

descriptions 插槽

对应 ws-descriptions 组件

name说明
title自定义标题
extra自定义头部右侧

Item props

对应 ws-descriptions-item 组件

参数说明类型默认值
labellabel名称String-
showTip是否展示tooltip(内容过长时建议开启)Booleanright

Item 插槽

对应 ws-descriptions-item 组件

name说明版本
content自定义右侧内容2.11.2支持