Ext JS 4.2.1布局运行失败(Ext JS 4.2.1 Layout run failed)

编程入门 行业动态 更新时间:2024-10-17 19:24:24
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 }] });

更多推荐

本文发布于:2023-07-07 21:33:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1068477.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:布局   JS   Ext   run   Layout

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!