-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
小程序 page config 中配置 backgroundColor 无效 #1181
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
代码贴一下 |
挂载在 app.tsx 的 page 属性上的页面 class Index extends Component<{}, State> { state = { render () { navigationBarTitleText 可以正常配置显示,但 backgroundColor 不生效。 |
@zoux config中的backgroundColor属性是设置窗口的背景色,这种在下拉刷新时能看到!想要设置page的背景色直接在css文件,加如下代码
|
这个issue怎么关掉了?这不算解决了问题吧,用css的话我还要解决如何把容器撑开的问题 |
不用考虑撑开的问题,直接写page的就行了 |
那如果在react native端 page是不支持的啊 |
page {
/*background-color: #ccc;*/ // 生效
background-color: var(--myBackgroundColor); // 不生效
}
.myTextClass {
background-color: var(--myBackgroundColor); // 生效
} 想问一下为什么var的方法就单独page不可行? |
设置 navigationBarTitleText 是有效的,而在 config 对象里设置 backgroundColor 并赋值如'#f7f7f7',页面中并未生效。
目前暂时通过 min-height: 100vh + background 的方式实现的。
The text was updated successfully, but these errors were encountered: