TestMenu.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="test-menu-wrapper">
  3. <div class="test-menu-item-wrapper">
  4. <div class="test-menu-item" v-for="(item,index) in testTypeList" :key="item.code" v-if="index<8">
  5. <img src="../../assets/img/testType.png" alt="testType" class="test-menu-item-img">
  6. {{item.name}}
  7. </div>
  8. <div class="more-test-wrapper">
  9. <i class="el-icon-arrow-right more-test"></i>更多分类
  10. </div>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: "TestMenu",
  17. props:['testTypeList'],
  18. data() {
  19. return {
  20. }
  21. }
  22. }
  23. </script>
  24. <style scoped lang="less">
  25. .test-menu-wrapper {
  26. background: rgba(255, 255, 255, 1);
  27. box-shadow: 0px 4px 30px 0px rgba(8, 6, 6, 0.08);
  28. padding: 15px 20px;
  29. margin-bottom: 15px;
  30. display: flex;
  31. .test-menu-item-wrapper {
  32. display: flex;
  33. width: 100%;
  34. justify-content: space-between;
  35. .test-menu-item {
  36. font-size: 14px;
  37. font-family:Source Han Sans CN;
  38. font-weight:400;
  39. color:rgba(0,0,0,1);
  40. .test-menu-item-img {
  41. width: 46px;
  42. height: 46px;
  43. background: rgba(231, 239, 247, 1);
  44. border-radius: 50%;
  45. padding: 6px;
  46. display: block;
  47. margin: 0 auto;
  48. margin-bottom: 5px;
  49. }
  50. }
  51. }
  52. .more-test-wrapper {
  53. display: block;
  54. .more-test {
  55. width: 20px;
  56. height: 20px;
  57. background: #0076cb;
  58. border-radius: 50%;
  59. color: white;
  60. padding: 5px;
  61. font-size: 20px;
  62. display: block;
  63. margin: 14px auto;
  64. }
  65. }
  66. }
  67. </style>