2013-05-13 27 views
4

看來ExtJS 4.2不包含有作用域的CSS。所以,當我應用ExtJS渲染一個網格時,我的頁面看起來就毀了。 我檢查了這個鏈接:How to scope the reset CSS so that is applied to Ext components using scopeResetCSS property?在範圍CSS模式下設置ExtJS 4.2的正確方法是什麼?

我想知道是否有一種方法來重置CSS或任何方法來做我想要的ExtJS 4.2。

+0

您是否找到解決您的問題的方法? – SRKX 2013-06-25 14:06:00

回答

2

@Sencha解釋了修復this鏈接。

ExtJs v4.1.1 or v4.2.1 
    Ext = { 
      buildSettings:{ 
      baseCSSPrefix: 'x-', 
      scopeResetCSS: true     
     } 
    }; 

ExtJs v4.2.0 
    Ext.define('Ext.BorderBoxFix', { 
     override: 'Ext.AbstractComponent', 


     initStyles: function(targetEl) { 
      this.callParent(arguments); 


      if (Ext.isBorderBox && (!me.ownerCt || me.floating)) { 
       targetEl.addCls(Ext.baseCSSPrefix + 'border-box'); 
      } 
     } 
    }); 


    Ext.onReady(function() { 
     Ext.fly(document.documentElement).removeCls(Ext.baseCSSPrefix + 'border-box'); 
    }); 
相關問題