2013-12-10 14 views

回答

0

添加JavaScript中的類顯示是不夠的,你還必須添加CSS規則。你或多或少預計使用SASS與煎茶Cmd的,但你可以使用原始CSS去得到的概念一握...

Example fiddle

的Javascript:

Ext.application({ 
    name: 'Fiddle', 

    launch: function() { 
     Ext.Viewport.add({ 
      xtype: 'container', 
      padding: 10, 
      defaultType: 'button', 
      items: [{ 
       text: "Button", 
       badgeText: "Foo", 
       badgeCls: 'x-badge big-text' 
      },{ 
       text: "Button", 
       badgeText: "Foo", 
       badgeCls: 'x-badge big-badge' 
      }] 
     }); 
    } 
}); 

CSS :

.x-badge.big-text { 
    font-size: 20px; 
} 

.x-badge.big-badge { 
    width: 60px; 
    height: 30px; 
}