gui-coupons.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view class="gui-coupons gui-flex gui-rows gui-nowrap">
  3. <view class="gui-coupons-left gui-flex1 gui-flex gui-rows gui-nowrap gui-space-between gui-align-items-center"
  4. :style="{backgroundColor:coupon.ltBg, height:coupon.height}">
  5. <view class="gui-coupons-left-number">
  6. <view class="gui-flex gui-rows gui-nowrap gui-justify-content-center gui-align-items-center">
  7. <text class="gui-color-gray gui-h4">{{coupon.unit}}</text>
  8. <text class="gui-h3 gui-bold"
  9. :style="{color:coupon.color}">{{coupon.number}}</text>
  10. </view>
  11. <text class="gui-text-small gui-block-text gui-text-center"
  12. :style="{color:coupon.color}">{{coupon.txt}}</text>
  13. </view>
  14. <view class="gui-coupons-left-body">
  15. <text class="gui-block-text gui-h5 gui-primary-color">{{coupon.title}}</text>
  16. <text class="gui-block-text gui-text-small gui-color-gray">{{coupon.desc}}</text>
  17. </view>
  18. <text class="gui-coupons-status"
  19. v-if="coupon.drawed"
  20. :style="{backgroundColor:coupon.color}">{{coupon.drawed}}</text>
  21. </view>
  22. <text class="gui-coupons-right gui-color-white gui-text-center gui-block-text"
  23. :style="{
  24. height:coupon.height,
  25. lineHeight:coupon.height,
  26. backgroundColor:coupon.color
  27. }">{{coupon.btn}}</text>
  28. <view class="gui-coupons-sawtooth"
  29. :style="{
  30. height:coupon.height,
  31. backgroundColor:coupon.color}">
  32. <view class="gui-coupons-sawtooth-circular"
  33. v-for="(item, index) in 10" :key="index"></view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. name : "gui-coupons",
  40. props : {
  41. coupon : {
  42. type : Object,
  43. default : function () {
  44. return {}
  45. }
  46. }
  47. }
  48. }
  49. </script>
  50. <style scoped>
  51. .gui-coupons{border-top-left-radius:10rpx; border-bottom-left-radius:10rpx;}
  52. .gui-coupons-left{width:500rpx; height:150rpx; padding-right:10rpx; border-radius:8rpx; position:relative;}
  53. .gui-coupons-left-number{width:168rpx; border-right:1px dashed #D2D2D2;}
  54. .gui-coupons-left-body{width:320rpx;}
  55. .gui-coupons-status{color:#FFFFFF; padding:0 10px; height:36rpx; line-height:36rpx; font-size:20rpx; position:absolute; z-index:1; right:6px; top:8px; border-radius:36rpx;}
  56. .gui-coupons-right{width:150rpx; height:150rpx; font-size:32rpx;}
  57. .gui-coupons-sawtooth{width:8px; height:150rpx; overflow:hidden; position:relative;}
  58. .gui-coupons-sawtooth-circular{width:10px; margin:3px 5px; height:10px; border-radius:10px; background:#F8F8F8;}
  59. </style>