<template>
  <div :class="classes">
    <h4>注意事项：</h4>
    <div class="head-notice-cont" v-for="(cont, index) in notices" :key="index">
      <span>{{ index + 1 }}、</span>
      <span>{{ cont }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "head-notice",
  props: {
    data: {
      type: Object,
    },
  },
  data() {
    return {};
  },
  computed: {
    classes() {
      return [
        "head-notice",
        "card-head-body-spin",
        {
          "head-notice-exam-number-fill": this.data.examNumberStyle === "fill",
        },
      ];
    },
    notices() {
      const conts = this.data.attention.split("\n") || [];
      return conts.map((item) => item.trim()).filter((item) => !!item);
    },
  },
  methods: {},
};
</script>
