Comments (7)
代码贴下?
from scroll-anim.
我的情况是Link
,Element
写在一个Component
内可以使用,但是我是分开在两个子Component
内的,这样导致报了个错,location" is null
from scroll-anim.
看了下实现,了解为啥了...对应location注册的先后顺序问题,源码里那个setTimeout
...
不知道能否增加类似Container
的概念,Element
们可以在Container
里来监听事件,发现有link这个元素,就触发事件,发现没有就不做什么类似的~
from scroll-anim.
我这没问题啊。我一直都这么用的啊,,都是分开的啊。。。看 antd 的 home
from scroll-anim.
如果报location is null, 是没注册啊, 上面还有报错吗, 在你用 Element 时有没有 import 进来
from scroll-anim.
https://github.com/ant-design/ant-design/tree/develop-1.0.0/site/component/Home
from scroll-anim.
确实还有,估计是我这边异步请求数据,然后分子组件分的太多,等等导致的....后来自己简单搞了个,功能没这个强大,先凑合用了,不过假如在调用时,没注册上是不是事件不触发就好,后面注册上了再触发,我那个是按照这个思路搞得,不过还是挺喜欢这个的,由于我用ts,用的时候还先写了个.d.ts文件,不知道对你们有没有用...scroll.anim.d.ts
from scroll-anim.
Related Issues (20)
- 开发环境和生产环境行为 export 导出内容不一致。 HOT 1
- 页面已经有Link, 再打开有Link的Modal, modal里的Link标签就失效 HOT 13
- where is addScrollEvent? IE10 console error 对象不支持"addScrollEvent"属性或方法 HOT 4
- 引入OverPack和QueueAnim配合antd的dropdown组件在划出下拉菜单时也有动画,如何取消 HOT 4
- Link and OverPack同时使用会有scrollTo定位不一致情况 HOT 3
- OverPack animation doesn't render if the object is at the bottom of the page HOT 4
- Temporarily disable scroll animations? HOT 1
- OverPack中向上滑到顶部后再下滑会无法再次显示 HOT 8
- ScrollOverPack可不可以手动设置一下触发的距离
- Dynamic playScale in timeline not working HOT 1
- Parallax: playScale lookup on scroll
- Parrallax behavior differ from child to child
- ios上滑动页面,速度过快滑动到底部,带有动画效果时,底部会强制往下回弹下?
- ScrollAnim.scrollScreen中的 location 参数已经被移除了吗? HOT 4
- Fire animation hiding on React Router change
- Reverse animation not working
- Doesnt support React-hooks
- 滚动不到指定位置 HOT 3
- 切换路由动画没显示
- OverPack 使用 always 类型提示报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scroll-anim.