item.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <div class="position-box">
  3. <div class="sub-li" v-for="(item, index) in list" :key="index">
  4. <div class="job-info">
  5. <div class="sub-li-top">
  6. <div class="sub-li-info">
  7. <p class="name">{{ item.recruitName }}</p>
  8. <v-chip size="x-small" color="error" label variant="outlined" class="mr-1">急聘</v-chip>
  9. <v-chip size="x-small" color="warning" label variant="outlined">NEW</v-chip>
  10. </div>
  11. <p class="salary">{{ item.salary }}</p>
  12. </div>
  13. <v-chip size="x-small" label v-for="(k, i) in item.welfareList" :key="i" class="mr-1" color="#666">{{ k }}</v-chip>
  14. </div>
  15. <div class="sub-li-bottom">
  16. <div class="user-info">
  17. <div class="d-flex align-center">
  18. <v-img :src="item.company.headImg" width="40" style="height: 40px;" />
  19. <span class="names ml-2" style="font-size: 14px">{{ item.company.enterpriseName }}</span>
  20. </div>
  21. <p class="names float-right">
  22. <span>{{ item.company.industry }}</span>
  23. <span class="vline"></span>
  24. <span>{{ item.company.scale }}</span>
  25. </p>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </template>
  31. <script setup>
  32. defineOptions({ name: 'position-card-item' })
  33. const list = [
  34. {
  35. recruitName: '产品经理',
  36. salary: '6-11k',
  37. welfareList: ['广州','本科','1-3年'],
  38. company: {
  39. headImg: 'https://img.bosszhipin.com/beijin/mcs/banner/06123cabdf75ed08313530ec8a42aef2cfcd208495d565ef66e7dff9f98764da.jpg',
  40. enterpriseName: '卓越教育',
  41. industry: '互联网行业',
  42. scale: '0-20人'
  43. }
  44. },
  45. {
  46. recruitName: '产品经理',
  47. salary: '6-11k',
  48. welfareList: ['广州','本科','1-3年'],
  49. company: {
  50. headImg: 'https://img.bosszhipin.com/beijin/mcs/banner/06123cabdf75ed08313530ec8a42aef2cfcd208495d565ef66e7dff9f98764da.jpg',
  51. enterpriseName: '卓越教育',
  52. industry: '互联网行业',
  53. scale: '0-20人'
  54. }
  55. },
  56. {
  57. recruitName: '产品经理',
  58. salary: '6-11k',
  59. welfareList: ['广州','本科','1-3年'],
  60. company: {
  61. headImg: 'https://img.bosszhipin.com/beijin/mcs/banner/06123cabdf75ed08313530ec8a42aef2cfcd208495d565ef66e7dff9f98764da.jpg',
  62. enterpriseName: '卓越教育',
  63. industry: '互联网行业',
  64. scale: '0-20人'
  65. }
  66. },
  67. {
  68. recruitName: '产品经理',
  69. salary: '6-11k',
  70. welfareList: ['广州','本科','1-3年'],
  71. company: {
  72. headImg: 'https://img.bosszhipin.com/beijin/mcs/banner/06123cabdf75ed08313530ec8a42aef2cfcd208495d565ef66e7dff9f98764da.jpg',
  73. enterpriseName: '卓越教育',
  74. industry: '互联网行业',
  75. scale: '0-20人'
  76. }
  77. }
  78. ]
  79. </script>
  80. <style lang="scss" scoped>
  81. .position-box {
  82. display: flex;
  83. flex-wrap: wrap;
  84. }
  85. .sub-li {
  86. width: calc((100% - 24px) / 3);
  87. min-width: calc((100% - 24px) / 3);
  88. max-width: calc((100% - 24px) / 3);
  89. margin: 0 12px 12px 0;
  90. height: 150px;
  91. border-radius: 12px;
  92. padding: 0;
  93. overflow: hidden;
  94. cursor: pointer;
  95. transition: all .2s linear;
  96. background-color: #fff;
  97. &:nth-child(3n) {
  98. margin-right: 0;
  99. }
  100. &:hover {
  101. box-shadow: 0 16px 40px 0 rgba(153, 153, 153, .3);
  102. }
  103. }
  104. .job-info {
  105. padding: 16px 20px;
  106. }
  107. .sub-li-top {
  108. display: flex;
  109. width: 100%;
  110. align-items: center;
  111. margin-bottom: 12px;
  112. }
  113. .sub-li-info {
  114. display: flex;
  115. align-items: center;
  116. flex-wrap: wrap;
  117. height: 22px;
  118. overflow: hidden;
  119. flex: 1;
  120. }
  121. .salary {
  122. font-size: 16px;
  123. font-weight: 700;
  124. color: #fe574a;
  125. line-height: 22px;
  126. flex: none;
  127. }
  128. .job-text {
  129. white-space: normal;
  130. padding-right: 0;
  131. height: 22px;
  132. line-height: 22px;
  133. overflow: hidden;
  134. word-break: break-all;
  135. max-width: none;
  136. }
  137. .sub-li-info .name {
  138. position: relative;
  139. max-width: 200px;
  140. margin-right: 8px;
  141. overflow: hidden;
  142. text-overflow: ellipsis;
  143. white-space: nowrap;
  144. font-weight: 600;
  145. &:hover {
  146. color: var(--v-primary-base);
  147. }
  148. }
  149. .sub-li-bottom {
  150. background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
  151. margin-top: 0;
  152. padding-top: 0;
  153. display: block;
  154. border: none;
  155. }
  156. .user-info {
  157. display: flex;
  158. padding: 12px 20px;
  159. align-items: center;
  160. justify-content: space-between;
  161. }
  162. .names {
  163. color: #666;
  164. font-size: 13px;
  165. }
  166. .vline {
  167. display: inline-block;
  168. width: 1px;
  169. height: 10px;
  170. vertical-align: middle;
  171. background-color: #e0e0e0;
  172. margin: 0 10px;
  173. }
  174. </style>