Introduce.vue 3.65 KB
<template>
  <view class="introduce">
    <!-- 迭代时建议配合接口修改 为数组 -->
	
    <view v-if="Tag.Age && Tag.Age.length !== 0">
      <view>
        年龄:<view
          v-for="(item,index) in Tag.Age"
          :key="index"
        >
          {{item}}<text v-if="index !== Tag.Age.length - 1">/</text>
        </view>
      </view>
    </view>
    <view v-if="Tag.Colour && Tag.Colour.length !== 0">
      <view>
        颜色:<view
          v-for="(item,index) in Tag.Colour"
          :key="index"
        >
          {{item}}<text v-if="index !== Tag.Colour.length - 1">/</text>
        </view>
      </view>
    </view>
    <view v-if="Tag.Shape && Tag.Shape.length !== 0">
      <view>
        脸型:<view
          v-for="(item,index) in Tag.Shape"
          :key="index"
        >
          {{item}}<text v-if="index !== Tag.Shape.length - 1">/</text>
        </view>
      </view>
    </view>
    <view v-if="Tag.Rim && Tag.Rim.length !== 0">
      <view>
        赠品:<view
          v-for="(item,index) in Tag.Rim"
          :key="index"
        >
          {{item}}<text v-if="index !== Tag.Rim.length - 1">/</text>
        </view>
      </view>
    </view>
    <!-- <view v-if="Tag.prod_Tag_insurance && Tag.prod_Tag_insurance.length !== 0">
      <view>
        保险:<view
          v-for="(item,index) in Tag.prod_Tag_insurance"
          :key="index"
        >
          {{item.label}}<text v-if="index !== Tag.prod_Tag_insurance.length - 1">/</text>
        </view>
      </view>
    </view> -->
    <view v-if="Tag.Material && Tag.Material.length !== 0">
      <view>
        材质:<view
          v-for="(item,index) in Tag.Material"
          :key="index"
        >
          {{item}}<text v-if="index !== Tag.Material.length - 1">/</text>
        </view>
      </view>
    </view>
    <!-- <view v-if="Tag.Style && Tag.Style.length !== 0">
      <view>
        个性:<view
          v-for="(item,index) in Tag.Style"
          :key="index"
        >
          {{item}}<text v-if="index !== Tag.Style.length - 1">/</text>
        </view>
      </view>
    </view> -->
    <view v-if="Tag.Eyeglasses && Tag.Eyeglasses.length !== 0">
      <view>
        场景:<view
          v-for="(item,index) in Tag.Eyeglasses"
          :key="index"
        >
          {{item}}<text v-if="index !== Tag.Eyeglasses.length - 1">/</text>
        </view>
      </view>
    </view>
    <view v-if="Tag.Gender && Tag.Gender.length !== 0">
      <view>
        性别:<view
          v-for="(item,index) in Tag.Gender"
          :key="index"
        >
          {{item}}<text v-if="index !== Tag.Gender.length - 1">/</text>
        </view>
      </view>
    </view>
    <!-- <view v-if="Tag.prod_Tag_style && Tag.prod_Tag_style.length !== 0">
      <view>
        风格:<view
          v-for="(item,index) in Tag.prod_Tag_style"
          :key="index"
        >
          {{item.label}}<text v-if="index !== Tag.prod_Tag_style.length - 1">/</text>
        </view>
      </view>
    </view> -->
   
	<view v-if="Tag.Colour && Tag.Colour.length !== 0">
      <view>
        重量:<view
          v-for="(item,index) in Tag.Colour"
          :key="index"
        >
          {{item}}<text v-if="index !== Tag.Colour.length - 1">/</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    Tag: Object,
  },
  created() {
  },
  updated() {
  },
}
</script>

<style lang="scss" scoped>
.introduce {
  margin-bottom: 4px;
  view {
    display: flex;
    align-content: center;
    font-size: 14px;
    color: #333333;
  }
  span {
    margin-left: 6px;
    margin-right: 5px;
    font-family: "PingFangSC-Regular";
  }
}
</style>