jd-opensource / jd-opensource/taro-ui
AtTabs 报Cannot read property 'map' of undefined
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
**问题描述**
基于taro1.3.23使用taro-ui 中的AtTabs(可滑动的tabs),就会报错
**复现步骤**
```js
// 这里可以贴代码
class TabsContent extends Component {
constructor () {
super(...arguments)
this.state = {
current: 0,
tabTitle: [
{ title: 'On the Move' },
{ title: 'Culinary' },
{ title: 'Entertainment' },
{ title: 'Lifestyle' },
{ title: 'SPORTS' },
]
}
}
handleClick (value) {
this.setState({
current: value
})
}
render() {
return (
标签页一的内容
标签页二的内容
标签页三的内容
标签页四的内容
标签页五的内容
标签页六的内容
)
}
}
```
**期望行为**
**报错信息**
thirdScriptError
Cannot read property 'map' of undefined;at api nextTick callback function
TypeError: Cannot read property 'map' of undefined
**系统信息**
Taro CLI 1.3.23 environment info:
System:
OS: macOS High Sierra 10.13.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
Yarn: 1.19.1 - ~/.yarn/bin/yarn
npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
Taro UI 版本 [ v.2.2.4]
"taro-ui": "^2.2.4"
**补充信息**
Contributor guide
Assessment
This issue has not been assessed yet.