OrderList.vue 1.8 KB

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