2015-05-29 48 views
0

我是新的Sencha,Javascript和HTML。我正在嘗試使用Sencha製作進度條(動畫)。我不太清楚Sencha是如何工作的。我需要一步一步教程如何做到這一點?我想輸出是:Sencha(JS)進度條

  1. 一個無狀態百分比,以及
  2. 一個用百分比)?
+0

請告訴我們一些代碼,你已經嘗試? – gvmani

+0

嗨gvmani,下面是我的編碼:這裏 – PeiChin

+0

@gvmani是我的代碼: – PeiChin

回答

0
下面

是我的編碼:

Ext.onReady(function(){ 
    var pb = Ext.create('Ext.ProgressBar', { 
     margin: 50,ui:'default' 
    }); 
    // Wait for 5 seconds, then update the status el (progress bar will auto-reset) 
    pb.wait({ 
     interval: 500, //bar will move fast! 
     duration: 50000, 
     increment: 15, 
     text: "Hi, I've got a custom UI...", 
     scope: this, 
     fn: function(){ 
     p.updateText('Done!'); 
     } 
    }); 
    var pa = Ext.create("Ext.panel.Panel", { 
     title: "I'm a regular 'default' UI Panel", 
     width: 500, 
     items: pb, // put the progressbar in our panel 
     floating: true, 
     renderTo: Ext.getBody(), 
     closable: true 
    }) 
})