详细问题描述
在配置文件manifest.json中配置titleNView会导致subNViews配置的最后一个tab点击失效。
![l***@163.com](https://img-cdn-tc.dcloud.net.cn/account/identicon/384d6c2a211734af50be90d72284223d.png)
l***@163.com
- 发布:2017-09-28 22:10
- 更新:2017-09-29 11:40
- 阅读:2292
最佳回复
l***@163.com (作者)
您好!再请教您一个问题,在demo中的父页加入沉浸式标题栏后,子页面无效果。
"titleNView":{"backgroundColor": "rgba(255,103,0,0.95)", "titleText":"众核奇迹", "titleColor":"#fff", "type":"transparent"}
2017-09-29 13:00
n***@gmail.com
"type":"transparent" 表示标题栏上内容(除按钮外)全部透明,当页面滚动时透明度逐渐变化,直到不透明显示。页面有滚动效果才会显示
2017-09-29 14:08
l***@163.com (作者)
子页面有滚动也是不会显示的,只有在父页滚动后,显示出标题栏,子页面才能看到。当父页未下拉显示出标题栏时,切换到子页面滚动也是不会出现标题栏的。
2017-09-29 20:07
n***@gmail.com
肯定啊,你是在父页面配置的titleNView 肯定只会响应父页面的滚动啊
2017-09-29 20:18
l***@163.com (作者)
请问怎么才能设置子页标题栏呢?
2017-09-29 20:25
l***@163.com (作者)
您好!我在您的案例中修改了:
var subpage_style = {top:'0px',bottom:'51px',statusbar:{background:'#FF6700'},titleNView:{backgroundColor:'#FF6700', titleColor:'#fff'}};
和
for(var i = 0, len = subpages.length; i < len; i++) {
if(!plus.webview.getWebviewById(subpages[i])) {
mui.extend(true,subpage_style,{titleNView:{titleText:''+subtitle[i]+''}});
var sub = plus.webview.create(subpages[i], subpages[i], subpage_style);
//初始化隐藏
sub.hide();
self.append(sub);
}
}
在父页中使用了沉浸式状态栏,安卓能正常显示子页标题栏,但在IOS中会与状态栏重叠,请问有什么办法能解决呢?谢谢!
2017-09-30 01:07