s-block-item.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view>
  3. <!-- 基础组件:搜索框 -->
  4. <s-search-block v-if="type === 'SearchBar'" :data="data" :styles="styles" :navbar="false" />
  5. <!-- 基础组件:公告栏 -->
  6. <s-notice-block v-if="type === 'NoticeBar'" :data="data" />
  7. <!-- 基础组件:菜单导航 -->
  8. <s-menu-button v-if="type === 'MenuSwiper'" :data="data" :styles="styles" />
  9. <!-- 基础组件:列表导航 -->
  10. <s-menu-list v-if="type === 'MenuList'" :data="data" />
  11. <!-- 基础组件:宫格导航 -->
  12. <s-menu-grid v-if="type === 'MenuGrid'" :data="data" />
  13. <!-- 基础组件:弹窗广告 -->
  14. <s-popup-image v-if="type === 'Popover'" :data="data" />
  15. <!-- 基础组件:悬浮按钮 -->
  16. <s-float-menu v-if="type === 'FloatingActionButton'" :data="data" />
  17. <!-- 图文组件:图片展示 -->
  18. <s-image-block v-if="type === 'ImageBar'" :data="data" :styles="styles" />
  19. <!-- 图文组件:图片轮播 -->
  20. <s-image-banner v-if="type === 'Carousel'" :data="data" :styles="styles" />
  21. <!-- 基础组件:标题栏 -->
  22. <s-title-block v-if="type === 'TitleBar'" :data="data" :styles="styles" />
  23. <!-- 图文组件:广告魔方 -->
  24. <s-image-cube v-if="type === 'MagicCube'" :data="data" :styles="styles" />
  25. <!-- 图文组件:视频播放 -->
  26. <s-video-block v-if="type === 'VideoPlayer'" :data="data" :styles="styles" />
  27. <!-- 基础组件:分割线 -->
  28. <s-line-block v-if="type === 'Divider'" :data="data" />
  29. <!-- 图文组件:热区 -->
  30. <s-hotzone-block v-if="type === 'HotZone'" :data="data" :styles="styles" />
  31. <!-- 商品组件:商品卡片 -->
  32. <s-goods-card v-if="type === 'ProductCard'" :data="data" :styles="styles" />
  33. <!-- 商品组件:商品栏 -->
  34. <s-goods-shelves v-if="type === 'ProductList'" :data="data" :styles="styles" />
  35. <!-- 营销组件:拼团 -->
  36. <s-groupon-block v-if="type === 'PromotionCombination'" :data="data" :styles="styles" />
  37. <!-- 营销组件:秒杀 -->
  38. <s-seckill-block v-if="type === 'PromotionSeckill'" :data="data" :styles="styles" />
  39. <!-- 营销组件:小程序直播(暂时没有这个功能) -->
  40. <s-live-block v-if="type === 'MpLive'" :data="data" :styles="styles" />
  41. <!-- 营销组件:优惠券 -->
  42. <s-coupon-block v-if="type === 'CouponCard'" :data="data" :styles="styles" />
  43. <!-- 营销组件:文章 -->
  44. <s-richtext-block v-if="type === 'PromotionArticle'" :data="data" :styles="styles" />
  45. <!-- 用户组件:用户卡片 -->
  46. <s-user-card v-if="type === 'UserCard'" />
  47. <!-- 用户组件:用户订单 -->
  48. <s-order-card v-if="type === 'UserOrder'" :data="data" />
  49. <!-- 用户组件:用户资产 -->
  50. <s-wallet-card v-if="type === 'UserWallet'" />
  51. <!-- 用户组件:用户卡券 -->
  52. <s-coupon-card v-if="type === 'UserCoupon'" />
  53. </view>
  54. </template>
  55. <script setup>
  56. /**
  57. * 装修组件 - 组件集
  58. */
  59. const props = defineProps({
  60. type: {
  61. type: String,
  62. default: '',
  63. },
  64. data: {
  65. type: Object,
  66. default() {},
  67. },
  68. styles: {
  69. type: Object,
  70. default() {},
  71. },
  72. });
  73. function onSearch() {}
  74. </script>
  75. <style></style>