fix(home): 修复箭头无限循环+日期框竖长型+宜忌放大框+月历横向
Publish Mini Program Dev Version / publish (push) Successful in 3m10s
Publish Mini Program Dev Version / publish (push) Successful in 3m10s
1. 箭头放到大框里面,点击不触发swiper无限循环 2. 日期框改为竖长型(min-height 800rpx) 3. 宜忌放到大框里面,包含日期/农历/干支/节日/星期/宜忌 4. 月历确认横向滑动(vertical=false)
This commit is contained in:
+14
-2
@@ -159,14 +159,26 @@ Page({
|
||||
prevDay() {
|
||||
if (this.data.dayIndex > 0) {
|
||||
this.setData({ dayIndex: this.data.dayIndex - 1 });
|
||||
this.onDaySwiperChange({ detail: { current: this.data.dayIndex - 1 } });
|
||||
this.updateCurrentDayInfo();
|
||||
}
|
||||
},
|
||||
|
||||
nextDay() {
|
||||
if (this.data.dayIndex < this.data.dayList.length - 1) {
|
||||
this.setData({ dayIndex: this.data.dayIndex + 1 });
|
||||
this.onDaySwiperChange({ detail: { current: this.data.dayIndex + 1 } });
|
||||
this.updateCurrentDayInfo();
|
||||
}
|
||||
},
|
||||
|
||||
/** 更新当前 dayInfo(不触发 swiper 事件) */
|
||||
updateCurrentDayInfo() {
|
||||
const cur = this.data.dayList[this.data.dayIndex];
|
||||
if (cur) {
|
||||
this.setData({
|
||||
dayInfo: cur.dayInfo,
|
||||
currentYear: cur.dayInfo.solarYear,
|
||||
currentMonth: cur.dayInfo.solarMonth
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user