FormatNine.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <script setup>
  2. import {getPPTContentType,getPPTContentItemData,getPPTLayerType} from '../hooks/createPPTContent'
  3. const props=defineProps({
  4. pageData:{
  5. type:Object,
  6. default:{}
  7. }
  8. })
  9. </script>
  10. <template>
  11. <div class="ppt-item-box">
  12. <div class="ppt-title-box">{{pageData.title}}</div>
  13. <div class="ppt-content-box">
  14. <div class="container">
  15. <div class="top-box">
  16. <div class="top-half-box">
  17. <component
  18. :is="getPPTContentType(1,pageData.elements)"
  19. :itemData="getPPTContentItemData(1,pageData)"
  20. />
  21. </div>
  22. <div class="top-half-box">
  23. <component
  24. :is="getPPTContentType(2,pageData.elements)"
  25. :itemData="getPPTContentItemData(2,pageData)"
  26. />
  27. </div>
  28. </div>
  29. <div class="bot-box">
  30. <component
  31. :is="getPPTContentType(3,pageData.elements)"
  32. :itemData="getPPTContentItemData(3,pageData)"
  33. />
  34. </div>
  35. </div>
  36. <div class="layer-wrap">
  37. <template v-for="item in pageData.layers" :key="item.id">
  38. <component
  39. :is="getPPTLayerType(item)"
  40. :itemData="item"
  41. />
  42. </template>
  43. </div>
  44. </div>
  45. </div>
  46. </template>
  47. <style scoped lang="scss">
  48. @import '../style/common.scss';
  49. .ppt-content-box{
  50. .top-box{
  51. width: 100%;
  52. height: 70%;
  53. display: flex;
  54. .top-half-box{
  55. width: 50%;
  56. height: 100%;
  57. }
  58. }
  59. .bot-box{
  60. width: 100%;
  61. height: 30%;
  62. }
  63. }
  64. </style>