diff --git a/src/tabbar/index.js b/src/tabbar/index.js index 2e89602ed..d5d73cff2 100644 --- a/src/tabbar/index.js +++ b/src/tabbar/index.js @@ -56,7 +56,13 @@ export default createComponent({ mounted() { if (this.placeholder && this.fixed) { - this.height = this.$refs.tabbar.getBoundingClientRect().height; + const setHeight = () => { + this.height = this.$refs.tabbar.getBoundingClientRect().height; + }; + + setHeight(); + // https://github.com/youzan/vant/issues/10131 + setTimeout(setHeight, 100); } },