Javascript 在视图中显式实例化存储时出错

Javascript 在视图中显式实例化存储时出错,javascript,extjs,Javascript,Extjs,我有这样的看法: Ext.define('MyApp.view.CustomersList', { extend: 'Ext.grid.Panel', store: Ext.create('MyApp.store.Customers'), columns: [ { width: 150, dataIndex: 'customerName', text: 'CustomerName'

我有这样的看法:

Ext.define('MyApp.view.CustomersList', {
    extend: 'Ext.grid.Panel',

    store: Ext.create('MyApp.store.Customers'),

    columns: [
        {
            width: 150,
            dataIndex: 'customerName',
            text: 'CustomerName'
        },
        {
            width: 200,
            dataIndex: 'customerNumber',
            flex: 1,
            text: 'CustomerNumber'
        }
    ]
});
Uncaught TypeError: Expecting a function in instanceof check, but got function constructor() {
        // Opera has some problems returning from a constructor when Dragonfly isn't running. The || null seems to
        // be sufficient to stop it misbehaving. Known to be required against 10.53, 11.51 and 11.61.
        return this.constructor.apply(this, arguments) || null;
    } 

Uncaught TypeError: Expecting a function in instanceof check, but got function constructor() {
        // Opera has some problems returning from a constructor when Dragonfly isn't running. The || null seems to
        // be sufficient to stop it misbehaving. Known to be required against 10.53, 11.51 and 11.61.
        return this.constructor.apply(this, arguments) || null;
    } 
我显式实例化了一个存储,但当我在视口中加载此视图时,我发现如下错误:

Ext.define('MyApp.view.CustomersList', {
    extend: 'Ext.grid.Panel',

    store: Ext.create('MyApp.store.Customers'),

    columns: [
        {
            width: 150,
            dataIndex: 'customerName',
            text: 'CustomerName'
        },
        {
            width: 200,
            dataIndex: 'customerNumber',
            flex: 1,
            text: 'CustomerNumber'
        }
    ]
});
Uncaught TypeError: Expecting a function in instanceof check, but got function constructor() {
        // Opera has some problems returning from a constructor when Dragonfly isn't running. The || null seems to
        // be sufficient to stop it misbehaving. Known to be required against 10.53, 11.51 and 11.61.
        return this.constructor.apply(this, arguments) || null;
    } 

Uncaught TypeError: Expecting a function in instanceof check, but got function constructor() {
        // Opera has some problems returning from a constructor when Dragonfly isn't running. The || null seems to
        // be sufficient to stop it misbehaving. Known to be required against 10.53, 11.51 and 11.61.
        return this.constructor.apply(this, arguments) || null;
    } 

希望能有帮助

谢谢你的帮助,我很感激。该类加载良好,没有错误。但当我从控制器调用{store}.load()方法时,存储区不加载数据,因此网格为空。我要解决这个问题的方法是在app.js的requires config中添加“MyApp.store.Customers”。很高兴这有帮助!!我建议在视图之外的单独文件中创建存储。您可以提供一些更详细的信息或代码示例,这将有助于识别问题。