今天看到别人的一段ExtJS代码,仿照着写了一下,但是没有显示出来,请高人指点一下
分为3个文件,两个js,一个页面文件
bottom.js 页脚文件
Ext.define('App.Panels.BottomPanel',{
extend:'Ext.Panel',
constructor: function (config) {
config = config || {};
var op = {
id: 'bottomPanel',
region: 'south',
title: '',
header: false,
floatable: false,
border: false
};
Ext.apply(config, op);
this.callParent([config]);
},
initComponent: function () {
var me = this;
var toolbar = Ext.create('Ext.panel.Panel', {
border: false,
layout: 'hbox',
width: '100%',
height: 30,
items: [{ xtype: 'tbspacer',
width: 40
}, {
xtype: 'displayfield',
width: 100,
fieldStyle: {
color: '#dcefff'
}
},{
xtype: 'displayfield',
fieldStyle: {
color: '#dcefff'
}
},{ xtype: 'tbspacer',
width: 50
}, { xtype: 'tbfill' }, {
xtype: 'displayfield',
width: 400
}]
});
me.items = [toolbar];
me.callParent();
}
});
Main.js主页面
Ext.define('App.Panels.MainView', {
extend: 'Ext.Panel',
constructor: function (config) {
config = config || {};
var op = {
id: 'mainView',
width: '100%',
height: '100%',
style: {
minHeight: '660px'
},
renderTo: document.body,
layout: 'border',
border: false
};
Ext.apply(config, op);
this.callParent([config]);
},
initComponent: function () {
var me = this;