<template>
  <view class="choosesizeTop">
      <view :class="select[0]" @click="choose" data-type="1">全部99+</view>
      <view :class="select[1]" @click="choose" data-type="2">晒图43</view>
  </view>
</template>

<script>
export default {
name:"assessTop",
data(){
    return {
        select:['select','selected'],
        leixing:2
    }
},
methods:{
    choose(e){
        this.leixing=e.currentTarget.dataset.type
        if(this.leixing==1){
            this.select=['selected','select']
        }else{
            this.select=['select','selected']
        }
         this.$emit('changes',this.leixing);
    }
}
}
</script>

<style lang="scss">
.choosesizeTop{
    height: 78upx;
    background-color: white;
    border-bottom: 2upx solid #EEEEEE;
    display: flex;
    justify-content: space-around;
        font-size:  26upx;
        text-align: center;
        line-height: 78upx;
    .select{
        width: 116upx;
      color:#999999;
    }
        .selected{
        width: 116upx;
      color:#DD233A;
      border-bottom: 2upx solid #DD233A;
    }
}
</style>