fixed
parent
16bdecc7a6
commit
9c52169a5b
|
@ -150,6 +150,10 @@ class PopConfirm extends Component {
|
|||
|
||||
if (left < 260 || (left > 260 && window.innerWidth - left > 260)) {
|
||||
placement = 'right'
|
||||
left -= 12
|
||||
if (left < 0) {
|
||||
left = 0
|
||||
}
|
||||
styles.left = left + 'px'
|
||||
} else {
|
||||
// 减去小三角形的位移 12px
|
||||
|
|
|
@ -94,9 +94,16 @@ class Tooltip extends Component {
|
|||
|
||||
if (left < 360 || (left > 360 && window.innerWidth - left > 360)) {
|
||||
placement = 'right'
|
||||
left -= 12
|
||||
if (left < 0) {
|
||||
left = 0
|
||||
}
|
||||
styles.left = left + 'px'
|
||||
} else {
|
||||
let right = window.innerWidth - left - this.clientWidth
|
||||
let right = window.innerWidth - left - this.clientWidth - 12
|
||||
if (right < 0) {
|
||||
right = 0
|
||||
}
|
||||
styles.right = right + 'px'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue