We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用 include 方法,在简洁语法下传值就模板错误,原始语法依然正确。
4.10.0
Chrome
简洁语法:http://runjs.cn/code/kuykuqp1 原始语法:http://runjs.cn/code/u1vbl6lx
The text was updated successfully, but these errors were encountered:
简洁语法的 {{ 与 }} 界定符可能会与 JS 的语法冲突,你的例子 {{include 'tmp_detail' {note:value.note}}} 就是这样导致的。
{{
}}
建议使用 set data = {} 解决
set data = {}
Sorry, something went wrong.
我在webpack中使用简洁语法也是不行 {{include './header.art' {title:"title"} }} 既然冲突了那就是传入数据时不能用简洁语法了? 按照作者的推荐简洁语法是这样子 {{incllude file data}} 我怎么试都不行,是不是只能用原生语法了? 自己试了好多写法: {{include './header.art' {title:"title"} }} {{include ./header.art {title:"title"} }} {{include './header.art ' '{title:"title"}' }} {{include ('./header.art ' , {title:"title"} )}}
{{include './header.art' {title:"title"} }}
{{incllude file data}}
{{include ./header.art {title:"title"} }}
{{include './header.art ' '{title:"title"}' }}
{{include ('./header.art ' , {title:"title"} )}}
目前标准语法只有 data 为变量的时候才能保证正常工作。
目前能够想到的是让 art-template 的标准语法支持如下语法:
{{ include('file', {list: []}) }}
{{ include 'file' ({list: []}) }}
7486ba5
No branches or pull requests
1. 错误描述
使用 include 方法,在简洁语法下传值就模板错误,原始语法依然正确。
2. 版本号
4.10.0
3. NodeJS 或浏览器类型与版本
Chrome
4. 可重现的 Demo
简洁语法:http://runjs.cn/code/kuykuqp1
原始语法:http://runjs.cn/code/u1vbl6lx
The text was updated successfully, but these errors were encountered: