bannerSector.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <div class="bannerBox">
  3. <div class="itemTopBox">
  4. <editBtn :id="id" :sort="0" :type="6" :size="1"/>
  5. <convertBtn :id="id" :sort="0" :type="1"/>
  6. <div v-if="this.$store.state.template.pageData.index[id].content.componentList[0].component_style == 1">
  7. <mainTitleStyle1 />
  8. </div>
  9. <div v-if="this.$store.state.template.pageData.index[id].content.componentList[0].component_style == 2">
  10. <mainTitleStyle2 />
  11. </div>
  12. </div>
  13. <div class="itemBottomBox">
  14. <div class="bannerLayerBox">
  15. <editBtn :id="id" :sort="1" :type="1" :size="3"/>
  16. <convertBtn :id="id" :sort="1" :type="4"/>
  17. <div v-if="this.$store.state.template.pageData.index[id].content.componentList[1].component_style == 1">
  18. <banner1Style />
  19. </div>
  20. <div v-if="this.$store.state.template.pageData.index[id].content.componentList[1].component_style == 2">
  21. <banner2Style />
  22. </div>
  23. </div>
  24. <div class="NewsListBox">
  25. <editBtn :id="id" :sort="2" :type="2" :size="5"/>
  26. <convertBtn :id="id" :sort="2" :type="5"/>
  27. <div v-if="this.$store.state.template.pageData.index[id].content.componentList[2].component_style == 1">
  28. <tabs1Style />
  29. </div>
  30. <div v-if="this.$store.state.template.pageData.index[id].content.componentList[2].component_style == 2">
  31. <tabs2Style />
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </template>
  37. <script>
  38. //编辑按钮
  39. import editBtn from '../../public/editBtn.vue'
  40. import convertBtn from '../../public/convertBtn.vue'
  41. //标题组件
  42. import mainTitleStyle1 from './components/mainTitle/1.vue'
  43. import mainTitleStyle2 from './components/mainTitle/2.vue'
  44. //banner组件
  45. import banner from './components/banner.vue'
  46. import banner1Style from './components/banner/1.vue'
  47. import banner2Style from './components/banner/2.vue'
  48. //tabs组件
  49. import tabs1Style from './components/tabs/1.vue'
  50. import tabs2Style from './components/tabs/2.vue'
  51. export default {
  52. components: {
  53. //mainTitle,
  54. banner,
  55. editBtn,
  56. convertBtn,
  57. mainTitleStyle1,
  58. mainTitleStyle2,
  59. banner1Style,
  60. banner2Style,
  61. tabs1Style,
  62. tabs2Style
  63. },
  64. props: {
  65. id:{
  66. type:Number,
  67. default:0
  68. }
  69. },
  70. data() {
  71. return {
  72. };
  73. },
  74. methods: {
  75. },
  76. mounted() {
  77. },
  78. };
  79. </script>
  80. <style scoped lang="less">
  81. .bannerBox {
  82. width: 100%;
  83. display: flex;
  84. flex-direction: column;
  85. align-items: center;
  86. height: 340px;
  87. .itemTopBox {
  88. position: relative;
  89. border: 2px dashed #999;
  90. transition: all 0.3s;
  91. width: 80%;
  92. }
  93. .itemBottomBox {
  94. width: 80%;
  95. display: flex;
  96. align-items: center;
  97. justify-content: space-between;
  98. padding: 14px 0 0 0;
  99. height: 300px;
  100. .bannerLayerBox {
  101. position: relative;
  102. //border: 2px dashed #999;
  103. width: 55%;
  104. height: 226px;
  105. }
  106. .NewsListBox {
  107. position: relative;
  108. width: 45%;
  109. border: 2px dashed #999;
  110. box-sizing: border-box;
  111. padding-left: 20px;
  112. height: 226px;
  113. }
  114. }
  115. }
  116. </style>