From 7cc887a20c6967fb1907659dc24593822682736d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sat, 22 Feb 2020 14:42:09 +0800 Subject: [PATCH] fix(Calendar): scrollIntoView error when hidden (#5708) --- src/calendar/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calendar/index.js b/src/calendar/index.js index ee87d653c..7cb06c4d5 100644 --- a/src/calendar/index.js +++ b/src/calendar/index.js @@ -166,9 +166,10 @@ export default createComponent({ this.$nextTick(() => { const { currentDate } = this; const targetDate = this.range ? currentDate[0] : currentDate; + const displayed = this.value || !this.poppable; /* istanbul ignore if */ - if (!targetDate) { + if (!targetDate || !displayed) { return; }