mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(Tab): fix init position incorrect (#4521)
* fix(Tab): fix init position incorrect * style(Tab): prettier
This commit is contained in:
parent
0e60dc1a7e
commit
56ecd55e12
@ -49,10 +49,6 @@ VantComponent({
|
|||||||
type: null,
|
type: null,
|
||||||
value: 0,
|
value: 0,
|
||||||
observer(name) {
|
observer(name) {
|
||||||
if (!this.skipInit) {
|
|
||||||
this.skipInit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name !== this.getCurrentName()) {
|
if (name !== this.getCurrentName()) {
|
||||||
this.setCurrentIndexByName(name);
|
this.setCurrentIndexByName(name);
|
||||||
}
|
}
|
||||||
@ -110,10 +106,8 @@ VantComponent({
|
|||||||
container: () => this.createSelectorQuery().select('.van-tabs'),
|
container: () => this.createSelectorQuery().select('.van-tabs'),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!this.skipInit) {
|
this.resize();
|
||||||
this.resize();
|
this.scrollIntoView();
|
||||||
this.scrollIntoView();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user