这是因为小程序的 navigationBarTextStyle(导航栏标题颜色)配置,就支持 black / white 两种。(小程序全局配置州哗慧)
在小程序的app.json文件中配置 window属芦大性
{册答 "window": {
"navigationBarTextStyle": "black"
}
}
用这个设弯渣置页面导航栏字体跟颜色<page-meta>尺蠢
<navigation-bar
title="{{nbTitle}}"
loading="{{nbLoading}}"
front-color="{{nbFrontColor}}"
background-color="{{nbBackgroundColor}}"
color-animation-duration="2000"
color-animation-timing-func="easeIn"
/>
</page-meta>
Page({
data: {
nbFrontColor: '#000000',
nbBackgroundColor: '#ffffff'陵闹陪,
},
onLoad() {
this.setData({
nbTitle: '新标题',
nbLoading: true,
nbFrontColor: '#ffffff',
nbBackgroundColor: '#000000',
})
}})
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)