1

运行 app.html 时,使用 sencha architect 3.0 发布后,显示以下错误。在编译时能够看到填充在此网格中的值。

但是链接似乎是空的,以便为新的 2.3 beta 版本获取 Grid.js....

请让我知道解决此错误的任何其他方法。

错误:加载资源失败:服务器响应状态为 404(未找到)http://sc13-live.sencha.com/touch/touch-2.3.0/src/grid/Grid.js?_dc=1378814671364

// @require @packageOverrides Ext.Loader.setConfig({

});

Ext.application({ 模型:['MyModel'],商店:['MyDirectStore'],视图:['MyGrid'],名称:'MyApp',

launch: function() {

    Ext.create('MyApp.view.MyGrid', {fullscreen: true});
}

});

Ext.define('MyApp.view.MyGrid', { 扩展:'Ext.grid.Grid',

config: {
    height: 297,
    width: 444,
    store: 'MyDirectStore',
    title: 'Grid-5Cols',
    columns: [
        {
            xtype: 'column',
            width: 85,
            dataIndex: 'no',
            text: 'EmpNo'
        },
        {
            xtype: 'column',
            width: 89,
            dataIndex: 'name',
            text: 'EName'
        },
        {
            xtype: 'column',
            width: 86,
            dataIndex: 'sal1',
            text: 'Sal1'
        },
        {
            xtype: 'column',
            width: 86,
            dataIndex: 'sal2',
            text: 'Sal2'
        },
        {
            xtype: 'column',
            width: 80,
            dataIndex: 'sal3',
            text: 'Sal3'
        }
    ]
}

});

Ext.define('MyApp.store.MyDirectStore', { 扩展:'Ext.data.Store',

requires: [
    'MyApp.model.MyModel'
],

config: {
    data: [
        [
            '1',
            'AceSupplies',
            '05',
            '1000',
            '10'
        ],
        [
            '2',
            'BestGoods',
            '11',
            '2000',
            '20'
        ],
        [
            '3',
            'First Choice',
            '20',
            '3000',
            '30'
        ]
    ],
    model: 'MyApp.model.MyModel',
    storeId: 'MyDirectStore',
    proxy: {
        type: 'direct',
        reader: {
            type: 'json'
        }
    }
}

});

Ext.define('MyApp.model.MyModel', { 扩展:'Ext.data.Model',

config: {
    fields: [
        {
            name: 'no',
            type: 'int'
        },
        {
            name: 'name',
            type: 'string'
        },
        {
            name: 'sal1',
            type: 'float'
        },
        {
            name: 'sal2',
            type: 'float'
        },
        {
            name: 'sal3',
            type: 'float'
        }
    ]
}

});

4

1 回答 1

0

新的 Sencha Touch Grid 不包含在标准 Sencha Touch 中,请参见下文:

请注意,新的 Touch Grid 组件不是 Sencha Touch 的一部分,仅作为 Sencha Complete 或 Sencha Touch Bundle 的一部分提供。

来源:http ://www.sencha.com/products/touch/

于 2013-10-02T11:08:33.327 回答