HeadNotice.vue 751 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div :class="classes">
  3. <h4>注意事项:</h4>
  4. <div v-for="(cont, index) in notices" :key="index" class="head-notice-cont">
  5. <span>{{ index + 1 }}、</span>
  6. <span>{{ cont }}</span>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. name: "HeadNotice",
  13. props: {
  14. data: {
  15. type: Object,
  16. default() {
  17. return {};
  18. },
  19. },
  20. },
  21. data() {
  22. return {};
  23. },
  24. computed: {
  25. classes() {
  26. return [
  27. "head-notice",
  28. "card-head-body-spin",
  29. {
  30. "head-notice-exam-number-fill": this.data.examNumberStyle === "fill",
  31. },
  32. ];
  33. },
  34. notices() {
  35. return this.data.attention.split("\n") || [];
  36. },
  37. },
  38. methods: {},
  39. };
  40. </script>