promotion.vue 810 Bytes
<template>
<div class="coupon-wrapper" @click="onClick">
  <div class="title">促销<span class="desc">{{data.title}}</span></div>
  <div><span class="red">{{data.amount}}</span><i class="iconfont iconright"></i></div>
</div>
</template>

<script>
export default {
  name: 'OrderPromotion',
  props: {
    data: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  methods: {
    onClick() {
      this.$emit('click');
    }
  }
};
</script>

<style lang="scss" scoped>
.coupon-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title {
  font-size: 32px;
  display: flex;
  align-items: center;
}

.desc {
  font-size: 24px;
  color: #3f3f3f;
  margin-left: 10px;
}

.red {
  color: #d0021b;
  font-size: 28px;
  margin-right: 10px;
}

</style>