fix: 修复实体列表展开后点击外部无法收回的问题

This commit is contained in:
chenjinsong
2022-09-01 11:05:29 +08:00
parent 6862e29663
commit 0af309bd27
2 changed files with 10 additions and 2 deletions

View File

@@ -66,7 +66,11 @@ export default {
},
collapse () {
this.isCollapse = true
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') {

View File

@@ -95,7 +95,11 @@ export default {
},
collapse () {
this.isCollapse = true
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)