1.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <div class="channelMenuBox">
  3. <div class="channelMenuSector">
  4. <div v-if="templateData[0].component_style.toString()=='1'">
  5. <menu1Style :skinId="skinId" :navigateData="navigateData" :routeId="routeId"/>
  6. </div>
  7. <div v-if="templateData[0].component_style.toString()=='2'">
  8. <menu2Style :skinId="skinId" :navigateData="navigateData" :routeId="routeId"/>
  9. </div>
  10. </div>
  11. </div>
  12. </template>
  13. <script setup>
  14. //样式1
  15. import menu1Style from '@/components/template/component/menu/1200x100/1.vue'
  16. //样式2
  17. import menu2Style from '@/components/template/component/menu/1200x100/2.vue'
  18. //获得新闻数据
  19. const props = defineProps({
  20. skinId: Number,//皮肤id
  21. templateData: Object,//模板数据
  22. navigateData: Array,//导航数据
  23. routeId: Number//导航对应的cid
  24. });
  25. </script>
  26. <style lang="less" scoped>
  27. .channelMenuBox {
  28. width: 100%;
  29. height: 100px;
  30. margin-bottom: 30px;
  31. box-sizing: content-box;
  32. .channelMenuSector {
  33. width: 1200px;
  34. height: 100px;
  35. margin: 0 auto;
  36. position: relative;
  37. .templateEditBtnBox {
  38. right: 0;
  39. }
  40. }
  41. }
  42. </style>