我有这个jade
文件:
- if (transactions != undefined)
table
th Site Name
th Deadline
th Delete Transaction
each item in transactions
tr
td= item.item_name
td
span(id='countdown'+item.timeout)= item.timeout
td
span(style='cursor: pointer;', onclick='deleteTransaction('+item.uniqueId+')')= "X"
button(id='confirmButton', onclick='confirm();', value="Confirm", name="Confirm")= "Confirm"
我的问题很简单:在渲染所有这些内容时,jade
编译器会在表格顶部呈现按钮,我希望在显示表格后呈现它。我再一次搜索了文档,但我找不到任何有趣的东西。有人能帮助我吗?
由于
答案 0 :(得分:1)
您的缩进使button
位于table
内。它“向右”向左一步,你应该没事:
- if (transactions != undefined)
table
th Site Name
th Deadline
th Delete Transaction
each item in transactions
tr
td= item.item_name
td
span(id='countdown'+item.timeout)= item.timeout
td
span(style='cursor: pointer;', onclick='deleteTransaction('+item.uniqueId+')')= "X"
button(id='confirmButton', onclick='confirm();', value="Confirm", name="Confirm")= "Confirm"