money-log.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <view>
  3. <view class="nav">
  4. <view class="nav-item" :class="{'active':activeIndex===0}" @tap="activeIndex=0">今天</view>
  5. <view class="nav-item" :class="{'active':activeIndex===1}" @tap="activeIndex=1">本周</view>
  6. <view class="nav-item" :class="{'active':activeIndex===2}" @tap="activeIndex=2">本月</view>
  7. <view class="nav-item" :class="{'active':activeIndex===3}" @tap="popupVisible=true">更早</view>
  8. </view>
  9. <view class="list">
  10. <view class="list-item">
  11. <view class="l">
  12. <image class="image" src="" mode=""></image>
  13. </view>
  14. <view class="c">
  15. <view class="title">
  16. 购买商品
  17. </view>
  18. <view class="time">2021-02-20 20:10:11</view>
  19. </view>
  20. <view class="r">
  21. 498.00
  22. </view>
  23. </view>
  24. </view>
  25. <view class="popup" v-if="popupVisible" @touchmove.stop.prevent>
  26. <view class="popup-wrapper">
  27. <view class="close" @tap="popupVisible=false">
  28. <uni-icons type="closeempty" size="30"></uni-icons>
  29. </view>
  30. <view class="row row-label">
  31. <label class="label" for="">时间范围</label>
  32. </view>
  33. <view class="row">
  34. <picker mode="date">
  35. <input class="input" type="text" value="" placeholder="开始时间" />
  36. </picker>
  37. <view>至</view>
  38. <picker mode="date">
  39. <input class="input" type="text" value="" placeholder="结束时间" />
  40. </picker>
  41. </view>
  42. <view class="row row-label">
  43. <label class="label" for="">金额范围</label>
  44. </view>
  45. <view class="row">
  46. <view>
  47. <input class="input" type="digit" value="" placeholder="最小金额" />
  48. </view>
  49. <view>至</view>
  50. <view>
  51. <input class="input" type="digit" value="" placeholder="最大金额" />
  52. </view>
  53. </view>
  54. <view class="row row-btn">
  55. <button class="btn filter-btn" type="default" @tap="filter">立即筛选</button>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. data() {
  64. return {
  65. popupVisible: false,
  66. activeIndex: 0
  67. }
  68. },
  69. methods: {
  70. filter() {
  71. this.activeIndex = 3
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .nav {
  78. display: flex;
  79. justify-content: space-around;
  80. align-items: center;
  81. background: white;
  82. font-size: 30upx;
  83. .nav-item {
  84. line-height: 60upx;
  85. border-top: 4upx solid white;
  86. border-bottom: 4upx solid white;
  87. &.active {
  88. border-bottom: 4upx solid $primary-color;
  89. }
  90. }
  91. }
  92. .list {
  93. .list-item {
  94. padding: 20upx;
  95. margin: 20upx;
  96. background: white;
  97. display: flex;
  98. // font-family: "Roboto";
  99. border-radius: 10upx;
  100. .l {
  101. height: 100upx;
  102. .image {
  103. background: #E0E0E0;
  104. width: 100upx;
  105. height: 100upx;
  106. }
  107. }
  108. .c {
  109. margin-left: 20upx;
  110. .title {
  111. font-size: 32upx;
  112. font-weight: bold;
  113. color: #333333;
  114. }
  115. .time {
  116. font-size: 28upx;
  117. margin-top: 24upx;
  118. color: #999999;
  119. }
  120. }
  121. .r {
  122. margin-left: auto;
  123. font-size: 36upx;
  124. }
  125. }
  126. }
  127. .popup {
  128. position: fixed;
  129. top: 0;
  130. left: 0;
  131. bottom: 0;
  132. width: 750upx;
  133. background: rgba(0, 0, 0, 0.6);
  134. overflow: hidden;
  135. .popup-wrapper {
  136. .close {
  137. position: absolute;
  138. right: 5upx;
  139. top: 0;
  140. transform: scale(0.6);
  141. }
  142. background: white;
  143. position: absolute;
  144. bottom: 0;
  145. width: 750upx;
  146. min-height: 300upx;
  147. border-radius: 20upx 20upx 0 0;
  148. padding-top: 20upx;
  149. }
  150. .row {
  151. display: flex;
  152. justify-content: space-around;
  153. .input {
  154. text-align: center;
  155. border-bottom: 2upx solid #EEEEEE;
  156. padding: 10upx;
  157. font-size: 28upx;
  158. }
  159. }
  160. .row-label {
  161. justify-content: start;
  162. margin: 20upx;
  163. font-size: 30upx;
  164. }
  165. .row-btn {
  166. margin: 40upx 20upx;
  167. .btn {
  168. line-height: 80upx;
  169. background: $primary-color;
  170. border-radius: 40upx;
  171. color: white;
  172. font-size: 32upx;
  173. font-weight: bold;
  174. width: 80%;
  175. }
  176. }
  177. }
  178. </style>