<!-- 商品卡片 -->
<template>
  <div class="goods-card">
    <cr-image width="60px" height="60px" fit="contain" :src="goodsImg" />
    <span>{{ title }}</span>
  </div>
</template>

<script>
export default {
  name: 'GoodsCard',
  props: {
    goodsImg: {
      required: true,
      type: String,
      default: ''
    },
    title: {
      required: true,
      type: String,
      default: ''
    }
  },
  data() {
    return {};
  },
  created() {},
  methods: {}
};
</script>

<style lang="less" scoped>
.goods-card {
  display: flex;
  padding: 20px;
  .cr-image {
    flex-shrink: 0;
  }
  span {
    color: #333;
    font-size: 13px;
    margin-left: 10px;
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 100%;
    line-height: 18px;
  }
}
</style>
