detail-content-card.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!-- 产品详情:描述卡片 -->
  2. <template>
  3. <view class="detail-content-card bg-white ss-m-x-20 ss-p-t-20">
  4. <view class="card-header ss-flex ss-col-center ss-m-b-30 ss-m-l-20">
  5. <view class="line"></view>
  6. <view class="title ss-m-l-20 ss-m-r-20">详情</view>
  7. </view>
  8. <view class="card-content">
  9. <template v-if="goodsInfo.userHtml">
  10. <view style="padding: 10px;" v-html="goodsInfo.userHtml"></view>
  11. </template>
  12. <template v-else>
  13. <view style="padding: 10px;" v-html="content"></view>
  14. </template>
  15. </view>
  16. </view>
  17. </template>
  18. <script setup>
  19. import sheep from '@/sheep';
  20. const { safeAreaInsets } = sheep.$platform.device;
  21. const props = defineProps({
  22. content: {
  23. type: String,
  24. default: '',
  25. },
  26. goodsInfo: {
  27. type: Object,
  28. default: {},
  29. },
  30. });
  31. </script>
  32. <style lang="scss" scoped>
  33. .detail-content-card {
  34. .card-header {
  35. .line {
  36. width: 6rpx;
  37. height: 30rpx;
  38. background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%);
  39. border-radius: 3rpx;
  40. }
  41. .title {
  42. font-size: 30rpx;
  43. font-weight: bold;
  44. }
  45. .des {
  46. font-size: 24rpx;
  47. color: $dark-9;
  48. }
  49. .more-btn {
  50. font-size: 24rpx;
  51. color: var(--ui-BG-Main);
  52. }
  53. }
  54. }
  55. </style>