1
0
mirror of https://gitee.com/vant-contrib/vant-weapp.git synced 2025-04-06 03:58:05 +08:00

[bugfix] Area: 修复特殊情况下初始化选项错误

fix 
This commit is contained in:
rex 2019-02-03 21:26:32 +08:00 committed by GitHub
parent 0e699d950e
commit f915fc2333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,17 +30,15 @@ VantComponent({
currentIndex: 0
},
created() {
beforeCreate() {
const { defaultIndex, initialOptions } = this.data;
this.set(
{
currentIndex: defaultIndex,
options: initialOptions
},
() => {
this.setIndex(defaultIndex);
}
);
this.set({
currentIndex: defaultIndex,
options: initialOptions
}).then(() => {
this.setIndex(defaultIndex);
});
},
computed: {