listRight.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <div id="listRight">
  3. <el-row>
  4. <el-col :span="24" class="listRight">
  5. <el-col :span="24" class="topInfo">
  6. <el-col :span="12" class="top">
  7. <p><i class="el-icon-document"></i>{{ title }}</p>
  8. </el-col>
  9. <el-col :span="12" class="bread">
  10. <el-breadcrumb separator-class="el-icon-arrow-right">
  11. <el-breadcrumb-item :to="{ path: '/' }">网站首页</el-breadcrumb-item>
  12. <el-breadcrumb-item>信息列表</el-breadcrumb-item>
  13. </el-breadcrumb>
  14. </el-col>
  15. </el-col>
  16. <el-col :span="24" class="list">
  17. <el-col :span="24" class="rightList" v-for="(item, index) in rightList" :key="index">
  18. <el-col :span="24">
  19. <el-col :span="20" class="title">
  20. <p class="textOver"><span class="dian"></span>{{ item.title }}</p>
  21. </el-col>
  22. <el-col :span="4" class="date">{{ item.date }}</el-col>
  23. </el-col>
  24. <el-col :span="20" class="content">
  25. <p>{{ item.content }}</p>
  26. </el-col>
  27. </el-col>
  28. </el-col>
  29. </el-col>
  30. <el-col :span="24" class="page">
  31. <el-pagination
  32. @size-change="handleSizeChange"
  33. @current-change="handleCurrentChange"
  34. :current-page="currentPage4"
  35. :page-size="8"
  36. layout="total, prev, pager, next, jumper"
  37. :total="1"
  38. >
  39. </el-pagination>
  40. </el-col>
  41. </el-row>
  42. </div>
  43. </template>
  44. <script>
  45. export default {
  46. name: 'listRight',
  47. props: {
  48. rightList: null,
  49. },
  50. components: {},
  51. data: () => ({
  52. title: '就业动态',
  53. currentPage4: 1,
  54. }),
  55. created() {},
  56. computed: {},
  57. methods: {
  58. handleSizeChange(val) {
  59. console.log(`每页 ${val} 条`);
  60. },
  61. handleCurrentChange(val) {
  62. console.log(`当前页: ${val}`);
  63. },
  64. },
  65. };
  66. </script>
  67. <style lang="less" scoped>
  68. p {
  69. padding: 0;
  70. margin: 0;
  71. }
  72. .textOver {
  73. overflow: hidden;
  74. text-overflow: ellipsis;
  75. white-space: nowrap;
  76. }
  77. .listRight {
  78. height: 930px;
  79. border-left: 1px solid #0457c7;
  80. }
  81. .topInfo {
  82. height: 47px;
  83. line-height: 47px;
  84. }
  85. .top {
  86. padding: 0 10px;
  87. }
  88. .top p {
  89. font-size: 24px;
  90. color: #0874ee;
  91. }
  92. .bread {
  93. padding: 16px 0px 16px 220px;
  94. }
  95. .dian {
  96. display: inline-block;
  97. width: 4px;
  98. height: 4px;
  99. background-color: #4f4f4f;
  100. border-radius: 90px;
  101. margin: 5px 8px;
  102. }
  103. .list {
  104. padding: 0 10px;
  105. height: 883px;
  106. overflow: hidden;
  107. }
  108. .rightList {
  109. height: 110px;
  110. border-bottom: 1px dashed #ccc;
  111. }
  112. .rightList .title {
  113. padding: 10px 0;
  114. }
  115. .rightList .title p {
  116. font-size: 16px;
  117. color: #4f4f4f;
  118. }
  119. .rightList .date {
  120. font-size: 14px;
  121. color: #323131;
  122. text-align: right;
  123. padding: 10px 0;
  124. }
  125. .content {
  126. padding: 0 20px;
  127. }
  128. .content p {
  129. font-size: 14px;
  130. color: #323131;
  131. line-height: 25px;
  132. overflow: hidden;
  133. text-overflow: ellipsis;
  134. -webkit-line-clamp: 2;
  135. word-break: break-all;
  136. display: -webkit-box;
  137. -webkit-box-orient: vertical;
  138. }
  139. .rightList:hover .title p {
  140. color: #0874ee;
  141. cursor: pointer;
  142. }
  143. .page {
  144. padding: 51px 0px;
  145. text-align: center;
  146. }
  147. </style>