extjs 右键菜单 问题

lovesiyile lovesiyile 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

rowcontextmenu:function(grid,rowIndex,e){//右键菜单
e.preventDefault();document.title=(rowIndex) //这里的index是每次点击的行
if(menu==null){//为了节省资源,只创建一次
menu=new Ext.menu.Menu({
items:[{
text:msg.add,iconCls:"icon icon_add",
handler:showadd
},{
text:msg.edit,iconCls:"icon icon_edit",
handler:function(){document.title+=","+(rowIndex)//但是这里的index却始终是第一次点击的行,这是怎么回事啊,谁给解释下?
//到底要怎样才能在第二次点击时获取当然右键的行?
showedit(grid.getStore().getAt(rowIndex));
}
},{
text:msg.del,iconCls:"icon icon_del",
handler:function(){
showdel(grid.getStore().getRange(rowIndex,rowIndex))
}
}]
});

};
menu.showAt(e.getPoint())

grid的右键菜单
...全文
评论 3
收藏 已收藏
分享
返回顶部
lovesiyile
JavaScript 87,984 成员 224,681 内容