0
请帮忙模板。亲子模板(dust.js)
为前我有3个模板:
<!-- comment -->
<div>{message}</div>
<!-- comment list -->
<div class="comment-list">{+content}No comments{/content}</div>
<!-- wrapper -->
<div class="wrapper">{+content/}</div>
显示为:
-wrapper
--comments-list
---comment
我尝试:
{<content}
{#comments}
{>comment/}
{/comments}
{/content}
{<content}
{>comment-list /}
{/content}
{>worklet/}
但这行不通。我做错了什么?
这是简单的方法。 但如果需要使用内容中的内容来创建两个或更多包装器? – user3071368
没有更多关于你想要达到的内容的背景,我不知道如何回答你的问题。 – smfoote
现在我明白{
user3071368