Rails Slim 语法错误

6
我尝试在slim中制作一个简单的表格。
table class="table table-striped"
  thead
    tr
      th username

这段代码执行良好,但是当我尝试添加另一个th或tbody时,就会出现错误“格式不正确的缩进”。例如,此代码对我无效。

table class="table table-striped"
  thead
    tr
      th username
      th provider

或者
table class="table table-striped"
  thead
    tr
      th username
  tbody
    tr
      td test

can anybody help me?


4
顺便说一下,你可以输入 table.table.table-striped 而不是 table class="table table-striped",也就是说,用点分隔符将你的类名链接在一起。这样可以节省时间 :) - jdoe
1个回答

12

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接