Giter Club home page Giter Club logo

Comments (3)

HeftyKoo avatar HeftyKoo commented on September 16, 2024

我试着调了一下,没有发现这个问题哦,可以给个在线demo吗?

from reading-zepto.

HeftyKoo avatar HeftyKoo commented on September 16, 2024

看了一下 v1.0 的源码,V1.0$ 函数返回的确实是数组。你应该用的是 v1.0

其差别应该在 Z 函数的实现上。
v1.0 中是这样的 https://github.com/madrobby/zepto/blob/v1.0/src/zepto.js#L134
我看的 1.2.0 的源码中是这样的 https://github.com/madrobby/zepto/blob/v1.2.0/src/zepto.js#L129

v1.0 中直接调用函数,返回的 dom 是数组(注意qsa 中已经用 slice 将取得的节点转换成数组)。
1.2.0 中以构造函数方式调用,返回的类数组的 constructor 是zepto.Z。

from reading-zepto.

boylufeng20141007 avatar boylufeng20141007 commented on September 16, 2024

看了哈,是的。多谢。

from reading-zepto.

Related Issues (7)

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.