fix(Tabs): setLine when popup reopened (#8792)

This commit is contained in:
neverland 2021-06-01 10:34:43 +08:00 committed by GitHub
parent c608f15f47
commit 34f389917f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -60,6 +60,7 @@ export default createComponent({
},
created() {
// https://github.com/youzan/vant/issues/8634
if (this.vanPopup) {
this.vanPopup.onReopen(() => {
this.start();

View File

@ -42,6 +42,12 @@ export default createComponent({
}),
],
inject: {
vanPopup: {
default: null,
},
},
model: {
prop: 'active',
},
@ -171,6 +177,13 @@ export default createComponent({
mounted() {
this.init();
// https://github.com/youzan/vant/issues/7959
if (this.vanPopup) {
this.vanPopup.onReopen(() => {
this.setLine();
});
}
},
activated() {