jd-opensource / jd-opensource/taro-ui
AtSwipeAction 加载时候报错TypeError: Cannot read properties of null (reading 'width')
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
**问题描述**
taro3使用taro ui中的AtSwipeAction做滑动删除,界面加载中报错TypeError: Cannot read properties of null (reading 'width')
**复现步骤**
```js
1.import {AtButton, AtList, AtListItem, AtNavBar,AtSwipeAction} from 'taro-ui'
{
this.state.list.map((item, index) => {
return (
{
}} options={[
{
text: '删除',
style: {
backgroundColor: '#FF4949'
}
}
]}>
)
})
}
```
**期望行为**
控制台不报错,可以正常使用
**报错信息**
index.esm.js:6128 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'width')
at AtSwipeAction.eval (index.esm.js:6128:50)
at step (index.esm.js:218:17)
at Object.eval [as next] (index.esm.js:167:14)
at fulfilled (index.esm.js:126:24)
**系统信息**
- Taro 版本 v3.6.27
- Taro UI 版本 v3.3.0
- 报错平台 h5, weapp
**补充信息**
无
Contributor guide
Assessment
This issue has not been assessed yet.