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函数的访问范围了

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

报告相同问题?

悬赏问题

  • ¥50 comsol稳态求解器 找不到解,奇异矩阵有1个空方程返回的解不收敛。没有返回所有参数步长;pid控制
  • ¥15 怎么让wx群机器人发送音乐
  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功