Extjs gird里图片双击放大

代码:

    {
                            text: "图片",
                            dataIndex: "aLias",
                            //  id:'pic',
                            align: 'center',
                            locked: true,
                            width: 120,
                            renderer: function (value, metaData, record) {
                                var id = metaData.record.id;//Ext.id();
                                //metaData.tdAttr = 'data-qtip="这是宝马"';
                                Ext.defer(function () {
                                    Ext.create('Ext.Img', {
                                        height: 15,
                                        width: 60,
                                        src: 'XXXX?pdtno=' + value,
                                        renderTo: id,
                                        listeners: {
                                            scope: this,
                                            el: {
                                                dblclick: function (e, a) {
                                                    var win_Watch = Ext.create('Ext.Window', {
                                                        width: 400,
                                                        height: 300,
                                                        minHeight: 300,
                                                        minWidth: 200,
                                                        maximizable: true,
                                                        title: '图片大图',
                                                        layout: "fit", //窗口布局类型
                                                        modal: true, //是否模态窗口,默认为false
                                                        resizable: false,
                                                        closeAction: 'hide',
                                                        plain: true,
                                                        draggable: true,
                                                        border: false,
                                                        items: [
                                                            Ext.create('Ext.Img', {
                                                                height: 200,
                                                                width: 300,
                                                                src: 'XXXX?pdtno=' + value,
                                                            })
                                                        ]
                                                    });
                                                    win_Watch.show();
                                                }
                                            }
                                        }
                                    })
                                }, 50);
                                return Ext.String.format('
', id); }, listeners: { 'cellclick': function () { alert('我也不知道什么意思!----------'); } } },

你可能感兴趣的:(Extjs)