2.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. }
  68. &:nth-child(5),&:nth-child(10),&:nth-child(15),&:nth-child(20) {
  69. border-bottom: 1px solid #D9D9D9;
  70. margin-bottom: 30px;
  71. }
  72. &:nth-child(20){
  73. margin-bottom: 0;
  74. }
  75. a {
  76. width: 100%;
  77. display: block;
  78. height: 26px;
  79. cursor: pointer;
  80. font-family: Microsoft YaHei, Microsoft YaHei;
  81. font-size: 18px;
  82. color: #333333;
  83. line-height: 26px;
  84. text-align: left;
  85. font-style: normal;
  86. text-transform: none;
  87. span {
  88. float: right;
  89. display: inline-block;
  90. width: 60px;
  91. height: 24px;
  92. line-height: 24px;
  93. }
  94. }
  95. }
  96. }
  97. </style>