skyline模式下,使用navigate进行跳转,左上角无返回按钮?
<navigator url="/pages/goldDetail/goldDetail" open-type="navigate" target="self" class="areaTitle-minGap">明细列表</navigator>gold
goldDetail.json {
"usingComponents": {},
"navigationStyle": "default"
}
app.json: {
"pages": [
"pages/index/index",
"pages/recommend/recommend",
"pages/story/story",
"pages/user/user",
"pages/goldDetail/goldDetail",
"pages/privacy/privacy",
"pages/guide/guide"
],
"window": {
"navigationBarTextStyle": "black",
"navigationStyle": "default",
"homeButton": true
},
"style": "v2",
"renderer": "skyline",
"rendererOptions": {
"skyline": {
"defaultDisplayBlock": true,
"disableABTest": true,
"sdkVersionBegin": "3.0.0",
"sdkVersionEnd": "15.255.255"
}
},
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents",
"tabBar": {
"color": "#515151",
"selectedColor": "red",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/images/nav-images/home.png",
"selectedIconPath": "/images/nav-images/home-select.png"
},
{
"pagePath": "pages/recommend/recommend",
"text": "推荐",
"iconPath": "/images/nav-images/sale.png",
"selectedIconPath": "/images/nav-images/sale-select.png"
},
{
"pagePath": "pages/story/story",
"text": "发现",
"iconPath": "/images/nav-images/find.png",
"selectedIconPath": "/images/nav-images/find-select.png"
},
{
"pagePath": "pages/user/user",
"text": "我的",
"iconPath": "/images/nav-images/user.png",
"selectedIconPath": "/images/nav-images/user-select.png"
}
]
}
}
编译错误: Compiling pages/goldDetail/goldDetail.json fail: Error: pages/goldDetail/goldDetail.json: 根据页面或 app.json 的配置,
pages/goldDetail/goldDetail.json 页面“renderer” 为“skyline”,页面配置 “navigationStyle”需设置为“custom”;
当app.jsont和goldDetail.json都配置了:"navigationStyle": "default"时,就出上面的报错信息。 去掉goldDetail.json的"navigationStyle": "default"配置项,没有编译报错。但是到了goldDetail页面。没有到了返回按钮。