recruitList.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. app.component('recruit-list', {
  2. template: `
  3. <div class="recruit-list">
  4. <div class="recruit-item" v-for="item in list" @click="toDetail(item.id)">
  5. <div class="title">
  6. <div class="title-name">{{item.title}}</div>
  7. <div class="salary">
  8. <van-image
  9. width="20px"
  10. src="/static/mobile/images/icon_salary.png"
  11. ></van-image>
  12. <span>{{item.salary}}</span>
  13. </div>
  14. </div>
  15. <div class="content">
  16. <div class="content-item">
  17. <van-image
  18. width="15px"
  19. src="/static/mobile/images/icon_age.png"
  20. ></van-image>
  21. <span>{{item.agegroup}}</span>
  22. </div>
  23. <div class="content-item">
  24. <van-image
  25. width="15px"
  26. src="/static/mobile/images/icon_num.png"
  27. ></van-image>
  28. <span>{{item.num}}</span>
  29. </div>
  30. </div>
  31. <div class="tags">
  32. <van-tag type="primary" size="large" v-for="tag in item.tags">{{tag}}</van-tag>
  33. </div>
  34. <div class="bottom">
  35. <div class="company-name">
  36. {{item.company_name}}
  37. </div>
  38. <div class="volume">
  39. <van-image
  40. width="20px"
  41. src="/static/mobile/images/icon_volume.png"
  42. ></van-image>
  43. <span>{{item.volume}}</span>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. `,
  49. data() {
  50. return {}
  51. },
  52. props: {
  53. list: {
  54. type: Array,
  55. default: [],
  56. },
  57. },
  58. methods: {
  59. toDetail(id) {
  60. this.$emit('detail',id);
  61. },
  62. },
  63. });