Git Product home page Git Product logo

Comments (4)

PaulGuo avatar PaulGuo commented on July 26, 2024

这个并非 Bug,循环结束后,数据源的item值仍旧是2,所以不是变量污染。只是模板书写中循环内部变量名字冲突而已。each array as item 循环体的内部 ${item} 指向的就是数组的成员。试想,如果内部的${item} 依旧是指向数据源,那么循环体内如何输出数组成员的值?

thx. :)

from juicer.

wuguixiong avatar wuguixiong commented on July 26, 2024

个人认为循环体内部变量别名不应该在循环外部生效,这样很容易造成一些困惑

from juicer.

PaulGuo avatar PaulGuo commented on July 26, 2024

@wuguixiong 抱歉,起初没看到你给出的例子循环外有${item},这个是 Juicer 的问题,我会尽快修复的。

thx! :)

from juicer.

PaulGuo avatar PaulGuo commented on July 26, 2024

@wuguixiong Fixed at 0.5.8-stable.

from juicer.

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.