OrderDetail.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view class="position">
  3. <view class="list" :class="border ? 'border' : ''">
  4. <view class="list-cell">
  5. <text class="font-text">{{lable1}}{{value1}} <text v-if="btn1" class="btn" :class="'btn-'+ btn1.id">{{btn1.name}}</text> </text>
  6. <text class="font-text">{{lable2}}{{value2}}</text>
  7. </view>
  8. <view class="list-cell font-sm">
  9. <text>{{lable3}}{{value3}}</text>
  10. <text>{{lable4}}{{value4}}</text>
  11. </view>
  12. <view class="list-cell font-sm">
  13. <text>{{lable5}}{{value5}}</text>
  14. <text>{{lable6}}{{value6}}</text>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default{
  21. props: [
  22. 'lable1', 'value1','btn1',
  23. 'lable2', 'value2',
  24. 'lable3', 'value3',
  25. 'lable4', 'value4',
  26. 'lable5', 'value5',
  27. 'lable6', 'value6',
  28. 'type','border'
  29. ],
  30. methods:{
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .position{
  36. position: relative;
  37. width: 100%;
  38. }
  39. .list{
  40. padding: 10rpx 20rpx;
  41. color: $uni-text-color-grey;
  42. font-size: $uni-font-size-base;
  43. line-height: 1.5;
  44. .list-cell{
  45. display: flex;
  46. align-items: center;
  47. justify-content: space-between;
  48. padding: 5rpx 20rpx;
  49. }
  50. .font-sm{
  51. font-size: $uni-font-size-sm;
  52. }
  53. .font-text{
  54. color: $uni-text-color;
  55. }
  56. }
  57. .border{
  58. border-bottom: 2rpx solid #d8d8d8;
  59. }
  60. .btn-1{
  61. padding: 2rpx 10rpx;
  62. color: $uni-color-primary;
  63. background-color: $uni-color-primary-opacity;
  64. }
  65. .btn-2{
  66. padding: 2rpx 10rpx;
  67. color: $uni-color-warning;
  68. background-color: $uni-color-warning-opacity;
  69. }
  70. </style>