美文网首页
element的时间轴展示效果处理

element的时间轴展示效果处理

作者: jesse28 | 来源:发表于2023-02-01 14:05 被阅读0次

效果图:


image.png

<template>
  <div class="material-tabs">
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="操作日志" name="first">
        <div class="tabItem">
          <el-timeline>
            <el-timeline-item v-for="(item, index) in logList" :icon="index==0?'el-icon-time':''"  :key="index" >
              <div style="margin-bottom:15px">
                <span>{{ item.fromStatusName }} :<i style="margin-right:10px;display: inline-block;" class="el-icon-user"></i>{{item.operUserName}}</span>
              </div>
              <div style="line-height:30px">『{{ item.operTypeName }}』 {{ item.operOpinion }}</div>
              <div style="line-height:30px;color:#909399"><i class="el-icon-time" style="margin-right:10px;display: inline-block;"></i>{{ item.createTime }}</div>
            </el-timeline-item>
          </el-timeline>
        </div>
      </el-tab-pane>

    </el-tabs>
  </div>
</template>

<script>
export default {
  name: "LogList",
  props: {
    logList: {
      type: Array,
    },
  },
  data() {
    return {
      activeName: "first",

    };
  },

  methods: {
    handleClick() {},
  },
};
</script>

<style lang="less" scoped>
.material-tabs {
  height: 100%;
  /deep/ .el-tabs__header {
    margin: 0;
    border: none;
  }
  /deep/ .el-tabs__content {
    height: calc(~"80vh - 40px");
    border: 1px solid #dae0e6 !important;
    border-radius: 0 8px 8px 8px;
    background: #fff;
    .el-tab-pane {
      height: calc(~"80vh - 40px");
      overflow-y: auto;
    }
  }
  .tabItem {
    padding: 10px;
    /deep/ .el-timeline-item:nth-of-type(1){
      // font-size: 29px;
      .el-timeline-item__node{
       
      .el-timeline-item__icon{
        font-size:22px;
        background-color: #007fff!important;
        border-radius:50%;
      }
    }
   
 
    }
  }
}
</style>

相关文章

网友评论

      本文标题:element的时间轴展示效果处理

      本文链接:https://www.haomeiwen.com/subject/ypeihdtx.html