【发布时间】:2012-08-30 17:42:18
【问题描述】:
我在使用自定义布局 ux.center 时遇到问题。我做错了 Ext.Loader 或 Ext.require 吗? Center.js 文件位于 /var/www/application/ux/layout/Center.js 下,该文件 (app.js) 位于 /var/wwww/application/app.js 下
Ext.Loader.setPath('Ext.ux', '/var/www/application/ux');
Ext.require('Ext.ux.layout.Center');
Ext.application({
name: 'AM',
appFolder: 'app',
controllers: ['Users'],
launch: function(){
Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));
Ext.create('Ext.container.Viewport', {
width: 1150,
height: 'auto',
autoScroll: 'true',
layout: 'anchor',
items:[{xtype: 'userpanel'},
{
xtype: 'panel',
width: 1150,
layout:'ux.center',
items:[{
xtype: 'panel',
width: 1150,
widthRatio: .75,
items: [{
xtype: 'userbutton',
action: '',
text: 'Print'
},
{
xtype: 'userbutton',
action: '',
text: 'Download'
},
{
xtype: 'userbutton',
action: 'chart',
text: 'Chart!'
}]
}]}]
});
}});
感谢您提供有关使此布局正常工作的任何提示
【问题讨论】:
-
您能说得更具体些吗? “遇到麻烦”并不能真正告诉我们任何有用的信息。
-
我很确定它没有被正确收录。当我尝试将其用作布局时,该页面根本不会加载。谢谢!
标签: javascript extjs extjs4 javascript-framework