Ext.onReady(function () {
var msgBox = Ext.Msg.show({
title: '提示',
msg: '动态更新的信息文字和进度条',
modal: true,
progress: true,
width: 300,
fn: function () {
Ext.TaskManager.stop(task);
}
});
var count = 0;
var percentage = 0;
var progressText = "";
var task = {
run: function () {
count++;
percentage = count / 10;
progressText = "当前完成进度:" + percentage * 100 + "%";
msgBox.updateProgress(percentage, progressText, "当前时间" + Ext.util.Format.date(new Date(), 'Y-m-d g:i:s A'));
if (count > 10) {
Ext.TaskManager.stop(task);
msgBox.hide();
}
},
interval: 1000
}
Ext.TaskManager.start(task);
});
extjs进度条代码实例
最新推荐文章于 2021-04-30 15:03:51 发布