vue实现打标记录

项目需要的效果如下图:

 

实现代码:

<template>
  <div class="step-template">
    <div class="step" v-for="item in 12" :key="item">
      <div class="step-l">
        <p class="time">2021-08-01 12:09:11</p>
        <p class="name">张大炮</p>
      </div>
      <div class="step-r">
        <p class="tag">新增标签:【吞噬异物】(手动录入)</p>
        <p class="desc">说明:在押人员张大炮</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'personAction',
  props: {
    actionData: {
      type: Array
    }
  },
  data () {
    return {

    }
  }
}
</script>

<style lang="less" scoped>
.step-template {
  width: 600px;
  background: chartreuse;
  .step {
    display: flex;
    padding-bottom: 12px;
    font-size: 14px;
    position: relative;
    &:before {
      content: "";
      width: 1px;
      top: 4px;
      left: 50%;
      height: 100%;
      background: #ccc;
      position: absolute;
      z-index: 2;
    }
    &:after {
      content: "";
      width: 9px;
      height: 9px;
      top: 4px;
      left: ~"calc(50% - 4px)";
      background: #2080f7;
      position: absolute;
      z-index: 3;
      border-radius: 50%;
    }
    &:nth-child(3n + 2) {
      &::after {
        background: #ff0000;
      }
    }
    &:nth-child(3n + 1) {
      &::after {
        background: green;
      }
    }
    & > div {
      width: 50%;
      box-sizing: border-box;
    }
    &-l {
      text-align: right;
      padding-right: 20px;
      .time {
        color: #999;
      }
      .name {
        color: #4c4c4c;
        margin-top: 10px;
      }
    }
    &-r {
      padding-left: 20px;
      .tag {
        color: #4c4c4c;
      }
      .desc {
        margin-top: 10px;
        color: #999;
      }
    }
  }
}
</style>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值