mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Calendar): scrollIntoView error when hidden (#5708)
This commit is contained in:
parent
b705b7a58e
commit
7cc887a20c
@ -166,9 +166,10 @@ export default createComponent({
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const { currentDate } = this;
|
const { currentDate } = this;
|
||||||
const targetDate = this.range ? currentDate[0] : currentDate;
|
const targetDate = this.range ? currentDate[0] : currentDate;
|
||||||
|
const displayed = this.value || !this.poppable;
|
||||||
|
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (!targetDate) {
|
if (!targetDate || !displayed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user