Steps: dynamic update step, fixed #2512

pull/2523/head
qingwei.li 2017-01-19 14:03:34 +08:00
parent 20fabc7b09
commit ad71c509b4
2 changed files with 7 additions and 7 deletions

View File

@ -69,7 +69,7 @@ export default {
}; };
}, },
created() { beforeCreate() {
this.$parent.steps.push(this); this.$parent.steps.push(this);
}, },

View File

@ -39,13 +39,13 @@ export default {
watch: { watch: {
active(newVal, oldVal) { active(newVal, oldVal) {
this.$emit('change', newVal, oldVal); this.$emit('change', newVal, oldVal);
} },
},
mounted() { steps(steps) {
this.steps.forEach((child, index) => { steps.forEach((child, index) => {
child.index = index; child.index = index;
}); });
}
} }
}; };
</script> </script>