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

fix #1215
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

View File

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