【问题标题】:How do I add a head/title to each row in a table using jade?如何使用玉为表格中的每一行添加标题/标题?
【发布时间】:2014-05-07 03:16:53
【问题描述】:

我希望每一行在我的表中都有一个单独的标题/标题,没有主标题,我正在使用 java/jade/bootstrap。 这是我当前的代码:

body
table.table.table-hover.table.table-bordered
  each network, i in adlist
    tr
      td #{network.service}
      td
        a(href='/manage/network/edit/#{network.id}') #{network.name}
      td #{network.format}
      td #{network.countries}
      td #{network.weight}

我想要列顶部的标题,不要在每一行重复。

【问题讨论】:

    标签: twitter-bootstrap html-table pug


    【解决方案1】:

    为了完整起见,我在这里复制解决方案。

    Op 通过这样做解决了这个问题

    body
        table.table.table-hover.table-bordered
          thead
            tr
              th Service
              th Name
              th Format
              th Countries
              th Weight
          each network, i in adlist
            tr
              td #{network.service}
              td
                a(href='/manage/network/edit/#{network.id}') #{network.name}
              td #{network.format}
              td #{network.countries}
              td #{network.weight}
    

    【讨论】:

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