index.vue 935 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <view class="product-tips">
  3. <view class="section-title">温馨提示</view>
  4. <view class="tips-container">
  5. <view v-for="(tip, index) in content" :key="index" class="tip-item">
  6. <text>{{ index + 1 }}.{{ tip }}</text>
  7. </view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. name: 'ProductTips',
  14. props: {
  15. content: {
  16. type: Array,
  17. default: () => []
  18. }
  19. }
  20. }
  21. </script>
  22. <style lang="scss" scoped>
  23. .product-tips {
  24. margin-top: 30rpx;
  25. padding: 0 0 30rpx 0;
  26. background: #fff;
  27. .section-title {
  28. font-size: 30rpx;
  29. font-weight: bold;
  30. color: #333;
  31. margin-bottom: 20rpx;
  32. font-family: 'Source Han Sans SC';
  33. }
  34. .tips-container {
  35. background-color: #F8F8F8;
  36. padding: 24rpx;
  37. border-radius: 12rpx;
  38. .tip-item {
  39. font-size: 26rpx;
  40. color: #666;
  41. line-height: 1.6;
  42. margin-bottom: 12rpx;
  43. text-align: justify;
  44. &:last-child {
  45. margin-bottom: 0;
  46. }
  47. }
  48. }
  49. }
  50. </style>