【无标题】

el-steps elementui 步骤条组件

修改el-steps样式,使步骤条的左右两侧都显示内容

      <div>
        <el-steps direction="vertical"> // vertical 代表竖形显示
          <el-step v-for="(item, index) in detail" :key="index" description="">
            <template slot="icon"> // 每个步骤左侧显示的图标
              <img :src="panoramaTitle2" style="width: 16px; height:16px">
            </template>
            <template slot="description"> // 每个步骤右侧显示的所有内容
              <div style="position:relative;">
                <div style="position:absolute; left: -90px; top: 0;color:#333333;font-size:14px;">
                  <div>{{ item.timeYear }}</div>// 显示的内容的标题1
                </div>
                <div style="position:absolute; left: 0px; top: 0;color:#999999;font-size:14px;">
                  <div>{{ item.timeDate }}</div>// 显示的内容的标题2
                </div>
                <div style="min-height:100px; padding-top: 30px;" :style="{'margin-right': index + 1 === detail.logs.length ? '10%' : ''}">
                  <div style="padding:10px 20px;box-sizing: border-box;background-color:#f2f6ff; border-radius:4px;color:#666666;font-size:14px;"> // 显示的主内容
                    {{ item.creatorName + ':' + ' ' + item.content }}
                  </div>
                </div>
              </div>
            </template>
          </el-step>
        </el-steps>
      </div>
 <script>
export default {
  data() {
    return {
      detail: [
        { "id": "1", "content": "新增了一条合同记录", "creatorName": "系统管理员", "timeYear": "2023年", "timeDate": "04-11 09:31" },
        { "id": "2", "content": "新增了一条合同记录", "creatorName": "系统管理员", "timeYear": "2023年", "timeDate": "04-12 13:49" },
      ], // 需要循环显示的数据
    };
  },
};
</script>

效果:
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值