Ext.onReady(function () {
Ext.create('Ext.window.Window',{
autoShow:true,
width:950,
height:550,
layout:'absolute',
items:p2
});
var p2=Ext.create('Ext.panel.Panel',{
title:'test',
width:200,
height:200,
layout:'fit',
html:'inside Panel'
});
});
这样成功了,实现把p2嵌套进入windows中
为什么下面代码失败了呢
Ext.onReady(function () {
Ext.create('Ext.window.Window',{
autoShow:true,
width:950,
height:550,
layout:'absolute',
items:[{
title:'one',
xtype:'panel',
},{
title:'Two',
xtype:'panel',
width:400,
height:350,
items:p2 //这种方式是失败的
}]
});
var p2=Ext.create('Ext.panel.Panel',{
title:'test',
width:200,
height:200,
layout:'fit',
html:'inside Panel'
});
});