details-tab.vue 1.68 KB
Newer Older
1
<!--
786817560's avatar
786817560 committed
2
 * @Description: 详情tab
3
 * @Author: your name
786817560's avatar
786817560 committed
4
 * @Date: 2019-09-25 19:47:59
786817560's avatar
786817560 committed
5
 * @LastEditTime: 2019-09-27 13:33:08
6 7 8 9 10 11
 * @LastEditors: Please set LastEditors
 -->
<template>
  <div class="tab-style">
    <span @click="tabNum = 0;sendTabNum()"><img :src="tabNum == 0?check1:uncheck1"></span>
    <span @click="tabNum = 1;sendTabNum()"><img :src="tabNum == 1?check2:uncheck2" ></span>
786817560's avatar
786817560 committed
12
    <span @click="tabNum = 2;sendTabNum()"><img :src="tabNum == 2?check3:uncheck3"></span>
13 14 15
  </div>
</template>
<script>
786817560's avatar
786817560 committed
16 17 18 19 20 21
import check1 from '@/assets/distributorSign/check1.png'
import check2 from '@/assets/distributorSign/check2.png'
import check3 from '@/assets/distributorSign/guaranteed.png'
import uncheck1 from '@/assets/distributorSign/uncheck1.png'
import uncheck2 from '@/assets/distributorSign/uncheck2.png'
import uncheck3 from '@/assets/distributorSign/guarantee.png'
22 23 24 25 26 27
export default {
  data () {
    return {
      tabNum: 0,
      check1: check1,
      check2: check2,
786817560's avatar
786817560 committed
28
      check3: check3,
29 30
      uncheck1: uncheck1,
      uncheck2: uncheck2,
786817560's avatar
786817560 committed
31
      uncheck3: uncheck3,
32 33 34 35 36 37 38 39 40 41 42
    }
  },
  methods: {
    sendTabNum () {
      this.$emit('getTabNum', this.tabNum)
    },
  },
}
</script>
<style lang="less" scoped>
.tab-style{
786817560's avatar
786817560 committed
43 44 45
    position: relative;
    z-index: 50;
    background-color: #fff;
786817560's avatar
786817560 committed
46
    display:flex;
786817560's avatar
786817560 committed
47
    justify-content: center;
48 49 50
    padding-top:12px;
    padding-bottom: 8px;
    align-items: center;
786817560's avatar
786817560 committed
51
    box-shadow:0 2px 3px 0  rgba(220,220,221,0.50);
52 53
    span{
        display: block;
786817560's avatar
786817560 committed
54
        width:112px;
55 56 57 58
        height: 32px;
        border-radius:16px;
    }
    img{
786817560's avatar
786817560 committed
59
        width:112px;
60
        height: 32px;
786817560's avatar
786817560 committed
61
        margin-right:5.7px;
62 63
    }
    span:nth-of-type(2){
786817560's avatar
786817560 committed
64
        margin:0 10px;
65 66 67
    }
}
</style>