Extjs &引用;renderTo“;打破死刑
我想在应用程序启动时在页面顶部呈现一个工具栏。 当页面中包含Extjs &引用;renderTo“;打破死刑,extjs,extjs4,Extjs,Extjs4,我想在应用程序启动时在页面顶部呈现一个工具栏。 当页面中包含ext-all-dev.js时,在viewport.js中运行以下命令会起作用。但是当我使用ext-dev.js时,它会抛出异常。uncaughttypeerror:undefined不是一个函数 Ext.create("Ext.toolbar.Toolbar", { renderTo: document.body, defaultType: 'button', items: [{text: 'foo'}]
ext-all-dev.js
时,在viewport.js
中运行以下命令会起作用。但是当我使用ext-dev.js
时,它会抛出异常。uncaughttypeerror:undefined不是一个函数
Ext.create("Ext.toolbar.Toolbar", {
renderTo: document.body,
defaultType: 'button',
items: [{text: 'foo'}]
});
怎么了?在控制台中运行上述代码也可以同时使用ext-dev.js
和ext-all-dev.js
文件。异常堆栈是:
Uncaught TypeError: undefined is not a function AbstractComponent.js?_dc=1398852700374:170
Ext.define.statics.updateLayout AbstractComponent.js?_dc=1398852700374:170
Ext.define.updateLayout AbstractComponent.js?_dc=1398852700374:3319
Ext.define.afterRender Renderable.js?_dc=1398852701043:195
Base.implement.callParent ext-debug.js:4266
Ext.define.afterRender Component.js?_dc=1398852699982:435
Ext.define.finishRender Renderable.js?_dc=1398852701043:458
Ext.define.render Renderable.js?_dc=1398852701043:784
Ext.define.constructor AbstractComponent.js?_dc=1398852700374:1231
Base.implement.callParent ext-debug.js:4266
Ext.define.constructor Component.js?_dc=1398852699982:377
constructor ext-debug.js:4897
(anonymous function) VM11066:3
Ext.ClassManager.instantiate ext-debug.js:5485
(anonymous function) ext-debug.js:2112
(anonymous function) Viewport.js?_dc=1398852703350:51
您发布的代码无效。这段代码不正确:
items:[text:'foo']
我无法想象有效的javascript。第51行的Viewport.js中有什么内容?Ext.create()函数?@A1rPunrenderTo:document.body,