From 26aac6037bf666744574d8d05278b271bb7f2c78 Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 11 Aug 2019 19:30:06 +0800 Subject: [PATCH] [bugfix] Tab: incorrect title position when insert tab pane (#4091) --- src/tabs/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tabs/index.js b/src/tabs/index.js index 416363ab9..578194402 100644 --- a/src/tabs/index.js +++ b/src/tabs/index.js @@ -110,8 +110,11 @@ export default createComponent({ children() { this.setCurrentIndexByName(this.currentName || this.active); - this.scrollIntoView(); this.setLine(); + + this.$nextTick(() => { + this.scrollIntoView(true); + }); }, currentIndex() {