1.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div class="channelMenuBox">
  3. <div class="channelMenuSector">
  4. <div v-if="templateData.componentList[0].component_style.toString()=='2'">
  5. <menu1Style :skinId="skinId" :navigateData="navigateData" :routeId="routeId"/>
  6. </div>
  7. <div v-if="templateData.componentList[0].component_style.toString()=='1'">
  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. //引入vue
  19. import {ref} from 'vue';
  20. //获得新闻数据
  21. const props = defineProps({
  22. skinId: Number,//皮肤id
  23. templateData: Object,//模板数据
  24. navigateData: Array,//导航数据
  25. routeId: Number//导航对应的cid
  26. });
  27. </script>
  28. <style lang="less" scoped>
  29. .channelMenuBox {
  30. width: 100%;
  31. height: 100px;
  32. margin-bottom: 30px;
  33. box-sizing: content-box;
  34. .channelMenuSector {
  35. width: 1200px;
  36. height: 100px;
  37. margin: 0 auto;
  38. position: relative;
  39. .templateEditBtnBox {
  40. right: 0;
  41. }
  42. }
  43. }
  44. </style>