|
@@ -3,7 +3,7 @@
|
|
|
<nav-bar title="学习计划"></nav-bar>
|
|
|
<view v-if="havePlan">
|
|
|
<view class="card" v-if="havePlan">
|
|
|
- <swiper :style="{height:isOpen?'550rpx':'260rpx'}" class="swiper" :current="swiperIndex" :duration="300">
|
|
|
+ <swiper :style="{height:isOpen?'550rpx':'260rpx'}" @change="swiperChange" class="swiper" :current="swiperIndex" :duration="300">
|
|
|
<swiper-item v-for="(swiperItem,swiperIndex) in swiperList" :key="swiperIndex">
|
|
|
<view class="date_t1">
|
|
|
<u-icon name="arrow-left" size="28" v-if="havePreviousMonth" @click="swipeMonth(-1)"></u-icon>
|
|
@@ -324,6 +324,17 @@ export default {
|
|
|
}
|
|
|
// this.dealDayList();
|
|
|
},
|
|
|
+ swiperChange(e) {
|
|
|
+ this.swiperIndex = e.detail.current;
|
|
|
+ this.haveNextMonth = false;
|
|
|
+ this.havePreviousMonth = false;
|
|
|
+ if (this.swiperIndex > 0) {
|
|
|
+ this.havePreviousMonth = true;
|
|
|
+ }
|
|
|
+ if (this.swiperIndex < this.swiperList.length - 1) {
|
|
|
+ this.haveNextMonth = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
dealMonth(isFirst) {
|
|
|
|
|
|
this.swiperList = []
|