Commit ad71c509 authored by qingwei.li's avatar qingwei.li

Steps: dynamic update step, fixed #2512

parent 20fabc7b
......@@ -69,7 +69,7 @@ export default {
};
},
created() {
beforeCreate() {
this.$parent.steps.push(this);
},
......
......@@ -39,13 +39,13 @@ export default {
watch: {
active(newVal, oldVal) {
this.$emit('change', newVal, oldVal);
}
},
},
mounted() {
this.steps.forEach((child, index) => {
child.index = index;
});
steps(steps) {
steps.forEach((child, index) => {
child.index = index;
});
}
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment