我有一个电子表格导入程序,并希望在加载数据时显示某种图标。提交按钮原样是:
<%= f.submit "Import", :class => 'btn btn-primary'%>
我尝试使用bootstrap,但它似乎不起作用,代码看起来像:
<button type="button"
class="btn btn-primary start"
id="btnStartUploads"
data-loading-text="<i class='icon-spinner icon-spin icon-large'></i> ">
<i class="icon-upload icon-large"></i>
<span><%= f.submit "Import"%>Import</span>
</button>
答案 0 :(得分:0)
你能试试吗?我想这应该有用。
<%= f.submit "<i class="icon-upload icon-large"></i><span>Import</span>".html_safe, class: 'btn btn-primary start', id: id="btnStartUploads", "data-loading-text" => 'icon-spinner icon-spin icon-large' %>