Skip to content

Commit 95f014c

Browse files
akebechenjiahan
authored andcommitted
[bugfix] Step: step 销毁之前从父 steps 中移除 (youzan#3140)
1 parent 9820e0e commit 95f014c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/step/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ export default sfc({
88
this.$parent.steps.push(this);
99
},
1010

11+
beforeDestroy() {
12+
const index = this.$parent.steps.indexOf(this);
13+
if (index > -1) {
14+
this.$parent.steps.splice(index, 1);
15+
}
16+
},
17+
1118
computed: {
1219
status() {
1320
const index = this.$parent.steps.indexOf(this);

0 commit comments

Comments
 (0)