Giter Site home page Giter Site logo

通过seajs加载会报错 about lazyload HOT 5 CLOSED

jieyou avatar jieyou commented on July 17, 2024
通过seajs加载会报错

from lazyload.

Comments (5)

jieyou avatar jieyou commented on July 17, 2024

谢谢报告问题
能否给一个能复现的、外网能访问的网址呢?

from lazyload.

heby avatar heby commented on July 17, 2024

不好意思,没有,你本地写个demo很快的,直接require进来,然后执行lazyload就会出现这个错误,不管是同步还是异步载入都会出现这个bug,是不是还没支持模块化?
image

from lazyload.

jieyou avatar jieyou commented on July 17, 2024

目前没有支持模块化,这个支持起来很容易,我将在今天稍后搞定:)

from lazyload.

heby avatar heby commented on July 17, 2024

好的,辛苦了,小弟JS水平太菜,所以...呵呵

from lazyload.

jieyou avatar jieyou commented on July 17, 2024

目前已加入AMD支持,CMD短期内不准备支持了。
主要是因为jQuery不支持CMD,而这个组件又依赖于jQuery
如果你要使用CMD或seajs,一个简单的方法是将我的源代码lazyload.js粘贴到jquery代码的底下即可,它只有2k(压缩和gzip),不会将jquery本身变大多少。
(当然你需要先自行 修改jQuery让它能兼容CMD

from lazyload.

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.