menus.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <div id="menus">
  3. <el-row>
  4. <el-col :span="24">
  5. <el-menu :default-active="$route.path" router class="el-menu-demo" mode="horizontal">
  6. <el-menu-item index="/news/index">新闻动态</el-menu-item>
  7. <el-menu-item index="/achievement/index?col_name=平台建设&&display=0">成果展示</el-menu-item>
  8. <el-menu-item index="/service/detail?title=吉林超算">计算服务</el-menu-item>
  9. <el-menu-item index="/communication/index">交流互动</el-menu-item>
  10. <el-menu-item index="/partisan/index">党建学苑</el-menu-item>
  11. </el-menu>
  12. </el-col>
  13. </el-row>
  14. </div>
  15. </template>
  16. <script>
  17. import { mapState, createNamespacedHelpers } from 'vuex';
  18. export default {
  19. name: 'menus',
  20. props: {},
  21. components: {},
  22. data: function() {
  23. return {
  24. activeIndex: '',
  25. };
  26. },
  27. created() {},
  28. methods: {},
  29. computed: {
  30. ...mapState(['user']),
  31. pageTitle() {
  32. return `${this.$route.meta.title}`;
  33. },
  34. },
  35. metaInfo() {
  36. return { title: this.$route.meta.title };
  37. },
  38. };
  39. </script>
  40. <style lang="less" scoped>
  41. .el-menu {
  42. background: #2152994f;
  43. }
  44. .el-menu--horizontal > .el-menu-item {
  45. height: 70px;
  46. line-height: 70px;
  47. }
  48. .el-menu-item {
  49. font-size: 22px;
  50. font-family: 微软雅黑;
  51. color: rgb(255, 255, 255);
  52. padding: 0 75px;
  53. border-right: 2px solid #76bdfe;
  54. }
  55. .el-menu-item:last-child {
  56. border-right: none;
  57. padding: 0 76px;
  58. }
  59. .el-menu.el-menu--horizontal {
  60. border-bottom: none;
  61. }
  62. .el-menu--horizontal .el-menu-item:not(.is-disabled):focus,
  63. .el-menu--horizontal .el-menu-item:not(.is-disabled):hover {
  64. outline: 0;
  65. color: #fff;
  66. }
  67. .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
  68. .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
  69. .el-menu--horizontal > .el-submenu .el-submenu__title:hover {
  70. background-color: #215299;
  71. }
  72. .el-menu--horizontal > .el-menu-item.is-active {
  73. border-bottom: none;
  74. color: #fff;
  75. background: #215299;
  76. }
  77. </style>