mirror of https://github.com/ElemeFE/element
Steps: dynamic update step, fixed #2512
parent
20fabc7b09
commit
ad71c509b4
|
@ -69,7 +69,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
beforeCreate() {
|
||||||
this.$parent.steps.push(this);
|
this.$parent.steps.push(this);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue