jd-opensource / jd-opensource/taro-ui
AtTabs和Swiper在同一个页面出现会出现'offsetTop' of undefined
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
**问题描述**
AtTabs和Swiper在同一个页面使用是会出现'offsetTop' of undefined
index.esm.js?eb04:2469 TypeError: Cannot read property 'offsetTop' of undefined
at AtTabs._this.updateState (index.js?ff21:47)
at AtTabs.componentDidMount (index.js?ff21:128)
at eval (index.js?1e21:1583)
at errorCatcher (index.js?1e21:1481)
at eval (index.js?1e21:1582)
at Array.forEach ()
at flushMount (index.js?1e21:1578)
at updateComponent (index.js?1e21:1664)
at Route.forceUpdate (index.js?1e21:1760)
at eval (index.esm.js?eb04:2467)

然后其他页面都不能跳转,
在小程序没有类似问题
**复现步骤**
[复现问题的步骤]
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
[或者可以直接贴源代码,能贴文字就不要截图]
```js
// 这里可以贴代码
```
**期望行为**
可以同时使用在一个页面
**报错信息**
保存文件
webpack:///node_modules/taro-ui/dist/h5/components/tabs/index.js

**系统信息**
Taro CLI 1.2.26 environment info:
System:
OS: macOS 10.14.4
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.11.0 - ~/.nvm/versions/node/v10.11.0/bin/node
Yarn: 1.12.3 - ~/.nvm/versions/node/v10.11.0/bin/yarn
npm: 6.8.0 - ~/.nvm/versions/node/v10.11.0/bin/npm
npmPackages:
@tarojs/async-await: 1.2.26 => 1.2.26
@tarojs/components: 1.2.26 => 1.2.26
@tarojs/plugin-babel: 1.2.26 => 1.2.26
@tarojs/plugin-csso: 1.2.26 => 1.2.26
@tarojs/plugin-less: 1.2.26 => 1.2.26
@tarojs/plugin-sass: 1.2.26 => 1.2.26
@tarojs/plugin-uglifyjs: 1.2.26 => 1.2.26
@tarojs/redux: 1.2.26 => 1.2.26
@tarojs/redux-h5: 1.2.26 => 1.2.26
@tarojs/rn-runner: 1.2.26 => 1.2.26
@tarojs/router: 1.2.26 => 1.2.26
@tarojs/taro: 1.2.26 => 1.2.26
@tarojs/taro-alipay: 1.2.26 => 1.2.26
@tarojs/taro-h5: 1.2.26 => 1.2.26
@tarojs/taro-swan: 1.2.26 => 1.2.26
@tarojs/taro-tt: 1.2.26 => 1.2.26
@tarojs/taro-weapp: 1.2.26 => 1.2.26
@tarojs/webpack-runner: 1.2.26 => 1.2.26
eslint-config-taro: 1.2.26 => 1.2.26
eslint-plugin-taro: 1.2.26 => 1.2.26
nervjs: ^1.3.0 => 1.3.13
**补充信息**
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]
Contributor guide
Assessment
This issue has not been assessed yet.