cause.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <div id="cause">
  3. <el-row>
  4. <el-col :span="24">
  5. <el-tabs v-model="activeName" type="border-card">
  6. <el-tab-pane v-for="(item, index) in enterList" :key="index">
  7. <span slot="label">{{ item.title }}</span>
  8. <el-col :span="24" v-for="(tag, index) in item.children" :key="index" class="enterList">
  9. <el-col :span="20" class="title textOver">
  10. <el-link :underline="false" @click="$router.push({ path: `/info/detail?id=${tag.id}` })">{{ tag.title }} </el-link>
  11. </el-col>
  12. <el-col :span="4" class="time">
  13. {{ tag.publish_time }}
  14. </el-col>
  15. </el-col>
  16. </el-tab-pane>
  17. </el-tabs>
  18. <el-link :inderline="false" class="moreLink" :style="`color:${Color}`" @click="moreClick()">MORE<i class="el-icon-video-play"></i> </el-link>
  19. </el-col>
  20. </el-row>
  21. </div>
  22. </template>
  23. <script>
  24. export default {
  25. name: 'cause',
  26. props: {
  27. enterList: null,
  28. },
  29. components: {},
  30. data: () => ({
  31. activeName: '',
  32. Color: '#850000',
  33. }),
  34. created() {},
  35. computed: {},
  36. methods: {
  37. moreClick() {
  38. this.$router.push({ path: `/info/list/${this.enterList[this.activeName].id}` });
  39. },
  40. },
  41. };
  42. </script>
  43. <style lang="less" scoped>
  44. .moreLink {
  45. position: absolute;
  46. top: 10px;
  47. right: 10px;
  48. color: #850000;
  49. }
  50. /deep/.el-tabs__header {
  51. margin: 0;
  52. }
  53. /deep/.el-tabs--border-card > .el-tabs__content {
  54. padding: 0;
  55. }
  56. .talksList {
  57. padding: 12px 10px;
  58. border-bottom: 1px dashed #ccc;
  59. }
  60. .talksList .title .el-link {
  61. font-size: 18px;
  62. }
  63. .textOver {
  64. overflow: hidden;
  65. text-overflow: ellipsis;
  66. white-space: nowrap;
  67. }
  68. .enterList {
  69. padding: 10px;
  70. border-bottom: 1px dashed #ccc;
  71. }
  72. .enterList .title .el-link {
  73. font-size: 18px;
  74. }
  75. .enterList .time {
  76. font-size: 18px;
  77. text-align: right;
  78. }
  79. .teacherList {
  80. padding: 10px;
  81. border-bottom: 1px dashed #ccc;
  82. }
  83. .teacherList .title .el-link {
  84. font-size: 18px;
  85. }
  86. .teacherList .time {
  87. font-size: 18px;
  88. text-align: right;
  89. }
  90. </style>