123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- <template>
- <view>
- <view class="nav">
- <view class="nav-item" :class="{'active':activeIndex===0}" @tap="activeIndex=0">今天</view>
- <view class="nav-item" :class="{'active':activeIndex===1}" @tap="activeIndex=1">本周</view>
- <view class="nav-item" :class="{'active':activeIndex===2}" @tap="activeIndex=2">本月</view>
- <view class="nav-item" :class="{'active':activeIndex===3}" @tap="popupVisible=true">更早</view>
- </view>
- <view class="list">
- <view class="list-item">
- <view class="l">
- <image class="image" src="" mode=""></image>
- </view>
- <view class="c">
- <view class="title">
- 购买商品
- </view>
- <view class="time">2021-02-20 20:10:11</view>
- </view>
- <view class="r">
- 498.00
- </view>
- </view>
- </view>
- <view class="popup" v-if="popupVisible" @touchmove.stop.prevent>
- <view class="popup-wrapper">
- <view class="close" @tap="popupVisible=false">
- <uni-icons type="closeempty" size="30"></uni-icons>
- </view>
- <view class="row row-label">
- <label class="label" for="">时间范围</label>
- </view>
- <view class="row">
- <picker mode="date">
- <input class="input" type="text" value="" placeholder="开始时间" />
- </picker>
- <view>至</view>
- <picker mode="date">
- <input class="input" type="text" value="" placeholder="结束时间" />
- </picker>
- </view>
- <view class="row row-label">
- <label class="label" for="">金额范围</label>
- </view>
- <view class="row">
- <view>
- <input class="input" type="digit" value="" placeholder="最小金额" />
- </view>
- <view>至</view>
- <view>
- <input class="input" type="digit" value="" placeholder="最大金额" />
- </view>
- </view>
- <view class="row row-btn">
- <button class="btn filter-btn" type="default" @tap="filter">立即筛选</button>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- popupVisible: false,
- activeIndex: 0
- }
- },
- methods: {
- filter() {
- this.activeIndex = 3
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .nav {
- display: flex;
- justify-content: space-around;
- align-items: center;
- background: white;
- font-size: 30upx;
- .nav-item {
- line-height: 60upx;
- border-top: 4upx solid white;
- border-bottom: 4upx solid white;
- &.active {
- border-bottom: 4upx solid $primary-color;
- }
- }
- }
- .list {
- .list-item {
- padding: 20upx;
- margin: 20upx;
- background: white;
- display: flex;
- // font-family: "Roboto";
- border-radius: 10upx;
- .l {
- height: 100upx;
- .image {
- background: #E0E0E0;
- width: 100upx;
- height: 100upx;
- }
- }
- .c {
- margin-left: 20upx;
- .title {
- font-size: 32upx;
- font-weight: bold;
- color: #333333;
- }
- .time {
- font-size: 28upx;
- margin-top: 24upx;
- color: #999999;
- }
- }
- .r {
- margin-left: auto;
- font-size: 36upx;
- }
- }
- }
- .popup {
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- width: 750upx;
- background: rgba(0, 0, 0, 0.6);
- overflow: hidden;
- .popup-wrapper {
- .close {
- position: absolute;
- right: 5upx;
- top: 0;
- transform: scale(0.6);
- }
- background: white;
- position: absolute;
- bottom: 0;
- width: 750upx;
- min-height: 300upx;
- border-radius: 20upx 20upx 0 0;
- padding-top: 20upx;
- }
- .row {
- display: flex;
- justify-content: space-around;
- .input {
- text-align: center;
- border-bottom: 2upx solid #EEEEEE;
- padding: 10upx;
- font-size: 28upx;
- }
- }
- .row-label {
- justify-content: start;
- margin: 20upx;
- font-size: 30upx;
- }
- .row-btn {
- margin: 40upx 20upx;
- .btn {
- line-height: 80upx;
- background: $primary-color;
- border-radius: 40upx;
- color: white;
- font-size: 32upx;
- font-weight: bold;
- width: 80%;
- }
- }
- }
- </style>
|