<template>
  <div class="home-goods-item-con">
    <div
      class="m-icon thumb"
      :style="`backgroundImage:url(${itemData.thumb})`"
    />
    <div class="title">
      {{ itemData.name }}
    </div>
    <div class="price flex-default">
      <div class="new-price">
        <span class="yen">￥</span>{{ itemData.defaultPrice || 0 }}
      </div>
      <!-- <div class="old-price">
        <span class="yen">￥</span>{{ itemData.defaultPrice || 0 }}
      </div> -->
    </div>
  </div>
</template>

<script>
export default {
  props: {
    itemData: Object,
  },
  data() {
    return {};
  },
  methods: {},
};
</script>

<style lang="less">
.home-goods-item-con {
  width: 101px;
  height: 150px;
  margin-bottom: 15px;
  overflow: hidden;
  border-radius: 6px;
  background-color: #ffffff;
  .thumb {
    height: 90px;
    width: 101px;
    background-size: contain;
    background-position: center;
    margin: 0 auto 5px;
  }
  .title {
    font-size: 11px;
    color: #222222;
    line-height: 16px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-bottom: 3px;
    text-align: center;
  }
  .price {
    justify-content: center;
    align-items: flex-end;
    font-family: PingFangSC-Regular, sans-serif;
    .new-price {
      font-size: 14px;
      color: #F78706;
      font-weight: bold;
      line-height: 17px;
      .yen {
        display: inline-block;
        font-size: 12px;
        transform: scale(0.7);
        font-weight: normal;
        width: 17px;
      }
    }
    .old-price {
      font-size: 12px;
      color: #aeaeae;
      height: 12px;
      text-decoration: line-through;
      line-height: 12px;
      transform: scale(0.8);
      transform-origin: 50% 0;
      .yen {
        display: inline-block;
        width: 8px;
      }
    }
  }
}
</style>
