淘先锋技术网

首页 1 2 3 4 5 6 7

https://v4.bootcss.com/docs/content/tables/
这里面很好用

<table class="table table-hover table-bordered">  #应该是设置表的基本格式
  <thead class="thead-light">     #应该是设置表头的颜色
    <tr>
      <th scope="col">编号</th>
      <th scope="col">类型</th>
      <th scope="col">名称</th>
      <th scope="col">型号</th>
      <th scope="col">单位</th>
      <th scope="col">标准生产/采购周期</th>
      <th scope="col">实际生产/采购周期</th>
    </tr>
  </thead>
  <tbody>
  	{% for cp in chanpins %}
    <tr>
      <td>{{cp.id}}</td>
      <td>{{cp.c_type}}</td>
      <td>{{cp.c_name}}</td>
      <td>{{cp.c_model}}</td>
      <td>{{cp.c_unit}}</td>
      <td>{{cp.c_standard_cycle}}</td>
      <td>{{cp.c_actual_cycle}}</td>
    </tr>
    {% empty %}
    <tr>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
    </tr>
    {% endfor %}
  </tbody>
</table>