From 0614910b7190bfb56be42aa2865af639334adb41 Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 17 Jan 2024 17:34:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96tips=E5=92=8Cpopconfirm?= =?UTF-8?q?=E7=9A=84=E5=AE=9A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modal/popconfirm.js | 7 +++++-- src/modal/tooltip.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modal/popconfirm.js b/src/modal/popconfirm.js index 37e2ad2..935077c 100644 --- a/src/modal/popconfirm.js +++ b/src/modal/popconfirm.js @@ -152,7 +152,11 @@ class PopConfirm extends Component { placement = 'right' styles.left = left + 'px' } else { - let right = window.innerWidth - left + this.clientWidth + // 减去小三角形的位移 12px + let right = window.innerWidth - left + this.clientWidth - 12 + if (right < 0) { + right = 0 + } styles.right = right + 'px' } @@ -225,7 +229,6 @@ class PopConfirm extends Component { >确定 - ` diff --git a/src/modal/tooltip.js b/src/modal/tooltip.js index 88aa4c0..ffd58b3 100644 --- a/src/modal/tooltip.js +++ b/src/modal/tooltip.js @@ -124,7 +124,7 @@ class Tooltip extends Component {
- ${this.title} + ${this.title}
`