如下进度条不显示。
期望是在导出数据时,在layer.msg中显示导出数据的百分比进度条。
```html
layer.confirm('查询周期超过3天,系统将自动为您导出所需数据!', {icon: 7, title: '警告'}, function (index) {
layer.msg('正在下载数据,请稍候...<br><div class="progress-container"><div id="progress" class="progress"></div></div>',{ icon: 16, shade: 0.1});
var progressBar = document.getElementById("progress");
var width = 0;
var timer = setInterval(function() {
width += 10;
progressBar.style.width = width + '%';
if (width >= 100) {
clearInterval(timer);
}
}, 500);
$.ajax({
type: 'GET',
data: {"status":status,"start":start,"end":end},
url: './data.json',
contentType: "application/json",
success: function (res) {
console.log(res.data)
table.exportFile(myTable.config.id, res.data, 'csv',"明细");
}
});
// 关闭弹窗
layer.close(index);
});
```