在 defaultTabBar的renderTab中 添加 index 参数 #401
Open
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
我最近在tabs的基础上封装了一个业务逻辑比较复杂的tab切换组件,我使用了defaultTabBar的renderTab丰富了tab按钮的样式,但是我通过renderTab渲染自定义组件时,无法便捷地拿到index,只能把原数据遍历一遍才能间接的获取index,这样会导致我的页面非常卡顿,所以我希望在执行renderTab函数时把index作为第二参数传递下去