【问题标题】:Multiple Ractive components多个 Ractive 组件
【发布时间】:2014-10-15 16:14:59
【问题描述】:

目前无法在模板中使用多个组件。例如:

<div class='wrapper'>
  <LeftColumn>
  <RightColumn>
  <p>text here</p>
</div>

Ractive 只显示第一个。如果我想两次使用相同的组件标签,情况是一样的。当我只有一个组件但在标签之后放置一些东西时(上面的&lt;p&gt;text here&lt;/p&gt;),这就更奇怪了。它也没有显示。 这是一个显示问题的 JSBin http://jsbin.com/maxen/3/edit?html,js,output

【问题讨论】:

    标签: javascript ractivejs


    【解决方案1】:

    您需要添加关闭 &lt;/widget&gt; 标记或使用自关闭语法 - &lt;widget /&gt;Demo here.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多