web前端全系列 教程
1839个小节阅读:2244.2k
目录
鸿蒙应用开发
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
app.json
中的部分配置,也支持对单个页面进行配置
可以在页面对应的 文件.json
文件来对本页面的表现进行配置
属性 | 类型 | 默认值 | 描述 |
---|---|---|---|
navigationBarBackgroundColor | HexColor | #000000 | 导航栏背景颜色,如 #000000 |
navigationBarTextStyle | string | white | 导航栏标题颜色,仅支持 black / white |
navigationBarTitleText | string | 导航栏标题文字内容 | |
backgroundColor | HexColor | #ffffff | 窗口的背景色(开启下拉菜单可以观察) |
backgroundTextStyle | string | dark | 下拉 loading 的样式,仅支持 dark / light |
enablePullDownRefresh | boolean | false | 是否开启当前页面下拉刷新 |
onReachBottomDistance | number | 50 | 页面上拉触底事件触发时距页面底部距离,单位为px。 |
style | string | default | 启用新版的组件样式 |
... | ... | ... | ... |
页面 文件.json
文件配置
虽然配置与 app.json
基本一致,但是注意,不在需要添加 window
作为父级
xxxxxxxxxx
{
"usingComponents": {},
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "第二个页面",
"backgroundColor": "#ffffff",
"backgroundTextStyle": "light",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50,
"style":"v2"
}
实时效果反馈
1. 小程序中,单个文件的配置中,那个是可以修改导航栏文本:
A usingComponents
B style
C navigationBarTextStyle
D navigationBarTitleText
答案
1=>D