diff --git a/src/views/detections/DetectionList.vue b/src/views/detections/DetectionList.vue index 30da9f47..c6508b83 100644 --- a/src/views/detections/DetectionList.vue +++ b/src/views/detections/DetectionList.vue @@ -66,7 +66,11 @@ export default { }, collapse () { this.isCollapse = true - this.$refs[`detectionRow${this.collapseIndex}`].collapse() + if (this.$refs[`detectionRow${this.collapseIndex}`] && this.$refs[`detectionRow${this.collapseIndex}`].collapse) { + this.$refs[`detectionRow${this.collapseIndex}`].collapse() + } else { + this.$refs[`detectionRow${this.collapseIndex}`][0].collapse() + } }, handleScroll (e) { if (e.target.className === 'cn-detection__shadow') { diff --git a/src/views/entityExplorer/entityList/EntityList.vue b/src/views/entityExplorer/entityList/EntityList.vue index b149a9a6..4232e3d2 100644 --- a/src/views/entityExplorer/entityList/EntityList.vue +++ b/src/views/entityExplorer/entityList/EntityList.vue @@ -95,7 +95,11 @@ export default { }, collapse () { this.isCollapse = true - this.$refs[`entityRow${this.collapseIndex}`].collapse() + if (this.$refs[`entityRow${this.collapseIndex}`] && this.$refs[`entityRow${this.collapseIndex}`].collapse) { + this.$refs[`entityRow${this.collapseIndex}`].collapse() + } else { + this.$refs[`entityRow${this.collapseIndex}`][0].collapse() + } }, pageNo (val) { this.$emit('pageNo', val)