similarPositions.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <div class="position-box">
  3. <h4 class="mb-3">相似职位</h4>
  4. <div v-for="(item, index) in props.list" :key="index" class="mb-2 cursor-pointer">
  5. <p class="recruit-name">{{ item.name }}</p>
  6. <span class="recruit-salary">{{ item.payFrom }}-{{ item.payTo }}/{{ item.payName }}</span>
  7. <div :class="['enterprise', {'border-bottom-dashed': index !== list.length - 1}]">
  8. <v-img class="float-left" :src="item.logoUrl" :width="30" :height="30"></v-img>
  9. <span class="float-left enterprise-name">{{ item.anotherName }}</span>
  10. <span class="float-right enterprise-address">{{ item.areaName }}</span>
  11. </div>
  12. </div>
  13. <div class="text-center more-btn">
  14. <v-btn color="primary" variant="outlined" class="buttons">查看全部职位</v-btn>
  15. </div>
  16. </div>
  17. </template>
  18. <script setup name="similarPositions">
  19. const props = defineProps({
  20. list: {
  21. type: Array,
  22. default: () => []
  23. }
  24. })
  25. </script>
  26. <style lang="scss" scoped>
  27. .position-box {
  28. position: relative;
  29. height: 430px;
  30. background-color: #f3f3f3;
  31. border-radius: 8px;
  32. padding: 20px 15px;
  33. }
  34. .recruit-name {
  35. width: 95px;
  36. font-weight: 500;
  37. display: inline-block;
  38. max-width: 95px;
  39. vertical-align: middle;
  40. white-space: nowrap;
  41. text-overflow: ellipsis;
  42. overflow: hidden;
  43. &:hover {
  44. color: var(--v-primary-base);
  45. }
  46. }
  47. .recruit-salary {
  48. float: right;
  49. color: var(--v-error-base);
  50. font-weight: 500;
  51. height: auto;
  52. vertical-align: sub;
  53. }
  54. .enterprise {
  55. height: 40px;
  56. line-height: 30px;
  57. margin-top: 8px;
  58. }
  59. .enterprise-name {
  60. width: 120px;
  61. display: inline-block;
  62. max-width: 120px;
  63. vertical-align: middle;
  64. white-space: nowrap;
  65. text-overflow: ellipsis;
  66. overflow: hidden;
  67. color: #666;
  68. font-size: 13px;
  69. margin-left: 5px;
  70. &:hover {
  71. color: var(--v-primary-base);
  72. }
  73. }
  74. .enterprise-address {
  75. color: #555;
  76. font-size: 13px;
  77. }
  78. .more-btn {
  79. position: absolute;
  80. bottom: 18px;
  81. }
  82. </style>