Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
扩展extjs视图_Extjs_Extjs4 - Fatal编程技术网

扩展extjs视图

扩展extjs视图,extjs,extjs4,Extjs,Extjs4,我需要创建几个视图,具有相同的内容,只有一个网格,彼此之间会有一些不同 我的想法是创建一个基本视图,但我不知道如何在继承的类中更改这个网格 基数: 总体思路是这样做: Ext.define('BaseGrid', function(){ initComponent: function(){ this.columns = this.getColumns(); this.callParent(); }, getColumns: Ext.emp

我需要创建几个视图,具有相同的内容,只有一个网格,彼此之间会有一些不同

我的想法是创建一个基本视图,但我不知道如何在继承的类中更改这个网格

基数:


总体思路是这样做:

Ext.define('BaseGrid', function(){
    initComponent: function(){
        this.columns = this.getColumns();
        this.callParent();
    },

    getColumns: Ext.emptyFn
});

Ext.define('SubGrid', {
    getColumns: function(){
        return [];
    }
});

总体思路是这样做:

Ext.define('BaseGrid', function(){
    initComponent: function(){
        this.columns = this.getColumns();
        this.callParent();
    },

    getColumns: Ext.emptyFn
});

Ext.define('SubGrid', {
    getColumns: function(){
        return [];
    }
});

可能有助于更具描述性,以便新手用户理解,但+1表示正确。可能有助于更具描述性,以便新手用户理解,但+1表示正确。