app-plugin-time-bar.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="time-bar">
  3. <view class="app-pt-time" :class="theme === 'a' ? 'default-back' : theme + '-m-back ' + theme">
  4. <image class="app-image" src="/static/image/time-bar.png"></image>
  5. <view class="app-time-content">
  6. <view class="app-name">{{start_begin}}</view>
  7. <view class="app-time-info dir-left-nowrap cross-center">
  8. <text class="app-value">{{day}}</text>
  9. <text class="app-degree">天</text>
  10. <text class="app-value">{{hour}}</text>
  11. <text class="app-degree">时</text>
  12. <text class="app-value">{{minute}}</text>
  13. <text class="app-degree">分</text>
  14. <text class="app-value">{{second}}</text>
  15. <text class="app-degree">秒</text>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'app-plugin-time-bar',
  24. props: {
  25. day: {
  26. type: String,
  27. default() {
  28. return '00';
  29. }
  30. },
  31. hour: {
  32. type: String,
  33. default() {
  34. return '00';
  35. }
  36. },
  37. minute: {
  38. type: String,
  39. default() {
  40. return '00';
  41. }
  42. },
  43. second: {
  44. type: String,
  45. default() {
  46. return '00';
  47. }
  48. },
  49. theme: String,
  50. img_url: String,
  51. start_begin: String
  52. }
  53. }
  54. </script>
  55. <style scoped lang="scss">
  56. .default-back {
  57. background: linear-gradient(140deg, #ff5427, #ff3d3f,#ff2e4e, #ff2754);
  58. }
  59. .app-pt-time {
  60. height: #{88rpx};
  61. width: #{750rpx};
  62. position: relative;
  63. .app-image {
  64. width: #{750rpx};
  65. height: #{88rpx};
  66. }
  67. .app-title {
  68. width: #{281rpx};
  69. color: white;
  70. margin-top: #{46rpx};
  71. font-size: #{22rpx};
  72. }
  73. .app-time-content {
  74. width: #{322rpx};
  75. height: #{88rpx};
  76. position: absolute;
  77. right: 0;
  78. top: 0;
  79. .app-name {
  80. width: #{322rpx};
  81. height: #{30rpx};
  82. font-size: #{20rpx};
  83. color: white;
  84. margin: #{5rpx} 0;
  85. text-align: center;
  86. }
  87. .app-time-info {
  88. height: #{48rpx};
  89. width: #{322rpx};
  90. text-align: center;
  91. .app-degree {
  92. font-size: #{23rpx};
  93. color: #ffffff;
  94. margin: 0 #{6rpx};
  95. }
  96. .app-value {
  97. display: inline-block;
  98. min-width: #{40rpx};
  99. height: #{36rpx};
  100. line-height: #{36rpx};
  101. border-radius: #{4rpx};
  102. background-color: white;
  103. text-align: center;
  104. font-size: #{19rpx};
  105. }
  106. }
  107. }
  108. }
  109. </style>