1.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div class="listNewsTitle" v-if="skinId==1">
  3. 本网招聘
  4. </div>
  5. <ul class="list">
  6. <div class="listNewsTitle_skin2" v-if="skinId==2">
  7. <span>本网招聘</span>
  8. </div>
  9. <li v-for="(item, index) in newsList" :key="index">
  10. <NuxtLink :to="{ path: `zhaopin/${item.id}.html` }" :title="item.con_title">
  11. {{getTitleLength(item.con_title,50)}}
  12. <span>{{ getTime(item.updated_at,'month',1) }}</span>
  13. </NuxtLink>
  14. </li>
  15. </ul>
  16. </template>
  17. <script setup>
  18. const props = defineProps({
  19. skinId: Number,//皮肤id
  20. newsList: Array,//模板数据
  21. });
  22. </script>
  23. <style lang="less" scoped>
  24. //样式1
  25. .listNewsTitle {
  26. font-size: 22px;
  27. font-weight: bold;
  28. height: 44px;
  29. border-bottom: 2px solid #004564;
  30. color: #004564;
  31. box-sizing: border-box;
  32. margin-top: 28px;
  33. margin-bottom: 30px;
  34. }
  35. //样式2
  36. .listNewsTitle_skin2 {
  37. font-size: 22px;
  38. font-weight: bold;
  39. height: 44px;
  40. border-bottom: 2px solid #A91B33;
  41. color: #A91B33;
  42. box-sizing: border-box;
  43. margin-top: 28px;
  44. margin-bottom: 30px;
  45. span {
  46. border-left: 3px solid #A91B33;
  47. padding-left: 12px;
  48. display: inline-block;
  49. height: 25px;
  50. line-height: 25px;
  51. }
  52. }
  53. //列表
  54. .list {
  55. margin-bottom: 30px;
  56. padding-bottom: 10px;
  57. margin-top: 10px;
  58. li {
  59. width: 100%;
  60. height: 60px;
  61. white-space: nowrap;
  62. overflow: hidden;
  63. text-overflow: ellipsis;
  64. line-height: 60px;
  65. &:nth-child(1),&:nth-child(6),&:nth-child(11),&:nth-child(16) {
  66. font-size: 18px;
  67. font-weight: bold;
  68. }
  69. &:nth-child(5),&:nth-child(10),&:nth-child(15),&:nth-child(20) {
  70. border-bottom: 1px solid #D9D9D9;
  71. margin-bottom: 30px;
  72. }
  73. &:nth-child(20){
  74. margin-bottom: 0;
  75. }
  76. a {
  77. width: 100%;
  78. display: block;
  79. height: 26px;
  80. cursor: pointer;
  81. font-family: Microsoft YaHei, Microsoft YaHei;
  82. font-size: 18px;
  83. color: #333333;
  84. line-height: 26px;
  85. text-align: left;
  86. font-style: normal;
  87. text-transform: none;
  88. span {
  89. float: right;
  90. display: inline-block;
  91. width: 60px;
  92. height: 24px;
  93. line-height: 24px;
  94. }
  95. }
  96. }
  97. }
  98. </style>