ant-design / ant-motion

:bicyclist: Animate specification and components of Ant Design
http://motion.ant.design
MIT License
4.59k stars 358 forks source link

TweenOne 不兼容 antd 4 xx #303

Closed Jiyr0119 closed 4 years ago

Jiyr0119 commented 4 years ago

版本:{ "antd": "^4.1.5", "enquire-js": "^0.2.1", "rc-banner-anim": "^2.2.2", "rc-queue-anim": "^1.8.4", "rc-scroll-anim": "^2.7.4", "rc-tween-one": "^2.6.8", "react": "^16.8.3", "react-dom": "^16.8.3", "react-router-dom": "^5.1.2", "react-scripts": "2.1.5" }

报错:{ Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Check the render method of TweenOne. in Button (created by TweenOne) in TweenOne (created by QueueAnim) in div (created by QueueAnim) in QueueAnim (at Banner1.jsx:25) in div (created by TweenOne) in TweenOne (created by Element) in Element (at Banner1.jsx:23) in div (created by BannerAnim) in BannerAnim (at Banner1.jsx:58) in div (at Banner1.jsx:57) in TweenOne (created by TweenOneGroup) in TweenOneGroup (at Banner1.jsx:51) in div (at Banner1.jsx:50) in Banner (at Home/index.jsx:53) in div (at Home/index.jsx:91) in Home (created by Context.Consumer) in Route (at App.js:34) in div (at App.js:32) in Router (created by BrowserRouter) in BrowserRouter (at App.js:31) in App (at src/index.js:7) }

在pc端没问题,切换到移动端的时候,tabbar并没有渲染,然后这个错

jljsj33 commented 4 years ago

这不是报错。。这是警告,,不用在意就行了,,#300

hahaliangchen commented 3 years ago

这不是报错。。这是警告,,不用在意就行了,,#300

兄弟你太热心了,貌似好几个关于ant-motion都能看到你

jljsj33 commented 3 years ago

这不是报错。。这是警告,,不用在意就行了,,#300

兄弟你太热心了,貌似好几个关于ant-motion都能看到你

老铁,,,ant-motion 是我整的,,我不回复,,难道你来???

hahaliangchen commented 3 years ago

这不是报错。。这是警告,,不用在意就行了,,#300

兄弟你太热心了,貌似好几个关于ant-motion都能看到你

老铁,,,ant-motion 是我整的,,我不回复,,难道你来???

我之前每意识到是你写的是看到有些问题你回答来对我有些帮助,所以评论那句话,评完我才看到你是作者,还有说话别那么冲好么?

jljsj33 commented 3 years ago

这不是报错。。这是警告,,不用在意就行了,,#300

兄弟你太热心了,貌似好几个关于ant-motion都能看到你

老铁,,,ant-motion 是我整的,,我不回复,,难道你来???

我之前每意识到是你写的是看到有些问题你回答来对我有些帮助,所以评论那句话,评完我才看到你是作者,还有说话别那么冲好么?

你有意向来回复不??哈哈,,招维护者。。。

hahaliangchen commented 3 years ago

现在存在一个问题,就是在flex布局中的QueueAnim,因为动画存在一个flex内部各项居中的div中,所以当加载动画列表时从上至下,就会出现卡顿,不流畅,目前解决的办法是提前知道这个div所包裹的动画列表在完全加载后的高会是多少,提前设置确定好这个div的高度,但这个方法有些不好,请问有什么更好的办法么?

hahaliangchen commented 3 years ago

它卡顿的表现是滚动条一顿一顿的改变滚动位置

jljsj33 commented 3 years ago

queue 加 scroll 组件目前对 flex 不支持,,原因是 queue 会清掉子级,,所以会对布局产生抖动,,但你可以试试用 tween-one。。

jljsj33 commented 3 years ago

有问题,请单独开 issues,不要在别人的 issues 里提问,,谢谢。。

hahaliangchen commented 3 years ago

有问题,请单独开 issues,不要在别人的 issues 里提问,,谢谢。。

好谢谢,哈哈