避免呈现"表格中没有可用数据"在数据表中 [英] Avoid Rendering "No Data Available in the table" in Datatables
本文介绍了避免呈现"表格中没有可用数据"在数据表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用JQuery数据表.当表呈现时,它将显示为表中没有可用数据",并且一段时间后表开始显示数据,并且该无可用数据"消失了.
I am using JQuery Datatables. When the table renders , it shows as "No Data Available in the table", and after sometime the table starts appearing with data and this "No data Available" goes.
我不希望出现没有可用数据",而是出现正在加载"或请稍候"之类的东西,那会很好,或者什么都不会解决我的问题.
I dont want this "No data available to come", instead if Something like "Loading " or "Please wait" appears that will be great or nothing comes that will solve my problem.
推荐答案
Look here for complete reference -> https://datatables.net/reference/option/language the attributes you are looking for is loadingRecords
, emptyTable
and zeroRecords
.
$("#example").DataTable({
language: {
emptyTable: "No data available in table", //
loadingRecords: "Please wait .. ", // default Loading...
zeroRecords: "No matching records found"
}
})
角度数据表:
$scope.dtOptions = DTOptionsBuilder.newOptions()
.withLanguage({
emptyTable: "No data available in table",
loadingRecords: "Loading...",
zeroRecords: "A different no matching records message"
})
这篇关于避免呈现"表格中没有可用数据"在数据表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文