From 717f170a661a41f0e0ebab37f8f0758a8a04f546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Tue, 20 Aug 2019 12:01:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddate=E6=97=A5=E5=8E=86?= =?UTF-8?q?=E6=9C=88=E4=BB=BD=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84bug;?= =?UTF-8?q?=E4=BC=98=E5=8C=96select=E6=A0=B7=E5=BC=8F;=E4=BF=AE=E5=A4=8Dcl?= =?UTF-8?q?ickoutside=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/form/select.wc | 1 - src/picker/date.wc | 5 ++++- src/utils.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/form/select.wc b/src/form/select.wc index 07ab2e5..82cd31d 100644 --- a/src/form/select.wc +++ b/src/form/select.wc @@ -96,7 +96,6 @@ width: 200px; height: auto; max-height: 200px; - min-height: 46px; padding: 8px 0; border-radius: 4px; background: #fff; diff --git a/src/picker/date.wc b/src/picker/date.wc index b0b8b35..93d7438 100644 --- a/src/picker/date.wc +++ b/src/picker/date.wc @@ -238,6 +238,8 @@ function getCalendarTable({ year, month, max, min, last }) { let isLimitYM = isLimited({ max, min }, { year, month }) let list = [] + log(year, month, nums, numsFixed) + for (let i = numsFixed; i <= nums; i++) { let day = { weekend: false, @@ -321,7 +323,7 @@ function getThisYearMonth() { //根据年份获取指定月份天数 function getTotalDays(year, month) { - return new Date(year, month, 0).getDate() + return new Date(year, month + 1, 0).getDate() } //判断指定年月第一天是星期几 @@ -460,6 +462,7 @@ export default class DatePicker { _renderCalendar() { var { calendar, max, min, last } = this.props + calendar.list = getCalendarTable({ ...calendar, max, min, last }) this.__CTRL__.children[2].textContent = `${ diff --git a/src/utils.js b/src/utils.js index fafd1a6..06afcfd 100644 --- a/src/utils.js +++ b/src/utils.js @@ -95,7 +95,7 @@ export const clickOutside = function(dom, fn = noop) { if (dom === target || dom.contains(target)) { return } - fn(ev) } + fn(ev) }) }