jd-opensource / jd-opensource/taro-ui

动态生成AtTabsPane的时候,无法点击第2个tab

Open
#1,384 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

Taro版本3.2.0
模式weapp

AtTabs组件有问题。
当list通过接口请求。
动态生成AtTabsPane的时候
第2个tab无法点击 无法触发onClick事件
```
const tabList = useMemo(() => {
list.forEach(i => (i as any).fc = Nav);
return [
{ title: '精选', id: 'jx' },
...list,
{ title: '我的', id: 'mine' }
] as any[];
}, [list.length]);
const [current, setCurrent] = useState(0);

const cacheTabs = useMemo(() => tabList.map((li, index) => {
const { fc: FC } = li;
return


}), [current, tabList.length]);

return

{cacheTabs}


```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.