fix(location) : 修复多次render导致tab栏下划线动画不流畅的问题
if (activeTab ) {
} ...
componentDidUpdate() { componentDidUpdate(this); }
======> // 多添加个判断条件,重复的activeKey不设置动画 if (activeTab && (!prevProps || activeKey !== prevProps.activeKey)) {
} ...
componentDidUpdate(prevProps) { // resolve the probleme that when our component render many times ,inkTabBarNode's animation is not smoothly. componentDidUpdate(this, false, prevProps); }
This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/react-component/tabs/2zj7bhkdt ✅ Preview: https://tabs-git-fork-lovelyjason-fix-activetab.react-component.now.sh