index.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <v-toolbar
  3. class="banner"
  4. density="compact"
  5. style="padding-left: 0px;height: 50px;font-size: 14px;"
  6. >
  7. <div class="innerBox d-flex justify-space-between">
  8. <div class="d-flex align-center">
  9. <div class="nav-logo" style="cursor: pointer;" @click="handleLogoClick">
  10. <v-img src="@/assets/logo.png" aspect-ratio="16/9" cover :width="90" style="height: 40px;"></v-img>
  11. </div>
  12. <div class="menuList ml-10">
  13. <div v-for="val in menuList" :key="val.name">
  14. <template v-if="val.fileName">
  15. <component :is="val.fileName" :title="val.title" @emitClick="eventVal => handleClick(eventVal)"></component>
  16. </template>
  17. <template v-else>
  18. <span class="cursor-pointer">{{ val.title }}</span>
  19. </template>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="d-flex">
  24. <span>右侧</span>
  25. </div>
  26. </div>
  27. </v-toolbar>
  28. </template>
  29. <script setup>
  30. import product from './components/product.vue'
  31. import solution from './components/solution.vue'
  32. import { useRouter } from 'vue-router'; const router = useRouter()
  33. defineOptions({name: 'entrances-navBar'})
  34. const handleLogoClick = () => { router.push({ path: '/'}) }
  35. const menuList = [
  36. { title: '产品', fileName: product },
  37. { title: '解决方案', fileName: solution },
  38. { title: '客户案例', path: '/' },
  39. { title: '服务支持', fileName: product },
  40. { title: '资源中心', fileName: product },
  41. { title: '了解门墩儿', fileName: product },
  42. ]
  43. const handleClick = (val) => {
  44. if (val.path) window.open(val.path)
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. @import '@/styles/entrances/navBar.scss'
  49. </style>