shadow-card.vue 872 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="shadow-card">
  3. <view v-for="(item, index) in list" :key="index">
  4. <view class="label">{{ item.label }}</view>
  5. <view class="value">{{ item.value }}</view>
  6. </view>
  7. </view>
  8. </template>
  9. <script lang="ts">
  10. export default {
  11. props: {
  12. list: {
  13. type: Array<any>,
  14. defalut: [],
  15. },
  16. },
  17. };
  18. </script>
  19. <style lang="scss">
  20. .shadow-card {
  21. background: #ffffff;
  22. border: 1rpx solid rgba(0, 0, 0, 0.1);
  23. box-shadow: 0px 4rpx 20rpx rgba(0, 0, 0, 0.1);
  24. border-radius: 20rpx;
  25. padding: 40rpx;
  26. & > view {
  27. margin-top: 40rpx;
  28. display: flex;
  29. &:first-child {
  30. margin-top: 0rpx;
  31. }
  32. .label {
  33. width: 156rpx;
  34. flex-shrink: 0;
  35. color: rgba(0, 0, 0, 0.4);
  36. font-size: 26rpx;
  37. }
  38. .value {
  39. flex-grow: 1;
  40. color: #000;
  41. font-size: 26rpx;
  42. }
  43. }
  44. }
  45. </style>