mirror of https://github.com/ElemeFE/element
Merge pull request #2523 from QingWei-Li/dynamic-steps
Steps: dynamic update step, fixed #2512pull/2566/head
commit
6bfcd2fb75
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue