Code Monkey home page Code Monkey logo

Comments (7)

jljsj33 avatar jljsj33 commented on September 22, 2024

代码贴下?

from scroll-anim.

Naixor avatar Naixor commented on September 22, 2024

我的情况是Link,Element写在一个Component内可以使用,但是我是分开在两个子Component内的,这样导致报了个错,location" is null

from scroll-anim.

Naixor avatar Naixor commented on September 22, 2024

看了下实现,了解为啥了...对应location注册的先后顺序问题,源码里那个setTimeout...
不知道能否增加类似Container的概念,Element们可以在Container里来监听事件,发现有link这个元素,就触发事件,发现没有就不做什么类似的~

from scroll-anim.

jljsj33 avatar jljsj33 commented on September 22, 2024

我这没问题啊。我一直都这么用的啊,,都是分开的啊。。。看 antd 的 home

from scroll-anim.

jljsj33 avatar jljsj33 commented on September 22, 2024

如果报location is null, 是没注册啊, 上面还有报错吗, 在你用 Element 时有没有 import 进来

from scroll-anim.

jljsj33 avatar jljsj33 commented on September 22, 2024

https://github.com/ant-design/ant-design/tree/develop-1.0.0/site/component/Home

from scroll-anim.

Naixor avatar Naixor commented on September 22, 2024

确实还有,估计是我这边异步请求数据,然后分子组件分的太多,等等导致的....后来自己简单搞了个,功能没这个强大,先凑合用了,不过假如在调用时,没注册上是不是事件不触发就好,后面注册上了再触发,我那个是按照这个思路搞得,不过还是挺喜欢这个的,由于我用ts,用的时候还先写了个.d.ts文件,不知道对你们有没有用...scroll.anim.d.ts

from scroll-anim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.