Popover组件的位置计算问题
Aperta
component/popover
to be investigated
- Lingua principale
- Vue
- Stelle
- 17.5k
- Fork
- 3.6k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
当挂载popover组件的元素存在定位的时候, popover组件的content插槽的内容无法显示在预期的位置, 看了作者写的源码, 获取的是该组件default插槽的内容相对"视窗"的偏移值, 依靠这个"视窗"偏移去计算content内容的''文档''偏移值,似乎不甚合理.我也尝试着将该组件内的getBoundingClientRect().top 换成offsetTop后, 内容就显示在预期的位置了.
代码如下:
```
hello world
更多
hello world
更多
import { Popover } from 'vux'
export default {
name: 'app',
methods: {
},
components: {
Popover
}
}
@import '~vux/src/styles/reset.less';
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.