我如何使用过滤器控件在 bootstrap table 上添加一些 HTML 代码
How i can add some HTML code on bootstrap table with filter control
我有这个bootstraptable
https://codepen.io/AurelieT/pen/JGxMgo
但是当我尝试在 td 上添加一个按钮时,过滤器模式会更改 html 代码并转换为文本
i post 这是我得到的结果
https://i.imgur.com/39Bvnun.png
<table id="table"
data-toggle="table"
data-search="false"
data-filter-control="true"
data-show-export="true"
data-click-to-select="false"
data-toolbar="#toolbar">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th data-field="Empleado" data-filter-control="input" data-sortable="true">Empleado</th>
<th data-field="Datos" data-filter-control="false" data-sortable="false">Ver Datos</th>
<th data-field="Estado" data-filter-control="select" data-sortable="true">Estado Datos</th>
<th data-field="Revisados" data-filter-control="select" data-sortable="true">Revisado</th>
</tr>
</thead>
<tbody>
<tr>
<td class="bs-checkbox "><input data-index="0" name="btSelectItem" type="checkbox"></td>
<td>Valérie</td>
<td>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter">
Ver Datos
</button>
</td>
<td>Rojo</td>
<td>Si</td>
</tr>
</tbody></table>
我尝试更改过滤器,但没有用
我只需要正确显示按钮,
只需将 data-escape="false"
添加到您的 table 设置即可。
我有这个bootstraptable https://codepen.io/AurelieT/pen/JGxMgo
但是当我尝试在 td 上添加一个按钮时,过滤器模式会更改 html 代码并转换为文本
i post 这是我得到的结果 https://i.imgur.com/39Bvnun.png
<table id="table"
data-toggle="table"
data-search="false"
data-filter-control="true"
data-show-export="true"
data-click-to-select="false"
data-toolbar="#toolbar">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th data-field="Empleado" data-filter-control="input" data-sortable="true">Empleado</th>
<th data-field="Datos" data-filter-control="false" data-sortable="false">Ver Datos</th>
<th data-field="Estado" data-filter-control="select" data-sortable="true">Estado Datos</th>
<th data-field="Revisados" data-filter-control="select" data-sortable="true">Revisado</th>
</tr>
</thead>
<tbody>
<tr>
<td class="bs-checkbox "><input data-index="0" name="btSelectItem" type="checkbox"></td>
<td>Valérie</td>
<td>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter">
Ver Datos
</button>
</td>
<td>Rojo</td>
<td>Si</td>
</tr>
</tbody></table>
我尝试更改过滤器,但没有用
我只需要正确显示按钮,
只需将 data-escape="false"
添加到您的 table 设置即可。