首页  >  问答  >  正文

javascript - 为什么点击extjs grid中按钮弹出框在当前窗口的下面层?


onclick:function(){

    Ext.create('Ext.window.Window',{
        title:'aa',
        width:500,
        height:500,
        items:[{  xtype: 'grid',
            columns: [
                { text: 'Name',  dataIndex: 'name' },
                { text: 'Email', dataIndex: 'email', flex: 1 },
                { text: 'Phone', dataIndex: 'phone', flex: 1 },
                {text:'text', dataIndex:'service',renderer:function(value,cellmeta){   return "<input type='button' value='onclick' >"},
                    listeners:{  click:function(){
                      Ext.create('Ext.window.Window',{
                          title:'grid',
                          width:300,
                          height:200,
                          modal:true,
                          plain:true,
                      }).show();
                    }}
                }],
            height:300,
            width:500,
            store: {
                type: 'personnel'
            }
        }],
        buttons:[{text:'save',   handler:function(){ Ext.Msg.alert('info','8956') }}]

    }).show();
 
}

这个是extjs开发 的  点击save 按钮弹出框正常在上面 ,  点击onclick按钮弹出框层在当前层下面, 如何让它显示在上面?![图片描述][2]
阿神阿神2720 天前331

全部回复(2)我来回复

  • ringa_lee

    ringa_lee2017-04-11 12:49:49

    尝试了你的代码发现没有你所说的问题,你的ext什么版本的。我用4.2.0没有问题

    回复
    0
  • 迷茫

    迷茫2017-04-11 12:49:49

    确认2个元素的z-index属性。在下面是因为其z-index值较小。将其生成的z-index调整应该可能解决。没使用过extjs就只有帮你到这里了。

    回复
    0
  • 取消回复