【发布时间】:2017-08-17 20:38:31
【问题描述】:
您好,我正在使用带有 Angular4 的引导表库。但是使用 date-formatter 并没有给我带来任何价值。
代码html:
<table id="table" data-show-refresh="true" data-show-toggle="true" data-show-columns="true">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th data-field="userId" data-sortable="true">Usuario</th>
<th data-field="userName" data-sortable="true">Nombre</th>
<th data-field="lastName" data-sortable="true">Apellido</th>
<th data-field="email" data-sortable="true">Correo</th>
<th data-field="mobilePhone">Teléfono</th>
<th data-field="cargo">Cargo</th>
<th data-field="evento" data-formatter="acciones">Eventos</th>
</tr>
</thead>
</table>
代码打字稿:
tableRow(data){
$(function () {
$('#table').bootstrapTable({
data: data,
pagination: true,
pageNumber: 1,
pageSize: 10,
search: true,
minimumCountColumns: 2,
iconsPrefix : 'icon',
icons: {
refresh: 'ion-ios-loop-strong',
toggle: 'ion-ios-list-outline',
columns: 'ion-ios-more'
}
});
});
function acciones(){
return "<a href='/user:id' />Edit</a>";
}
}
【问题讨论】:
标签: javascript angular bootstrap-table