优化tips和popconfirm的定位
parent
158bd68705
commit
0614910b71
|
@ -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 {
|
|||
>确定</wc-button
|
||||
>
|
||||
</footer>
|
||||
<i class="trigon"></i>
|
||||
</div>
|
||||
</main>
|
||||
`
|
||||
|
|
|
@ -124,7 +124,7 @@ class Tooltip extends Component {
|
|||
<main class="container">
|
||||
<div class="wrapper" ref="wrap"><slot></slot></div>
|
||||
<div class="tooltip" ref="tips" #animation=${{}}>
|
||||
<slot name="title">${this.title}</slot><i class="trigon"></i>
|
||||
<slot name="title">${this.title}</slot>
|
||||
</div>
|
||||
</main>
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue