youzan / vant-weapp

轻量、可靠的小程序 UI 组件库
https://vant.pro/vant-weapp/
MIT License
17.69k stars 3.48k forks source link

关于van-tabbar #1403

Closed CurryHan closed 5 years ago

CurryHan commented 5 years ago

不理解为什么 currentActive 为什么从data中去除掉了 之前可以通过setData currentActive 去主动 更改组件的active tabbarItem 现在却不行了

rex-zsd commented 5 years ago

currentActive是内部使用的属性,从未暴露给外部使用,如果需要修改激活的item请操作active属性。 从data中移除 currentActive 是为了优化性能,因为渲染层并没有用到这个属性。