Extjs6.2 簡單版單元格提示
阿新 • • 發佈:2018-04-08
leg 不能 span pda lis 視圖 type 提示 min
onRender: function (grid) { var tip = Ext.create(‘Ext.tip.ToolTip‘, { title: ‘Detail‘, minWidth: 800, maxWidth: 800, minHeight: 200, maxHeight: 200, showDelay: 1000, autoHide: false, target: grid.el,//Ext.getBody().eltools: [{ type: ‘close‘, tooltip: ‘Refresh from Data‘, handler: function (event, toolEl, panel) { this.ownerCt.ownerCt.hide(); } }], delegate: ‘.x-grid-cell-special‘,//這行是關鍵,提示選擇器,符合要求就彈出提示 trackMouse:true, listeners: { beforeshow: function updateTipBody(tip) { var tipTable =grid.hasOwnProperty(‘ownerCt‘)? grid.ownerCt.tipTable || grid.tipTable: grid.tipTable;// 位置不能動,grid屬於下一層,tipTable定義在上一層視圖 var id = grid.getView().getRecord(tip.triggerElement.parentElement).get(‘tf_id‘), url = ‘/S/XSux/DataTable.asp?entityName=‘ + tipTable + ‘&tf_id=‘ + id; tip.update(‘<iframe frameborder="0" width="780" height="180" src=‘ + url + ‘></iframe>‘); } } }); }
Extjs6.2 簡單版單元格提示