Git Product home page Git Product logo

Comments (9)

vapour avatar vapour commented on August 30, 2024

我也遇到了这个情况,这个可能是你的class中包含name了。
我的错误情况是,当满足下面之一时firefox就会报错:

属性名称中包含"name"
属性值中包含"-"

from juicer.

chenboxiang avatar chenboxiang commented on August 30, 2024

好像确实是如你所说的情况就会报错,不知道具体原因是什么,希望能尽快解决下。

from juicer.

PaulGuo avatar PaulGuo commented on August 30, 2024

二位,你们所说的问题没能复现。

juicer('<a href="#${id}" class="group-name"><span>${name}</span><span class="count">(${memberIds.length})</span></a>')

正常执行没有报错啊。

from juicer.

PaulGuo avatar PaulGuo commented on August 30, 2024

麻烦二位提供下所用的 Juicer 版本和出错的完整代码。 Thx.
在本机 FF14.0.1 + Juicer 0.5.9-stable 中没有遇到编译出错。

from juicer.

chenboxiang avatar chenboxiang commented on August 30, 2024

juicer 版本为0.5.9-stable,firefox版本为14.0.1,代码如下:

var tmpl = ['{@each list as item, name}',
                        '{@if name == "name1" || item == "value2"}',
                            '${item},${name}',
                        '{@/if}',
                    '{@/each}'].join('');
        juicer(tmpl);

from juicer.

chenboxiang avatar chenboxiang commented on August 30, 2024
var tmpl = ['<a href="#${id}" class="group-name">',
                        '<span></span><span class="count">(${memberIds.length})</span>',
                    '</a>'].join('');

        juicer(tmpl);

from juicer.

PaulGuo avatar PaulGuo commented on August 30, 2024

给 Firefox 提了个 Bug 单,等回复。https://bugzilla.mozilla.org/show_bug.cgi?id=785822
如果二位对这个Bug很急可以暂时手动修改源码125行:

}, this)
})

我近两天在下个小版本中把上述改动加进去,这样做的话,所有的helper (内置的函数也不例外)都需要通过juicer.register 进行注册。

from juicer.

chenboxiang avatar chenboxiang commented on August 30, 2024

好的,多谢!

from juicer.

PaulGuo avatar PaulGuo commented on August 30, 2024

Fixed,0.6.0-stable.

多谢反馈,此次改动后所有helper函数(包括内置函数)都需要通过juicer.register()进行注册才能在模板中使用。

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.