Fixed: one page Swipe components error (#70)

This commit is contained in:
Kay
2017-08-09 14:48:46 +08:00
committed by 张敏
parent 93db67b964
commit 7bc8c5022a
3 changed files with 33 additions and 13 deletions
+7
View File
@@ -10,6 +10,13 @@ export default {
beforeCreate() {
this.$parent.swipes.push(this);
},
destroyed() {
const index = this.$parent.swipes.indexOf(this)
if (index > -1) {
this.$parent.swipes.splice(index, 1)
}
}
};
</script>