Closed Trojan0523 closed 11 months ago
用 antd-mobile
写了一个相同场景的表现形式对比了一下
repository:https://github.com/Trojan0523/antd-mobile-tabs-reproduction
live demo: https://antd-mobile-tabs-reproduction.vercel.app/
there is a pr: #675
close this issue, hope for next release
Which React Vant packages are impacted?
react-vant
(React Vant core)react-vant-icons
(React Vant Icon)What version of React Vant are you using?
^3.3.1
Reproduce live demo(codesandebox or stackblitz)?
https://github.com/Trojan0523/reac-vant-tabs-reproduction
Descripition
页面初始化时,先渲染一个 tab,横条样式做定位,在
useEffect
中往 tabPaneList 中新增一个 tab 项,横条没有进行重新渲染&定位expect: tab 列表新增或删除 tab 项后,都应该对 tab 组件进行重新渲染,并且重新计算横条样式