4***@qq.com
4***@qq.com
  • 发布:2018-03-15 11:45
  • 更新:2018-03-15 12:16
  • 阅读:1141

ios 原生标题 返回按钮显示问好

分类:HBuilder

titleNView: {
titleText: title,
titleColor: "#000000",
titleSize: "17px",
autoBackButton: false,
buttons: [{
color: '#FD7B0D',
fontWeight: 'bold',
fontSize: '25px',
fontSrc: '_www/fonts/mui.ttf',
text: '\ue582',
float: 'left',
onclick: function() {
plus.webview.close(id);
}
}],

2018-03-15 11:45 负责人:无 分享
已邀请:
Trust

Trust - 少说废话

提供下HBuilder版本信息

安卓上正常么?提供一个测试用例。

  • 4***@qq.com (作者)

    mui.plusReady(function() {

    var titleView = plus.webview.currentWebview().getTitleNView();

    var about_left = window.innerWidth - 34;

    var bitmap = new plus.nativeObj.Bitmap("btn");

    //bitmap.loadBase64Data("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEUAAAAAev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8Aev8AAABINtoqAAAADHRSTlMA/fPQ0M/e3tzs7OjgY5g4AAAAAWJLR0QAiAUdSAAAAAd0SU1FB+EBFwEbOGGUPSIAAAA2SURBVDjLY2AY9oDxDBZwCJ8EswsW4DrQ/hicgPTQZSvHAioG2h+DE5AeupyrsIDVA+0PqgEAu36BkQX5nBQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTctMDEtMjNUMDE6Mjc6NTYrMDg6MDC8FK1uAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE3LTAxLTIzVDAxOjI3OjU2KzA4OjAwzUkV0gAAAABJRU5ErkJggg==");

    bitmap.load('../../icons/ys.png');

    titleView.drawBitmap(bitmap, {}, {

    top: "10px",

    left: about_left + "px",

    width: "24px",

    height: "24px"

    });

    titleView.interceptTouchEvent(true);

    titleView.addEventListener("click", function(e) {

    var x = e.clientX;

    if(x > about_left) {

    successfn();

    }

    }, false);

    })


    苹果

    load不显示

    base64显示

    2018-03-15 13:19

  • Trust

    回复 4***@qq.com:请在安卓上测试一下,并且上传完整的可用的测试用例。

    2018-03-15 13:49

该问题目前已经被锁定, 无法添加新回复