popover的位置在有滚动条拖动后的情况下会弹出在可视窗口以下
可以修改mui.js解决:
if ((pHeight + arrowSize) < (offset.top - window.pageYOffset-window.scrollY+30)) { //top
pTop = offset.top - pHeight - arrowSize-window.scrollY;
} else if ((pHeight + arrowSize) < (wHeight - (offset.top - window.pageYOffset-window.scrollY) - aHeight)) { //bottom
position = 'bottom';
pTop = offset.top + aHeight + arrowSize-window.scrollY+18;
} else { //middle
position = 'middle';
pTop = Math.max((wHeight - pHeight) / 2 + window.pageYOffset-window.scrollY, 0);
pLeft = Math.max((wWidth - pWidth) / 2 + window.pageXOffset, 0);
}
window.scrollY是滚动条的高度
window.scrollY+30是考虑到一般app都有header和nav,+30避免被他们挡住弹窗
0 个评论
要回复文章请先登录或注册