【问题标题】:sencha 2.3 beta - Touch Grid is not working at run-time using sencha Architect v3.0sencha 2.3 beta - 使用 sencha Architect v3.0 的 Touch Grid 在运行时不工作
【发布时间】:2013-09-10 12:22:33
【问题描述】:

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

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

请告诉我任何其他解决此错误的方法。

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

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

});

Ext.应用程序({ 楷模: [ '我的模特' ], 商店:[ '我的直接商店' ], 意见:[ “我的网格” ], 名称:“我的应用”,

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'
        }
    ]
}

});

【问题讨论】:

  • 发布您的代码,以便其他人可以帮助您。
  • 这个应用程序是使用 sencha architect 3.0 完成的,带有 sencha touch 2.3 beta。

标签: sencha-touch sencha-architect


【解决方案1】:

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

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

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

【讨论】:

  • 无论如何我们可以将它添加到我们的煎茶触摸中,我尝试使用 Ext.Loader.setConfig({ enabled : true, paths : { 'Ext.ux.touch.grid': ' /Ext.ux.touch.grid' } });并将文件夹放在根目录下。
猜你喜欢
  • 1970-01-01
  • 2012-10-06
  • 1970-01-01
  • 2023-04-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多