近期在琢磨React, 同时需要开发微信端的东西使用了react-weui 结果发现react-weui的文档说明真的是不全, 遇到好几个坑 在这里记录一下 在使用TabBarItem前观看了 react-weui 文档 可以根据active属性 得知设定是否激活,默认为fasle
} label=”11” active={true}/> <TabBarItem icon={
} label=”22” active={true}/>
该属性会影响子节点的active ,导致在TabBarItme里设置active在一开始是会被Tab组件里的defaultindex刷掉的= = 所以最后应该 把初始要激活的菜单写在tab组件的 defaultindex props属性里
} label=”11” active={true}/> <TabBarItem icon={
} label=”22” active={true}/>
I1.jpg)