usertab.vue 2.06 KB

<template>
  <div class="user-tab flex">
    <template v-for="(tab, index) in userData">
      <div class="tab-item" :key="index">
        <div class="tab-title">{{ tab.text }}</div>
        <div class="tab-count text-linear">153</div>
        <div class="tab-increase flex-between">
          <div class="increase-text">当年新增</div>
          <div class="increase-count">24</div>
        </div>
      </div>
    </template>
  </div>
</template>

<script>
export default {
  name: 'UserTab',
  data() {
    return {
      userData: [
        {
          text: '用户数',
          value: obj => obj.increnum,
          increase: obj => obj.increnum
        },
        {
          text: '企微客户数',
          value: obj => obj.totalwechatnum,
          increase: obj => obj.increwechatnum
        },
        {
          text: '企微群数',
          value: obj => obj.totalwechatgroupnum,
          increase: obj => obj.increwechatgroupnum
        },
        {
          text: '小程序',
          value: obj => obj.totalappletnum,
          increase: obj => obj.increappletnum
        },
        {
          text: '个微客户数',
          value: obj => obj.totalsinglewechantnum,
          increase: obj => obj.incresinglewechantnum
        }
      ]
    }
  }
}
</script>
<style scoped lang="scss">
.user-tab {
  height: 9.02vh;
  margin: 1.46vh 0 0.98vh 0;
  .tab-item {
    width: 9.65vw;
    height: 9.02vh;
    background: #0b0e31;
    margin-right: 0.28vw;
    padding: 0.28vh 0;
    box-sizing: border-box;
    .tab-title {
      font-weight: 400;
      font-size: 12px;
      color: #e8e8e8;
      margin: 0 0.69vw;
      height: 2.07vh;
    }
    .tab-count {
      font-weight: 700;
      font-size: 22px;
      margin: 0 0.69vw;
      height: 3.8vh;
      line-height: 3.8vh;
    }
    .tab-increase {
      height: 2.44vh;
      border-top: 1px solid #171f60;
      padding: 0 0.69vw;
    }
    .increase-text {
      font-size: 9px;
      color: #dddddd;
    }
    .increase-count {
      font-weight: 700;
      font-size: 12px;
      color: #ffffff;
    }
  }
}
</style>