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

tabbar 切换异常以及AtBtton功能缺失 #38

Closed
crper opened this issue Aug 31, 2018 · 7 comments
Closed

tabbar 切换异常以及AtBtton功能缺失 #38

crper opened this issue Aug 31, 2018 · 7 comments

Comments

@crper
Copy link
Contributor

crper commented Aug 31, 2018

具体效果如下

没有路由跳转的情况下,变动index是正常的

image

加入路由跳转之后就不正常了,其他页面的构造函数初始化current无效,效果如下

image


首页和关于是两个页面,
都加载了tabbar这个组件. 都是在构造函数中初始化的
第一个页面的索引设置0 , 第二个页面设置1;
同一个页面变动state是正常的,
当从路由跳转过去的时候是不正常的

@crper
Copy link
Contributor Author

crper commented Aug 31, 2018

还有AtButton目前不支持原生授权事件onGetUserInfo这些

@crper crper changed the title tabbar 的高亮不准备 tabbar 切换异常以及AtBtton Aug 31, 2018
@crper crper changed the title tabbar 切换异常以及AtBtton tabbar 切换异常以及AtBtton功能缺失 Aug 31, 2018
@jimczj
Copy link
Contributor

jimczj commented Aug 31, 2018

你好,如果你的 tabbar 是全局都用到的话,应该用全局变量或 redux 之类的去管理 current变量

@crper
Copy link
Contributor Author

crper commented Aug 31, 2018

@jimczj 我试试在redux用 ...等会有问题再留言

@crper
Copy link
Contributor Author

crper commented Aug 31, 2018

taro 似乎不能跨页面共享redux ??

在第一个页面已经变动的store,再第二个页面connect链接拿到的值都是store初始化的值...

是我理解不对么...redux不能做跨页面共享!! 只能类似浏览器内单页面的组件通讯!

@jimczj
Copy link
Contributor

jimczj commented Aug 31, 2018

具体可以看文档 https://nervjs.github.io/taro/redux.html

@crper crper closed this as completed Aug 31, 2018
@canfeit
Copy link

canfeit commented Sep 26, 2018

@jimczj AtButton的onGetUserInfo不生效,怎么解决

@jimczj
Copy link
Contributor

jimczj commented Sep 26, 2018

请另外开 issue 提问,贴出代码,报错信息

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