index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="style">
  5. <el-col :span="24" class="top">
  6. 头部
  7. </el-col>
  8. <el-col :span="24" class="banner">
  9. <div class="w_1200">
  10. logo
  11. </div>
  12. </el-col>
  13. <el-col :span="24" class="menu">
  14. <div class="w_1200">
  15. 菜单
  16. </div>
  17. </el-col>
  18. <el-col :span="24" class="main">
  19. <div class="w_1200">
  20. <el-col :span="5" class="left">
  21. <newsQuestion></newsQuestion>
  22. </el-col>
  23. <el-col :span="18" class="right">
  24. <infoList :oneList="oneList" :twoList="twoList" :threeList="threeList"></infoList>
  25. </el-col>
  26. </div>
  27. </el-col>
  28. <el-col :span="24" class="foot">
  29. <div class="w_1200">
  30. 底部
  31. </div>
  32. </el-col>
  33. </el-col>
  34. </el-row>
  35. </div>
  36. </template>
  37. <script>
  38. import newsQuestion from '@/layout/news/newsQuestion.vue';
  39. import infoList from '@/layout/news/infoList.vue';
  40. import { mapState, createNamespacedHelpers } from 'vuex';
  41. export default {
  42. name: 'index',
  43. props: {},
  44. components: {
  45. newsQuestion,
  46. infoList,
  47. },
  48. data: function() {
  49. return {
  50. oneList: [
  51. {
  52. title: '標題',
  53. date: '2020-01-01',
  54. },
  55. {
  56. title: '八条数据',
  57. date: '2020-01-01',
  58. },
  59. ],
  60. twoList: [
  61. {
  62. title: '標題',
  63. date: '2020-01-01',
  64. },
  65. {
  66. title: '八条数据',
  67. date: '2020-01-01',
  68. },
  69. ],
  70. threeList: [
  71. {
  72. title: '標題',
  73. date: '2020-01-01',
  74. },
  75. {
  76. title: '八条数据',
  77. date: '2020-01-01',
  78. },
  79. ],
  80. };
  81. },
  82. created() {},
  83. methods: {},
  84. computed: {
  85. ...mapState(['user']),
  86. pageTitle() {
  87. return `${this.$route.meta.title}`;
  88. },
  89. },
  90. metaInfo() {
  91. return { title: this.$route.meta.title };
  92. },
  93. };
  94. </script>
  95. <style lang="less" scoped>
  96. .w_1200 {
  97. width: 1200px;
  98. margin: 0 auto;
  99. }
  100. .style {
  101. .top {
  102. height: 40px;
  103. }
  104. .banner {
  105. height: 220px;
  106. }
  107. .menu {
  108. height: 70px;
  109. margin: 0 0 10px 0;
  110. }
  111. .main {
  112. min-height: 600px;
  113. margin: 0 0 10px 0;
  114. .left {
  115. min-height: 1050px;
  116. background: #fff;
  117. margin: 0 10px 0 0;
  118. }
  119. .right {
  120. width: 78%;
  121. min-height: 1050px;
  122. background: #fff;
  123. }
  124. }
  125. .foot {
  126. height: 120px;
  127. }
  128. }
  129. </style>