menus.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <div id="menu">
  3. <el-row>
  4. <el-col :span="24" class="menu">
  5. <div class="w_1200">
  6. <el-menu :default-active="activeIndex" mode="horizontal" background-color="#215299" router>
  7. <el-menu-item index="kjzx">科技资讯</el-menu-item>
  8. <el-menu-item index="kjpx">科技培训</el-menu-item>
  9. <el-menu-item index="kjzy">科技资源</el-menu-item>
  10. <el-menu-item index="kjfw">科技服务</el-menu-item>
  11. </el-menu>
  12. </div>
  13. </el-col>
  14. </el-row>
  15. </div>
  16. </template>
  17. <script>
  18. import { mapState, createNamespacedHelpers } from 'vuex';
  19. export default {
  20. metaInfo() {
  21. return { title: this.$route.meta.title };
  22. },
  23. name: 'menus',
  24. props: {},
  25. components: {},
  26. data: function() {
  27. return {
  28. activeIndex: '1',
  29. };
  30. },
  31. created() {},
  32. methods: {},
  33. computed: {
  34. ...mapState(['user']),
  35. },
  36. };
  37. </script>
  38. <style lang="less" scoped>
  39. .w_1200 {
  40. width: 1200px;
  41. margin: 0 auto;
  42. }
  43. /deep/.el-menu.el-menu--horizontal {
  44. border: 0;
  45. }
  46. /deep/.el-menu--horizontal > .el-menu-item.is-active {
  47. border-bottom: 0;
  48. }
  49. /deep/.el-menu-item {
  50. padding: 0;
  51. }
  52. /deep/.el-menu--horizontal > .el-menu-item {
  53. width: 295px;
  54. height: 70px;
  55. line-height: 70px;
  56. font-size: 22px;
  57. font-family: '微软雅黑';
  58. color: #ffffff;
  59. text-align: center;
  60. border-right: 2px solid #76bdfe;
  61. }
  62. /deep/.el-menu--horizontal > .el-menu-item:last-child {
  63. border-right: 0;
  64. }
  65. /deep/.el-menu--horizontal .el-menu-item:not(.is-disabled):focus {
  66. color: #fff;
  67. }
  68. /deep/.el-menu--horizontal .el-menu-item:not(.is-disabled):hover {
  69. color: #fff;
  70. }
  71. </style>