<template>
  <div class="lose-order">
    <CardTitle :data="data" />
    <div class="content" v-html="remark" />
    <CardFooter :data="data" />
  </div>
</template>

<script>
import CardTitle from "@RecordCard/components/Common/CardTitle/index.vue";
import CardFooter from "@RecordCard/components/Common/CardFooter/index.vue";
export default {
  name: "LoseOrder",
  components: { CardFooter, CardTitle },
  props: {
    data: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      remark: "",
    };
  },
  watch: {
    data: {
      handler(val) {
        const { materials = [] } = val;
        this.remark = materials[0]?.material_name;
      },
      immediate: true,
    },
  },
};
</script>

<style lang="scss" scoped>
.lose-order {
  width: 100%;
  .content {
    @include cardContent(false);
    @include textEllipsis(4);
  }
}
</style>
