Ext JS 4.2.1布局运行失败(Ext JS 4.2.1 Layout run failed)
我只是想创建一个布局,我已经定义了我的自定义应用程序标题..以及它们下面的一些内容......例如边框布局......
Ext.define('app.view.Main', { extend: 'Ext.container.Container', requires:[ 'Ext.tab.Panel', 'Ext.layout.container.Border', 'Ext.layout.container.Anchor', 'Ext.form.field.Text' ], xtype: 'app-main', layout: { type: 'anchor' }, items: [ { xtype: 'app-header' }, { //xtype: 'container', layout: 'border', items: [{ region: 'west', xtype: 'panel', title: 'west', width: 150 }, { region: 'center', xtype: 'tabpanel', items: [{ ...这段代码总是返回错误布局运行失败...当我改变我的第二个项目的布局,它应该是一个边框,它的工作..不知何故,它不与边框布局相处...
有人可以告诉我为什么吗? 一个解决方案的提示也很好:)我是一个ext js布局newb :(
I just want to create a layout where i've defined my custom application header.. and them some content beneath.. e.g. a border layout...
Ext.define('app.view.Main', { extend: 'Ext.container.Container', requires:[ 'Ext.tab.Panel', 'Ext.layout.container.Border', 'Ext.layout.container.Anchor', 'Ext.form.field.Text' ], xtype: 'app-main', layout: { type: 'anchor' }, items: [ { xtype: 'app-header' }, { //xtype: 'container', layout: 'border', items: [{ region: 'west', xtype: 'panel', title: 'west', width: 150 }, { region: 'center', xtype: 'tabpanel', items: [{ ...this code is always returning the error Layout run failed... When i change the layout of my second item which should be a border it works.. Somehow it doesnt get along with the border layout...
Can someone tell me why? A hint for a solution would be nice too :) I am an ext js layout newb :(
最满意答案
要创建带有顶部标题的标题:
new Ext.container.Viewport({ layout: { type: 'vbox', align: 'stretch' }, items: [{ xtype: 'app-header' }, { flex: 1, layout: 'border', xtype: 'container', items: [] // border stuff }] });To create a header with a top header:
new Ext.container.Viewport({ layout: { type: 'vbox', align: 'stretch' }, items: [{ xtype: 'app-header' }, { flex: 1, layout: 'border', xtype: 'container', items: [] // border stuff }] });更多推荐
发布评论