我在 extjs4 中工作,我将在屏幕上打印一个消息框,但它显示一个空白消息窗口。其中没有显示。
这是我的代码:-
Ext.application({
name: 'App',
appFolder: 'app',
//controllers: ['Books'],
requires:[
'Ext.window.MessageBox',
// 'Ext.tip.*'
],
launch: function() {
Ext.create('Ext.tab.Panel', {
renderTo: Ext.getBody(),
height: 100,
width: 200,
items: [
{
// Explicitly define the xtype of this Component configuration.
// This tells the Container (the tab panel in this case)
// to instantiate a Ext.panel.Panel when it deems necessary
xtype: 'panel',
title: 'Tab One',
html: 'The first tab',
listeners: {
render: function() {
//Ext.MessageBox.alert('Rendered One', 'Tab One was rendered.');
Ext.Msg.alert('hi', 'Please enter your name:');
//Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?');
//alert("hi");
}
}
},
{
// this component configuration does not have an xtype since 'panel' is the default
// xtype for all Component configurations in a Container
title: 'Tab Two',
html: 'The second tab',
listeners: {
render: function() {
//Ext.MessageBox.alert('Rendered One', 'Tab Two was rendered.');
}
}
}
]
});
}
});
这是消息屏幕窗口
没有任何 messageBox 方法在此代码中工作有什么问题?请给我一些建议...