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

Steps: dynamic update step, fixed #2512

parent 20fabc7b
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
}; };
}, },
created() { beforeCreate() {
this.$parent.steps.push(this); this.$parent.steps.push(this);
}, },
......
...@@ -39,13 +39,13 @@ export default { ...@@ -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>
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