nimoqq 2017-09-30 02:20 采纳率: 60.7%
浏览 1056
已采纳

extjs 说不是构造函数 大神来帮忙看看

图片说明

图片说明

 var grid_gxcw = Ext.define('grid_widget_gxcw',{
    extend:'Ext.grid.Panel',
    alias:'widget.gridgxcw',
    initComponent:function(){
        Ext.apply(this,{
            store: store_GXCW,
            id: 'gridGXCW',
            columnLines: true,
            layout: 'fit',
            viewConfig: {forceFit: true},
            columns: [
                {
                    text: '线路名称', dataIndex: 'XLMC', flex: 1, renderer: function (value) {
                    if (value) {
                        return value;
                    } else return '-';
                }
                },
                {
                    text: '安装地址', dataIndex: 'ADDRESS', flex: 1, renderer: function (value) {
                    if (value) {
                        return value;
                    } else return '-';
                }
                },
                {
                    text: '最高温(℃)', dataIndex: 'B_MAX_VALUE', flex: 1, renderer: function (value) {
                    if (value) {
                        return value;
                    } else return '-';
                }
                },
                {
                    text: '当前时间', dataIndex: 'B_CUR_TIME', flex: 1, renderer: function (value) {
                    if (value) {
                        return value;
                    } else return '-';
                }
                },

                {
                    text: '运行编号', dataIndex: 'YXBH', flex: 1, renderer: function (value) {
                    if (value) {
                        return value;
                    } else return '-';
                }
                },
                {
                    text: '备注', dataIndex: 'REMARK', flex: 1, renderer: function (value) {
                    if (value) {
                        return value;
                    } else return '-';
                }
                }
            ]
        });
        this.callParent(arguments);
    },
    listeners: {
        'itemcontextmenu': itemcontextmenu
    }
});
  • 写回答

1条回答 默认 最新

  • Go 旅城通票 2017-09-30 03:51
    关注

    注意作用域,你的grid_gxcw变量要在itemcontextmenu范围内才能访问到,grid_gxcw肯定是超出itemcontextmenu函数的访问范围了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件