diff --git a/components/calendar/index.js b/components/calendar/index.js index 21da725..7cc2132 100644 --- a/components/calendar/index.js +++ b/components/calendar/index.js @@ -172,7 +172,10 @@ VantComponent({ const months = getMonths(minDate, maxDate); months.some((month, index) => { if (compareMonth(month, targetDate) === 0) { - this.setData({ scrollIntoView: `month${index}` }); + setTimeout(() => { + this.setData({ scrollIntoView: `month${index}` }); + }, 100); + // this.setData({ scrollIntoView: `month${index}` }); return true } return false diff --git a/pages/index/index.js b/pages/index/index.js index 77eefbd..f485bdb 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -85,7 +85,7 @@ Scene({ factoryName: app.userInfo.factoryName, arrow: this.data.arrow, customBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60), - fragment: (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight), + fragment: (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight) - 100, safeBottom: app.globalData.safeBottom }) event.on('EventMessage', this, this.onEvent) diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 688f4aa..e0486a6 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -33,12 +33,6 @@ -