CheckoutDesc.vue 848 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <flex-line :show-border="true">
  3. <label class="title">{{title}}</label>
  4. <view class="div" slot="right">
  5. <label class="subtitle discount" v-if="discount">-¥{{subtitle}}</label>
  6. <label class="subtitle" v-else>¥{{subtitle}}</label>
  7. </view>
  8. </flex-line>
  9. </template>
  10. <script>
  11. import flexLine from '../../../flexLine'
  12. export default {
  13. props: {
  14. title: {
  15. },
  16. subtitle: {
  17. },
  18. discount: { default: false }
  19. },
  20. components: {
  21. flexLine
  22. }
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .title {
  27. width: 5rem;
  28. font-size:$subFontSize;
  29. color: #333;
  30. }
  31. .subtitle {
  32. flex: 1;
  33. margin-left: 1rem;
  34. color: #333;
  35. font-size:$h3;
  36. text-align: right;
  37. }
  38. .subtitle.discount{color:$primaryColor}
  39. </style>