用于添加按钮的bootstrap

问题描述 投票:0回答:1
<th><button type="button" id="selectAll" >Select All</button></th>

我必须将上面的代码转换为bootstrap类型的语句,它将放在haml文件中。有人可以帮助我这样做,因为我是新手的bootstrap和haml。谢谢

ruby-on-rails button bootstrap-4 haml
1个回答
1
投票
%th
  %button.btn.btn-primary#selectAll{type: "button"}
    Select All

这将产生:

<th>
  <button class="btn btn-primary" id="selectAll" type="button">
    Select All
  </button>
</th>
© www.soinside.com 2019 - 2024. All rights reserved.