fix(Calendar): throw an error that scrollTop in undefined when poppable in popup (#11140)

This commit is contained in:
zijiecai 2022-10-17 23:26:24 +08:00 committed by GitHub
parent 036753f52c
commit 8b515a8c2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,7 +172,9 @@ export default createComponent({
mounted() {
this.init();
// https://github.com/vant-ui/vant/issues/9845
if (!this.poppable) {
this.vanPopup?.$on('opened', this.onScroll);
}
},
/* istanbul ignore next */