mainLeft.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div id="mainLeft">
  3. <el-row>
  4. <el-col :span="24" class="mainLeft">
  5. <el-col :span="24" class="info" v-for="(item, index) in mainLeftList" :key="index" :type="item.type">
  6. <el-link :underline="false">
  7. <span class="title">{{item.title}}</span>
  8. </el-link>
  9. </el-col>
  10. </el-col>
  11. <el-col :span="24">
  12. <el-menu default-active="2" class="el-menu-vertical-demo">
  13. <el-menu-item index="1">科技要闻</el-menu-item>
  14. <el-menu-item index="2">学术资讯</el-menu-item>
  15. <el-menu-item index="3">工作动态</el-menu-item>
  16. </el-menu>
  17. </el-col>
  18. </el-row>
  19. </div>
  20. </template>
  21. <script>
  22. import { mapActions, mapState } from 'vuex';
  23. export default {
  24. name: 'mainLeft',
  25. props: {
  26. mainLeftList: null,
  27. },
  28. components: {},
  29. data: () => ({}),
  30. created() {},
  31. computed: {
  32. ...mapState(['subMenu']),
  33. },
  34. methods: {},
  35. };
  36. </script>
  37. <style lang="less" scoped>
  38. .info {
  39. height: 44px;
  40. line-height: 44px;
  41. padding: 0 15px;
  42. }
  43. .info .title {
  44. border-bottom: 1px dashed #ccc;
  45. display: inline-block;
  46. height: 40px;
  47. width: 260px;
  48. padding: 0 0px;
  49. }
  50. </style>