使用Android-SDK@1.9.9.68191_20190819-1打包,android版本打开没有显示标题。js如下
// 处理点击事件
var openw = null;
/**
- 打开新窗口
- @param {URIString} id : 要打开页面url
- @param {String} t : 页面标题名称
- @param {JSON} ws : Webview窗口属性
*/
w.clicked = function (id, t, ws) {
if (event) { event.preventDefault(); }
if (openw) {//避免多次打开同一个页面
return null;
}
if (w.plus) {
ws = ws || {};
ws.scrollIndicator || (ws.scrollIndicator = 'none');
ws.scalable || (ws.scalable = false);
ws.backButtonAutoControl || (ws.backButtonAutoControl = 'close');
ws.titleNView = ws.titleNView || { autoBackButton: true };
ws.titleNView.backgroundColor = '#ffffff';
ws.titleNView.titleColor = '#000000';
ws.doc && (ws.titleNView.buttons = ws.titleNView.buttons || [], ws.titleNView.buttons.push({ fontSrc: '_www/fonts/mui.ttf', text: '\ue301', fontSize: '20px', onclick: 'javascript:openDoc()' }));
t && (ws.titleNView.titleText = t);
//进度显示
ws.progress = ws.progress || {};
if (!ws.progress.color) {
ws.progress.color = '#0000FF';
}
var wid = ws.id || id;
openw = plus.webview.create(id, wid, ws);
w.overrideResourceRequest(openw);
openw.addEventListener('close', function () {
openw = null;
}, false);
openw.show(as);
return openw;
} else {
//w.open(id);
location.href = id;
}
return null;
};
0 个回复