Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

升级antd4 手机出现样式问题 隔一会还崩溃 rc-banner-anim 不显示 #6048

Closed
1 task
zok2 opened this issue Mar 3, 2020 · 19 comments
Closed
1 task

Comments

@zok2
Copy link

zok2 commented Mar 3, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

http://www.kzabc.com

Steps to reproduce

手机访问kzabc.com 或者chrome 访问 控制台切换手机模式, 将会出现样式问题, 以及"rc-banner-anim": "^2.4.2", 轮播图不显示 访问成功后等一会页面会崩溃

What is expected?

解决bug

What is actually happening?

页面 样式混乱, 轮播图不显示 页面会崩溃

Environment Info
antd 4.0.0
React 16.8.6
System centos
Browser chrome 80.0.3987.122(正式版本) (64 位)
@zok2
Copy link
Author

zok2 commented Mar 3, 2020

image
image

@afc163 afc163 transferred this issue from ant-design/ant-design Mar 3, 2020
@chenshuai2144
Copy link
Collaborator

你的网页中有什么逻辑死循环吗?
切换一下屏幕大小整个页面都会卡死,内存很快就消耗完了

@zok2
Copy link
Author

zok2 commented Mar 3, 2020

没有逻辑死循环啊,不切换手机显示的情况下是没有问题的, 切换手机显示, 没一会就挂了 ,并且打包后的没有问题。好奇怪啊

@zok2
Copy link
Author

zok2 commented Mar 3, 2020

image

@zok2
Copy link
Author

zok2 commented Mar 3, 2020

这是老版本 没有升级antd4 时 的样子

@zok2
Copy link
Author

zok2 commented Mar 3, 2020

等待一会 没有出现�崩溃的情况

升级步骤如下:
npx -p @ant-design/codemod-v4 antd4-codemod src

image

之后按照提示修改:
"@ant-design/pro-layout": "^4.8.7",
"@ant-design/pro-table": "^1.0.17",
"@ant-design/compatible": "^0.0.1-rc.1",
"antd": "^3.23.6",

"@ant-design/pro-layout": "^5.0.5",
"@ant-design/pro-table": "^2.1.3",
"@ant-design/compatible": "^1.0.0",
"antd": "^4.0.0",

@zok2
Copy link
Author

zok2 commented Mar 3, 2020

@ 各位大佬给看看

@chenshuai2144
Copy link
Collaborator

我一打开你的网页,几秒钟 内存就耗尽了。

@zok2
Copy link
Author

zok2 commented Mar 3, 2020

嗯 ,刚才吗?
我访问kzabc.com 没有出现内存耗尽的情况, 但是在本地npm run start:no-mock 访问会出现
我又回滚到未升级前,没有内存就耗尽情况
按照上面步骤执行完antd3升级antd4 后就会出现内存耗尽(只有在浏览器切换手机时出现)。
我中午14点的时候把线上kzabc.com 的项目,替换成了未升级前的了,

@zok2
Copy link
Author

zok2 commented Mar 5, 2020

看了我本地崩溃是cpu 满了

@chenshuai2144
Copy link
Collaborator

通过二分法试一试到底是谁干的,不然没发排查问题

@zok2
Copy link
Author

zok2 commented Mar 6, 2020

昨天排查了, 把轮播图和list 分开都没事, 在一起有时候cpu 就满了,list在其他地方我也有使用没有出现问题,但是轮播图只有这个页面有

@zok2
Copy link
Author

zok2 commented Mar 6, 2020

等下我在排查一次

@zok2
Copy link
Author

zok2 commented Mar 6, 2020

@chenshuai2144 找到了缩小到了轮播图这里,rc-banner-anim

@zok2
Copy link
Author

zok2 commented Mar 6, 2020

测试了几次就是这个rc-banner-anim

@zok2
Copy link
Author

zok2 commented Mar 6, 2020

image

@zok2
Copy link
Author

zok2 commented Mar 6, 2020

图片能看到吗

@zok2
Copy link
Author

zok2 commented Mar 6, 2020

image

@chenshuai2144
Copy link
Collaborator

去给 rc-banner-anim 提个 bug 吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants