Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有一种轻松的方法来改变 Ext JS 工具栏的方向?类似于将tbar更改为bbar(在配置之外)
我正在尝试在 Ext JS 3.4 中执行此操作
我知道我可以覆盖配置并更改工具栏方向。但我想知道是否有人足够聪明,只需几行代码就可以做到。
更改初始配置的方法是在实例化期间传递覆盖配置。例如,如果您定义了一个带有 tbar 的面板:
Ext.define('MyPanel',{ extend:'Ext.panel.Panel', tbar: [{text:'myButton'}] ... });
您可以在实例化它时覆盖它的配置:
Ext.create('MyPanel',{ tbar:undefined, bbar: [{text:'myButton'}] ... });