我想打开两个窗口。这是我尝试使用的代码:
Ext.define('DTApp.view.MyViewport', {
extend: 'Ext.container.Viewport',
requires: [
'DTApp.Class_Util'
],
id: 'MainWindow',
autoScroll: true,
layout: {
type: 'border'
},
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'treepanel',
region: 'west',
split: false,
autoRender: true,
autoShow: true,
cls: 'detail-view + x-panel-header',
width: 170,
autoScroll: true,
resizable: true,
resizeHandles: 'e',
bodyPadding: '0 0 0 0',
animCollapse: true,
collapseFirst: true,
collapsed: false,
collapsible: true,
frameHeader: false,
title: 'Menu',
titleAlign: 'left',
titleCollapse: false,
columnLines: false,
deferRowRender: true,
forceFit: false,
hideHeaders: true,
store: 'MyJsonPTreeStore',
animate: true,
rootVisible: false,
singleExpand: false,
useArrows: true,
viewConfig: {
autoShow: true,
data: {
},
id: 'MainWindow_Left_Tree',
itemId: 'MainWindow_Left_Tree',
autoScroll: false,
resizable: false,
deferInitialRefresh: true,
loadMask: true,
preserveScrollOnRefresh: true,
enableTextSelection: false,
animate: true,
}
},
{
xtype: 'panel',
region: 'center',
id: 'MainWindow_Right_Panel',
itemId: 'MainWindow_Right_Panel',
autoScroll: true,
animCollapse: true,
collapsed: false,
collapsible: false,
header: false,
title: 'My Panel',
listeners: {
render: {
fn: me.onMainWindow_Right_PanelRender,
scope: me
}
}
}
]
});
me.callParent(arguments);
},
onMainWindow_Right_PanelRender: function(component, eOpts) {
}
});
当我尝试打开第二个窗口时,第一个窗口上的树面板被删除,在第二个窗口中,它显示双节点和事件不起作用。