- 适用场景:
H5端的沉浸式导航
- 实现方法:
1、page.json中设置导航栏
{
"path": "pages/test-11-chenjin/chenjin",
"style": {
"app-plus": {
"titleNView": {
"type": "transparent",//导航栏样式。"transparent"-滚动透明渐变
"buttons": [{
type": "share"
}]
}
}
}
}
2、也可以在chenjin.vue页面中修改导航栏样式
// 通过api修改导航栏的属性
uni.setNavigationBarColor({
frontColor: "#ffffff",
backgroundColor: "#000000"
});