index.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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" @click="handleClick(val)">{{ 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 Snackbar from '@/plugins/snackbar'
  33. import { useRouter } from 'vue-router'; const router = useRouter()
  34. defineOptions({name: 'entrances-navBar'})
  35. const handleLogoClick = () => { router.push({ path: '/'}) }
  36. const menuList = [
  37. { title: '产品', fileName: product },
  38. { title: '解决方案', fileName: solution },
  39. { title: '客户案例', path: '/' },
  40. { title: '服务支持', fileName: product },
  41. { title: '资源中心', fileName: product },
  42. { title: '了解门墩儿', fileName: product },
  43. ]
  44. const handleClick = (val) => {
  45. Snackbar.warning('暂未开发,敬请期待!')
  46. console.log('handleClick', val)
  47. // if (val.path) window.open(val.path)
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. @import '@/styles/entrances/navBar.scss'
  52. </style>