目前,无法在模板中使用多个组件。例如:
<div class='wrapper'>
<LeftColumn>
<RightColumn>
<p>text here</p>
</div>
Ractive 仅显示第一个。如果我想两次使用相同的组件标签,情况也是一样的。当我只有一个组件但在标签后面放置一些东西(上面的<p>text here</p>
)时,这就更奇怪了。它也不显示。
这是显示问题的 JSBin http://jsbin.com/maxen/3/edit?html,js,output
最佳答案
您需要添加结束语 </widget>
标记或使用自关闭语法 - <widget />
。 Demo here .
关于javascript - 多个 Ractive 组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26387267/