Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当双括号里出现类似name、 onclick、onchange、onmouseup等会报错 #408

Closed
dntzhang opened this issue Jun 2, 2017 · 2 comments
Labels

Comments

@dntzhang
Copy link

dntzhang commented Jun 2, 2017

1. 错误描述

当双括号里出现类似name、 onclick、onchange、onmouseup等会报错。特别是常用的name~~
示例代码:

     var html = template.compile(`
        <h1>{{title}}</h1><div>{{onclick}}</div>
                    <ul>
                        {{each list as value i}}
                        <li onclick="showMe('{{value}}')">索引 {{i + 1}} :{{value}}</li>
                        {{/each}}
                    </ul>
        `)({
         title: '标签',
         list: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他'],
         onclick: 'abc'
     });

2. 版本号

[email protected]

3. NodeJS 或浏览器类型与版本

所有浏览器

4. 可重现的 Demo

见1里的代码 。

@dntzhang dntzhang changed the title 当双括号里出现类似 onclick、onchange、onmouseup等会报错 当双括号里出现类似name、 onclick、onchange、onmouseup等会报错 Jun 2, 2017
@laserw9
Copy link

laserw9 commented Jun 2, 2017

这是我提的问题,为此特意注册了账号来瞧瞧

@aui aui added the bug label Jun 3, 2017
@aui aui closed this as completed in e505498 Jun 3, 2017
@aui
Copy link
Collaborator

aui commented Jun 3, 2017

这个 BUG 是因为兼容 v3 导致的,例如{{helperName args}}。已经删除了这个有问题的兼容语法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants