fix(Stepper): fix minusDisabled、plusDisabled error when set value dynamic @rex-zsd (#1022)

This commit is contained in:
rex 2018-12-06 15:25:00 +08:00 committed by neverland
parent 43a9989673
commit 696ae3c661

View File

@ -14,6 +14,7 @@ VantComponent({
], ],
props: { props: {
value: Number,
integer: Boolean, integer: Boolean,
disabled: Boolean, disabled: Boolean,
disableInput: Boolean, disableInput: Boolean,
@ -41,6 +42,14 @@ VantComponent({
} }
}, },
watch: {
value(value) {
this.setData({
value: this.range(value)
});
}
},
created() { created() {
this.setData({ this.setData({
value: this.range(this.data.value) value: this.range(this.data.value)