From dff1eb1a14610ebe383cc2f37e2cde40ce112380 Mon Sep 17 00:00:00 2001 From: zhouyu Date: Tue, 21 Jul 2020 16:03:45 +0800 Subject: [PATCH] =?UTF-8?q?DatePicker=20capture=20=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=BAfalse=20=E7=82=B9=E5=87=BB=E5=B9=B4=E3=80=81=E6=9C=88?= =?UTF-8?q?=E3=80=81=E6=97=A5=E5=BC=82=E5=B8=B8=E5=85=B3=E9=97=AD=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/date-picker/base/mixin.js | 4 +++- src/components/date-picker/base/month-table.vue | 2 +- src/components/date-picker/base/year-table.vue | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/date-picker/base/mixin.js b/src/components/date-picker/base/mixin.js index d2dd60c4..329042c6 100644 --- a/src/components/date-picker/base/mixin.js +++ b/src/components/date-picker/base/mixin.js @@ -40,7 +40,9 @@ export default { }, }, methods: { - handleClick (cell) { + handleClick (cell, e) { + e.stopPropagation(); + if (cell.disabled || cell.type === 'weekLabel') return; const newDate = new Date(clearHours(cell.date)); diff --git a/src/components/date-picker/base/month-table.vue b/src/components/date-picker/base/month-table.vue index 5c5ef6e5..57001141 100644 --- a/src/components/date-picker/base/month-table.vue +++ b/src/components/date-picker/base/month-table.vue @@ -3,7 +3,7 @@ diff --git a/src/components/date-picker/base/year-table.vue b/src/components/date-picker/base/year-table.vue index abad1573..b1f9621c 100644 --- a/src/components/date-picker/base/year-table.vue +++ b/src/components/date-picker/base/year-table.vue @@ -3,7 +3,7 @@ {{ cell.date.getFullYear() }}