lshuhe@qq.com
lshuhe@qq.com
  • 发布:4 天前
  • 更新:4 天前
  • 阅读:17

设置h5的titleNView无效

分类:uni-app
{  
            "path" : "pages/commodityManagement/commodityManagement",  
            "style" : {  
                "navigationStyle": "custom",   
                "app-plus": {  
                    "titleNView": {  
                        "titleText": "商品管理",  
                        "buttons": [  
                            {  
                                "text": "\ue613",   
                                "fontSize":"16",  
                                "float": "right",  
                                "fontSrc": "static/font/add.ttf"  
                            }  
                        ]  
                    }  
                },  
                "h5": {  
                    "titleNView": {  
                        "titleText": "商品管理",  
                        "buttons": [  
                            {  
                                "text": "\ue613",   
                                "fontSize":"16",  
                                "float": "right",  
                                "fontSrc": "static/font/add.ttf"  
                            }  
                        ]  
                    }  
                }  
            }  
        }  

不设置 "navigationStyle": "custom",在谷歌浏览器中就报错:

index.umd.min.js:1 [system] TypeError: Cannot read property '$children' of undefined  
    at index.umd.min.js:1  
    at Array.forEach (<anonymous>)  
    at o (index.umd.min.js:1)  
    at s (index.umd.min.js:1)  
    at index.umd.min.js:1  
    at Array.forEach (<anonymous>)  
    at VueComponent.btns (index.umd.min.js:1)  
    at Watcher.get (vue.runtime.esm.js:4478)  
    at Watcher.evaluate (vue.runtime.esm.js:4583)  
    at Proxy.computedGetter (vue.runtime.esm.js:4835)  

设置了 "navigationStyle": "custom"就不报错,但是不管怎么样,h5端都不显示设置的titleNView,HBuilderX是2.2.1.20190813的

4 天前 分享
已邀请:

要回复问题请先登录注册