From 95f014cff4f22a0cb0b76577ccfcf5e437024015 Mon Sep 17 00:00:00 2001 From: akebe Date: Sat, 13 Apr 2019 09:10:30 +0800 Subject: [PATCH] =?UTF-8?q?[bugfix]=20Step:=20step=20=E9=94=80=E6=AF=81?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E4=BB=8E=E7=88=B6=20steps=20=E4=B8=AD?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=20(#3140)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/step/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/step/index.js b/packages/step/index.js index 45929231d..cfbcfbeae 100644 --- a/packages/step/index.js +++ b/packages/step/index.js @@ -8,6 +8,13 @@ export default sfc({ this.$parent.steps.push(this); }, + beforeDestroy() { + const index = this.$parent.steps.indexOf(this); + if (index > -1) { + this.$parent.steps.splice(index, 1); + } + }, + computed: { status() { const index = this.$parent.steps.indexOf(this);