diff --git a/src/views/spectrumAnalysis/gamma-analysis.vue b/src/views/spectrumAnalysis/gamma-analysis.vue index f94b7da..a01f337 100644 --- a/src/views/spectrumAnalysis/gamma-analysis.vue +++ b/src/views/spectrumAnalysis/gamma-analysis.vue @@ -252,6 +252,7 @@ export default { this.$bus.$on('accept', this.handleAccept) window.addEventListener('keydown', this.handleKeyboardEvent) + window.addEventListener('click', this.closePeakInfomationTooltip) }, destroyed() { this.cancelLastRequest() @@ -260,6 +261,7 @@ export default { this.$bus.$off('accept', this.handleAccept) window.removeEventListener('keydown', this.handleKeyboardEvent) + window.removeEventListener('click', this.closePeakInfomationTooltip) }, deactivated() { this.nuclideLibraryVisible = false @@ -272,6 +274,7 @@ export default { // 键盘事件 handleKeyboardEvent(event) { this.changeRectByKeyBoard(event.key) + this.closePeakInfomationTooltip() }, /** @@ -1090,7 +1093,7 @@ export default { this.peakInfomationTooltip.content = html this.peakInfomationTooltip.visible = true this.peakInfomationTooltip.left = xPix - this.peakInfomationTooltip.top = yPix - 20 + this.peakInfomationTooltip.top = yPix < 0 ? 20 : yPix - 20 } else { this.$message.error(message) }