2
我使用這個代碼在網格渲染事件顯示TPL上排鼠標懸停顯示行提示懸停
grid.tip = new Ext.ToolTip({
view: grid.getView(),
target: grid.getView().mainBody,
delegate: '.x-grid3-row',
trackMouse: true,
renderTo: Ext.getBody(),
showDelay: 1000,
listeners: {
beforeshow: function updateTipBody(tip) {
var i = grid.getView().findRowIndex(tip.triggerElement);
var ViewObj = grid.getStore().getAt(i);
var nameVar, addressVar, salesOrgVar;
if (ViewObj.get('ERROR_MESSAGE') != null && (ViewObj.get('ERROR_MESSAGE')).length > 1) {
console.log("done..");
nameVar = (ViewObj.get('ERROR_MESSAGE') != null && ViewObj.get('ERROR_MESSAGE') != "") ? (Ext.BUNDLE.getMsg('POSFilesWidget.ErrorFolderGrid.ErrorFolder.label') + " : " + ViewObj.get('ERROR_MESSAGE')) : "";
tip.update(nameVar);
} else {
tip.setSize(0, 0);
tip.setVisible(false);
console.log("1..");
}
}
}
});
但是當不來的消息則顯示我的空白第三方物流,但我不想顯示工具提示請參閱圖像