el-descriptions 跨列和相关样式

<template>
  <div class="descript">
    <el-descriptions
      :title="'项目名称: ' + `${title}`"
      :column="3"
      border
      :contentStyle="CS"
      :label-style="LS"
    >
      <template slot="extra">
        <el-button type="primary" size="small" plain>团队成员</el-button>
        <el-button type="primary" size="small" plain>日报/周报</el-button>
        <el-button type="primary" size="small" plain>工时填报</el-button>
      </template>
      <el-descriptions-item :span="3">
        <template slot="label">
          <div>项目介绍</div>
        </template>
        <div>
          包含城市运行管理中心建设硬件、“一网统管”城市运行管理基础平台、“一网统管”城市专题、大数据管理平台、人工智能管理平台、技术管理平台、车联网试点、标准规范体系等建设
        </div>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 项目总监 </template>
        张三
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 计划成本 </template>
        83 万元
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">剩余成本 </template>
        818000 元
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 计划天数 </template>
        2738 天
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 剩余天数 </template>
        2723 天
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 合同签订时间 </template>
        2022-08-18
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 总监部门 </template>
        管理服务中心
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 商务代表 </template>
        里斯
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 当前进度 </template>
        <el-progress :percentage="50" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 项目编号 </template>
        23-KP-009
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 委托方 </template>
        洪山区大数据中心
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 承建方 </template>
        <div>长江云通有限公司、湖南省邮电规划设计院有限公司联合体</div>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 服务工期 </template>
        3年
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script>
export default {
  data() {
    return {
      title: '智慧新青山(一期)城市运行管理平台项目',
      CS: {
        // 'text-align': 'center', //文本居中
        'min-width': '250px' //最小宽度
        // 'word-break': 'break-all' //过长时自动换行
      },
      LS: {
        // color: '#000',
        'text-align': 'center',
        'font-weight': '600',
        // height: '40px',
        // 'background-color': 'rgba(255, 97, 2, 0.1)',
        'min-width': '110px',
        'word-break': 'keep-all'
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.descript {
  margin: 20px;
}

::v-deep .el-descriptions__header {
  margin-bottom: 12px;
}
::v-deep .el-descriptions__title {
  color: rgb(0, 175, 255);
  font: 16px 微软雅黑 !important;
}
</style>

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
El-Descriptions并没有直接提供合并的功能,但可以通过自定义样式来实现合并的效果。可以使用`row`属性来定义每个描述项的行数,然后使用自定义的CSS样式来设置合并的效果。例如,可以给合并的添加一个`row`属性,使其占据多行,并使用CSS样式来实现合并效果。以下是一个示例代码: ```html <el-descriptions :column="2" style="width: 400px;"> <el-descriptions-item label="姓名"></el-descriptions-item> <el-descriptions-item label="年龄"></el-descriptions-item> <el-descriptions-item label="地址"></el-descriptions-item> <el-descriptions-item label="性别" :row="2"></el-descriptions-item> <el-descriptions-item label="职业"></el-descriptions-item> </el-descriptions> ``` 使用`row`属性来指定合并的行数,这样就可以实现合并的效果。在上面的示例中,"性别"设置了`row`属性为2,表示该需要合并两行。通过自定义CSS样式,可以将该的合并行数设置为2,达到合并的效果。 希望这个方法可以帮助到你。<span class="em">1</span><span class="em">2</span> #### 引用[.reference_title] - *1* *2* [el-table表格操作合并行](https://blog.csdn.net/weixin_42342065/article/details/121074590)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值