fix: 修复 this 绑定偶现的问题

This commit is contained in:
Captain.B 2020-08-27 10:26:16 +08:00
parent 117a1c0e98
commit 788e020168
2 changed files with 8 additions and 6 deletions

View File

@ -96,10 +96,11 @@ export default {
}
},
mounted() {
let self = this;
PerformanceEvent.$on(LIST_CHANGE, () => {
this.$refs.projectRecent.recent();
this.$refs.testRecent.recent();
this.$refs.reportRecent.recent();
self.$refs.projectRecent.recent();
self.$refs.testRecent.recent();
self.$refs.reportRecent.recent();
});
}
}

View File

@ -100,10 +100,11 @@ export default {
},
mounted() {
this.init();
let self = this;
TrackEvent.$on(LIST_CHANGE, () => {
this.$refs.projectRecent.recent();
this.$refs.planRecent.recent();
this.$refs.caseRecent.recent();
self.$refs.projectRecent.recent();
self.$refs.planRecent.recent();
self.$refs.caseRecent.recent();
});
},
methods: {