fix(Tab): fix line incorrect style when set tabs async @rex-zsd (#816)

This commit is contained in:
rex 2018-10-27 11:11:23 +08:00 committed by neverland
parent aff7444c91
commit 53e752343a
2 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,6 @@ VantComponent({
title() { title() {
const parent = this.getRelationNodes('../tabs/index')[0]; const parent = this.getRelationNodes('../tabs/index')[0];
if (parent) { if (parent) {
parent.setLine();
parent.updateTabs(); parent.updateTabs();
} }
} }

View File

@ -152,8 +152,10 @@ VantComponent({
} }
}); });
this.setLine(); this.setData({}, () => {
this.scrollIntoView(); this.setLine();
this.scrollIntoView();
});
}, },
// scroll active tab into view // scroll active tab into view