From 6a3f99177ba5bb457213a31ce502e7ad86eb93c3 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Wed, 13 Dec 2023 14:32:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=82=B9=E5=87=BB=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BB=BB=E6=84=8F=E4=BD=8D=E7=BD=AE=E6=97=B6=E5=85=B3=E9=97=AD?= =?UTF-8?q?Peak=20Infomation=20Tooltip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/spectrumAnalysis/gamma-analysis.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) }