1.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <div class="headLineBigBox">
  3. <!--板式1-->
  4. <div v-if="skinId==1">
  5. <style1
  6. v-if="templateData.componentList[0].data.text.length > 0"
  7. :templateData="templateData.componentList[0].data.text"
  8. :style="templateData.componentList[0].component_style.toString()"
  9. />
  10. <nodata v-else :dataStyle="2" :dataWidth="1200" :dataHeight="140" />
  11. </div>
  12. <!--板式2-->
  13. <div v-if="skinId==2">
  14. <style2
  15. v-if="templateData.componentList[0].data.text.length > 0"
  16. :templateData="templateData.componentList[0].data.text"
  17. :style="templateData.componentList[0].component_style.toString()"
  18. />
  19. <nodata v-else :dataStyle="2" :dataWidth="1200" :dataHeight="140" />
  20. </div>
  21. </div>
  22. </template>
  23. <script setup>
  24. //样式1
  25. import style1 from '@/components/template/component/headLine/1200x140/1.vue'
  26. //样式2
  27. import style2 from '@/components/template/component/headLine/1200x140/2.vue'
  28. //暂无数据
  29. import nodata from '@/components/template/component/public/nodata.vue'
  30. const props = defineProps({
  31. skinId: Number,//皮肤id
  32. templateData:Object,//新闻数据
  33. });
  34. </script>
  35. <style lang="less">
  36. .headLineBigBox {
  37. width: 1200px;
  38. height: 140px;
  39. position: relative;
  40. margin: 0 auto;
  41. margin-bottom: 30px;
  42. .templateEditBtnBox {
  43. right: 0;
  44. }
  45. }
  46. </style>