ImportantItems.vue 1022 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!--
  2. * @Author: your name
  3. * @Date: 2021-10-26 17:34:46
  4. * @LastEditTime: 2021-11-30 08:57:24
  5. * @LastEditors: Please set LastEditors
  6. * @Description: 重要指标
  7. * @FilePath: \hyyfScreen\src\views\Production\board\ImportantItems.vue
  8. -->
  9. <template>
  10. <div class="important-items">
  11. <div class="item" v-for="item in data" :key="item.id">
  12. <div class="name">{{ item.name }}</div>
  13. <div class="num">{{ item.num }}</div>
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. export default {
  19. props: {
  20. data: {
  21. type: Array,
  22. default: () => [],
  23. },
  24. },
  25. };
  26. </script>
  27. <style scoped>
  28. .important-items {
  29. margin: 0 auto;
  30. width: 95%;
  31. height: 100%;
  32. display: flex;
  33. flex-wrap: wrap;
  34. justify-content: space-between;
  35. }
  36. .item {
  37. width: 30%;
  38. background: url("../../../assets/BioSafety/base.jpg") no-repeat;
  39. height: 70px;
  40. background-size: 100% 100%;
  41. margin-top: 30px;
  42. color: #fff;
  43. }
  44. .name {
  45. margin: 10px 0 0 10px;
  46. font-size: 15px;
  47. }
  48. .num {
  49. font-size: 20px;
  50. text-align: center;
  51. }
  52. </style>