表格数据加载:
$("#table-list-webhoo").bootstrapTable('load', [{
xh:function (value, row, index) {
return index+1;
},
goods_name:dataGoods.goodsName,
code:dataGoods.goodsCode,
goods_spec:dataGoods.goodsSpec,
unit:"件",
sale_price:dataGoods.salePrice,
sale_money:dataGoods.salePrice,
goods_count:1,
goods_money:dataGoods.salePrice,
opt:function () {
return '\
<div class="btn-group btn-group-sm">\
<button type="button" class="btn btn-danger">删除</button>\
</div>';
}
}]);
表格数据追加:
$("#table-list-webhoo").bootstrapTable('append', [{
xh:function (value, row, index) {
return index+1;
},
goods_name:dataGoods.goodsName,
code:dataGoods.goodsCode,
goods_spec:dataGoods.goodsSpec,
unit:"件",
sale_price:dataGoods.salePrice,
sale_money:dataGoods.salePrice,
goods_count:1,
goods_money:dataGoods.salePrice,
opt:function () {
return '\
<div class="btn-group btn-group-sm">\
<button type="button" class="btn btn-danger">删除</button>\
</div>';
}
}]);