原生html子页面覆盖父页面,父webview中预加载的popover弹出菜单 ,当子页面显示后,父页面会被覆盖掉...

父webview中预加载的popover弹出菜单 ,当子页面显示后,父页面会被覆盖掉

代码如下:

mui.init();

首页

mui.plusReady(function() {

mui.preload({

id: 'menu',

url: 'menu.html',

show: {

autoShow: true

}

});

});

document.getElementById('classMenu').addEventListener('tap', function() {

plus.webview.getWebviewById('menu').evalJS('mui("#topPopover").popover("toggle")');

plus.webview.currentWebview().append(plus.webview.getWebviewById('menu'));

});

子页面

mui.init();

html,

body {

background-color: #efeff4;

}

/*header.mui-bar {

display: none;

}*/

.mui-content {

padding: 10px;

}

/*跨webview需要手动指定位置*/

#topPopover {

position: fixed;

top: 16px;

right: 6px;

}

#topPopover .mui-popover-arrow {

left: auto;

right: 6px;

}

#actionSheet .mui-table-view {

border-radius: 4px;

}

#actionSheet .mui-table-view-cell {

padding: 15px;

text-align: center;

}

#actionSheet .mui-table-view .mui-table-view-cell:first-child,

#actionSheet .mui-table-view .mui-table-view-cell:first-child>a:not(.mui-btn) {

border-top-right-radius: 4px;

border-top-left-radius: 4px;

}

#actionSheet .mui-table-view .mui-table-view-cell:last-child,

#actionSheet .mui-table-view .mui-table-view-cell:last-child>a:not(.mui-btn) {

border-bottom-right-radius: 4px;

border-bottom-left-radius: 4px;

}

.mui-backdrop-action.mui-backdrop {

bottom: 0;

}

p {

text-indent: 22px;

}

span.mui-icon {

font-size: 14px;

color: #007aff;

margin-left: -15px;

padding-right: 10px;

}

.mui-popover {

height: 300px;

}

mui('.mui-scroll-wrapper').scroll();

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值