header.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <nav class="client-head">
  3. <div class="client-container head-box">
  4. <a :href="`${baseUrl}`" class="client-head-img"></a>
  5. <!-- PC菜单 -->
  6. <pc-nav @navChange="headMenuSelect"></pc-nav>
  7. </div>
  8. </nav>
  9. </template>
  10. <script>
  11. import mtaLink from '~/components/mtaLink/index';
  12. import { mapGetters } from 'vuex';
  13. import PcNav from './mtaNav/pcNav';
  14. let _ = require('lodash');
  15. export default {
  16. name: 'mtaHeader',
  17. components: {
  18. PcNav,
  19. mtaLink,
  20. },
  21. computed: {
  22. baseUrl() {
  23. return this.getBaseUrl;
  24. },
  25. ...mapGetters(['getBaseUrl'])
  26. },
  27. data() {
  28. return {
  29. showBtnFlag:false,
  30. navClass:'head-nav-up',
  31. headerArr: [
  32. {
  33. content: '首页',
  34. keyPath: '/',
  35. },
  36. {
  37. content: '产品与服务',
  38. keyPath: '/cpyfw',
  39. children: [],
  40. },
  41. {
  42. content: '新闻中心',
  43. keyPath: '/news',
  44. children: [],
  45. },
  46. {
  47. content: '关于我们',
  48. keyPath: '/gywm',
  49. children: [],
  50. },
  51. ],
  52. };
  53. },
  54. methods:{
  55. headMenuSelect(index){
  56. },
  57. navChange(){
  58. this.navClass = 'head-nav-up'
  59. },
  60. },
  61. created() {
  62. let str = this.$route.fullPath;
  63. }
  64. };
  65. </script>