一个月了还没人来解答,附上代码:
var id = 'app_parent';
if(p['new_window'] != undefined) {
console.log('newWindow:' + p['new_window']);
id += "?" + new Date().getTime();
}
p['sub_win_id'] = p['id'];
p['main_win_id'] = id;
p['extras'] = p['extras'] == undefined ? {} : p['extras'];
console.log("id:"+JSON.stringify(mui.webviews))
var headerWebview = mui.preload({ //父窗口
'id':id,
'url':id + ".html"
});
//先根据id获取到当前webview的对象
var contentWebview = plus.webview.getWebviewById(p['id']);
if(!contentWebview){
var url = p['id']+'.html';
contentWebview = plus.webview.create(url,p['id'],{},p['extras']);
}
contentWebview.addEventListener('loaded', function() {
headerWebview.append(contentWebview);
headerWebview.show("slide-in-right", 150);
plus.nativeUI.closeWaiting();
}, false);
contentWebview.addEventListener('loading', function() {
plus.nativeUI.showWaiting();
}, false);
1 个回复
GuiChun - 90IT_boy
自定义动画怎样写?兼容性不好,动画没效果啊