0

当我使用 Ext.ux.touch.grid 时,发生了错误?

“无法读取未定义的属性‘特征’”

但只有当我这样使用它时才会发生,

this.testGrid = Ext.create('Geo.view.Grid');

在 application.js 文件中,一个主控制器文件

config: {
   refs: {
        main: 'mainview',
        worklist: 'worklist',
        testGrid: 'testGrid'
    },

这是 testGrid 视图文件

Ext.define('Geo.view.Grid', {
    extend : 'Ext.ux.touch.grid.List',
    xtype  : 'testGrid',

    requires : [
        'Ext.ux.touch.grid.feature.Feature',
        'Ext.ux.touch.grid.feature.Editable',
        'Ext.ux.touch.grid.feature.Sorter',
        'Ext.field.Number',
        'Geo.store.Grid'
    ],

    config : {
        title    : 'Grid',
        store    : true,
        columns  : [
            {
                header    : 'Text',
                dataIndex : 'text',
                width     : '90%',
                editor    : {
                    xtype  : 'textfield'
                }
            },
            {
                header    : 'Amount',
                dataIndex : 'amount',
                width     : '10%',
                editor    : {
                    xtype  : 'numberfield'
                }
            }
        ],
        features : [
            {
                ftype    : 'Ext.ux.touch.grid.feature.Sorter',
                launchFn : 'initialize'
            },
            {
                ftype    : 'Ext.ux.touch.grid.feature.Editable',
                launchFn : 'initialize'
            }
        ]
    },

    applyStore : function() {
        return new Geo.store.Grid();
    }
});

直接在主视图文件中使用时正确

 items: [
     {xtype: 'dashboards'},
     {xtype: 'testGrid'}
 ]

谁知道原因?非常感谢

4

1 回答 1

0

您是否将商店设置为自动加载:true,(?)

于 2014-01-04T14:33:01.350 回答