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} `