Skip to content
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

实现 动态的控制navbar的背景色、返回按钮和title显示颜色 的方案 #12

Open
Onery opened this issue Oct 25, 2019 · 2 comments

Comments

@Onery
Copy link

Onery commented Oct 25, 2019

为了实现返回 icon 和title根据滑动距离动态改变颜色,用了icon font 显示返回按钮。
在第4行“”

第23行“{{title}}
分别添加了“style="color:{{color}}"”
这样就可以实现了。
希望有帮助

@Onery Onery changed the title 当自定义返回按钮为icon-font 实现 动态的控制navbar的背景色、返回按钮和title显示颜色 Oct 25, 2019
@Onery Onery changed the title 实现 动态的控制navbar的背景色、返回按钮和title显示颜色 实现 动态的控制navbar的背景色、返回按钮和title显示颜色 的方案 Oct 25, 2019
@Athrunsky
Copy link

确实有效,感谢提供

@chatterzhao
Copy link

我的navBar.wxml 的4行加完长这样:

<view class="lxy-nav-bar__placeholder {{ios ? 'ios' : 'android'}}"
        style="padding-top: {{navBarHeight+ navBarExtendHeight}}px;visibility: hidden;color:{{color}}"></view>

23行加完:

<block wx:else style="color:{{color}}">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants