s-block-item.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <view>
  3. <s-image-block v-if="type === 'imageBlock'" :data="data" :styles="styles" />
  4. <s-image-banner v-if="type === 'imageBanner'" :data="data" :styles="styles" />
  5. <s-video-block v-if="type === 'videoPlayer'" :data="data" :styles="styles" />
  6. <s-image-cube v-if="type === 'imageCube'" :data="data" :styles="styles" />
  7. <s-notice-block v-if="type === 'noticeBlock'" :data="data" />
  8. <s-search-block v-if="type === 'searchBlock'" :data="data" :navbar="false" />
  9. <s-title-block v-if="type === 'titleBlock'" :data="data" :styles="styles" />
  10. <s-line-block v-if="type === 'lineBlock'" :data="data" />
  11. <s-menu-button v-if="type === 'menuButton'" :data="data" :styles="styles" />
  12. <s-menu-list v-if="type === 'menuList'" :data="data" />
  13. <s-menu-grid v-if="type === 'menuGrid'" :data="data" />
  14. <s-user-card v-if="type === 'userCard'" />
  15. <s-wallet-card v-if="type === 'walletCard'" />
  16. <s-order-card v-if="type === 'orderCard'" :data="data" />
  17. <s-coupon-card v-if="type === 'couponCard'" />
  18. <s-goods-card v-if="type === 'goodsCard'" :data="data" :styles="styles" />
  19. <s-score-block v-if="type === 'scoreGoods'" :data="data" :styles="styles" />
  20. <s-goods-shelves v-if="type === 'goodsShelves'" :data="data" :styles="styles" />
  21. <s-coupon-block
  22. v-if="type === 'coupon'"
  23. :data="data"
  24. :styles="styles"
  25. ></s-coupon-block>
  26. <s-live-block v-if="type === 'mplive'" :data="data" :styles="styles"></s-live-block>
  27. <s-seckill-block v-if="type === 'seckill'" :data="data" :styles="styles"></s-seckill-block>
  28. <s-groupon-block v-if="type === 'groupon'" :data="data" :styles="styles"></s-groupon-block>
  29. <s-richtext-block v-if="type === 'richtext'" :data="data" :styles="styles"></s-richtext-block>
  30. </view>
  31. </template>
  32. <script setup>
  33. /**
  34. * 装修组件 - 组件集
  35. */
  36. import { reactive } from 'vue';
  37. const props = defineProps({
  38. type: {
  39. type: String,
  40. default: '',
  41. },
  42. data: {
  43. type: Object,
  44. default() {},
  45. },
  46. styles: {
  47. type: Object,
  48. default() {},
  49. },
  50. });
  51. const state = reactive({
  52. length: 0,
  53. });
  54. function onSearch() {}
  55. </script>
  56. <style></style>