有人可以帮助我在Ext.window的进度条下方插入吗?或在Ext.window中添加进度条的任何其他建议?
var p = Ext.create('Ext.ProgressBar', {
renderTo: Ext.body(),
width: 300
});
p.wait({
interval: 500, //bar will move fast!
duration: 50000,
increment: 100,
text: 'Updating',
scope: this,
fn: function () {
p.updateText('Done!');
}
});
我想在下面的窗口中插入进度条
var window = new Ext.Window({
title: "export",
height: 100,
layout: 'fit',
buttons: [
{
text: 'Cancel',
listeners: {
click: function () {
window.close();
}
}
}
],
items: [{
xtype: 'download',
autoEl: {
tag: 'iframe',
src: 'www.google.com'
}
}]
}).show();
您有多种方法可以做到这一点。您可以将现有进度条添加到现有窗口:
window.add(p);
或在创建窗口时添加现有的进度条:
new Ext.Window({
items: [p]
);
或在创建窗口时创建新的进度条:
new Ext.Window({
items: [{
xtype: 'progressbar'
}]
);