native.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <div id="native">
  3. <el-row>
  4. <el-menu :default-active="activeIndex2" class="el-menu-demo" mode="horizontal" @select="handleSelect"
  5. background-color="rgba(0,0,0,0.4)" text-color="#fff" active-text-color="#fff">
  6. <el-submenu index="1">
  7. <template slot="title">新闻资讯</template>
  8. <el-menu-item index="1-1" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">新闻资讯
  9. </el-menu-item>
  10. <el-menu-item index="1-2" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">新闻资讯
  11. </el-menu-item>
  12. <el-menu-item index="1-3" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">新闻资讯
  13. </el-menu-item>
  14. </el-submenu>
  15. <el-submenu index="2">
  16. <template slot="title">计算服务</template>
  17. <el-menu-item index="2-1" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">计算服务
  18. </el-menu-item>
  19. <el-menu-item index="2-2" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">计算服务
  20. </el-menu-item>
  21. <el-menu-item index="2-3" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">计算服务
  22. </el-menu-item>
  23. </el-submenu>
  24. </el-menu>
  25. </el-row>
  26. </div>
  27. </template>
  28. <script>
  29. import { mapActions, mapState, mapMutations } from 'vuex';
  30. export default {
  31. name: 'native',
  32. props: {},
  33. components: {},
  34. data: () => ({
  35. activeIndex2: '1'
  36. }),
  37. created() { },
  38. computed: {
  39. ...mapState(['menu']),
  40. },
  41. methods: {
  42. turnTo(url) {
  43. window.open(url);
  44. },
  45. handleSelect(key, keyPath) {
  46. console.log(key, keyPath);
  47. }
  48. },
  49. };
  50. </script>
  51. <style lang="less" scoped>
  52. .hover:hover {
  53. background-color: #215299 !important;
  54. }
  55. /deep/.el-submenu__title {
  56. font-size: 20px;
  57. }
  58. /deep/.el-submenu__title:hover {
  59. background-color: #215299 !important;
  60. }
  61. /deep/.el-menu--horizontal > .el-submenu .el-submenu__icon-arrow {
  62. display: none;
  63. }
  64. </style>