小编use*_*062的帖子

Extjs 4.1:如此奇怪的错误:未捕获TypeError:无法读取未定义的属性'items'

你可以改变样本:app/simple/app/Viewport.js对此:

您将在Chrome控制台中收到此错误消息:

未捕获的TypeError:无法读取未定义的ext-all.js的属性'items':18 Ext.cmd.derive.getDockedItems

但如果你评论这个:

initComponent : function() {
                            this.callParent();
                        },
Run Code Online (Sandbox Code Playgroud)

一切都好.

Ext.define('AM.view.Viewport', {
        extend : 'Ext.container.Viewport',

        layout: 'border',
        items : [{
                    border : false,
                    region : 'north',
                    xtype : 'progressbar',
                    text : 'Ready',
                    height : 20
                }, {
                    region : 'west',
                    xtype : 'userlist',
                    width:300
                }, {
                    region : 'center',
                    xtype : 'treepanel',
                    initComponent : function() {
                        this.callParent();
                    },
                    columns : [{
                                xtype : 'treecolumn',
                                sortable : false,
                                width : 200,
                                text : 'lala',
                                dataIndex : 'text' …
Run Code Online (Sandbox Code Playgroud)

extjs

5
推荐指数
1
解决办法
7868
查看次数

标签 统计

extjs ×1