2***@qq.com
2***@qq.com
  • 发布:2017-09-19 12:52
  • 更新:2017-09-25 15:10
  • 阅读:1695

titleNView 自定义按钮上显示不出字体图标,一直显示X

分类:HTML5+
var webview = plus.webview.create('index.html', 'index.html_id',   
                    {  
                        scrollIndicator:'none',   
                        titleNView:   
                        {  

                            backgroundColor: 'rgb(247,247,247)',  
                            titleText: '平台',  
                            titleColor: '#285ab4',  
                            splitLine:{color:'rgba(210,210,210,0.5)'},  
                            autoBackButton: false,  
                            buttons:  
                            [  
                                {  
                                    text: '\ue601',//跳转过去一直显示X,显示不出图标  
                                    color:"black",  
                                    float: 'right',  
                                    fontSrc:"fonts/iconfont.ttf",  
                                    onclick: function()  
                                    {  

                                    }  
                                }  
                            ]  
                        }  
                    });  

                    webview.show("pop-in");
2017-09-19 12:52 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com (作者)

还有需要配置什么的吗?

w***@163.com

w***@163.com

iconfont.ttf 与 mui.ttf 的字体冲突 ,\ue601 换个字体

2***@qq.com

2***@qq.com (作者)

不管换什么字体都显示不出来
下面这种方式就能显示图标


var view2 = new plus.nativeObj.View('tabIcon',  
            {  
                bottom: '10px',  
                left: '150px',  
                width: '50px',  
                height: '50px'  
            },  
            [{  
                tag: 'font',  
                id: 'icon',  
                text: '\ue601',   
                "textStyles":   
                {  
                    fontSrc: "fonts/iconfont.ttf",  
                    "align": "center",  
                    "size": "50px"  

                }  
            }]);  

            view2.show();

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