View unanswered posts | View active topics It is currently 2019-12-10 12:37



Reply to topic  [ 2 posts ] 
 右键菜单异步bug 
Author Message
初级会员

Joined: 2017-10-25 14:53
Posts: 61
Post 右键菜单异步bug
如果右键菜单有异步,那么第一次就加载不出来,第二次会加载第一次的,看我的demo,有方案解决吗?执行我的demo要替换下twaver的路径


Attachments:
demo.zip [969 Bytes]
Downloaded 33 times
2019-08-26 19:01
Profile
新手上路

Joined: 2019-04-23 11:02
Posts: 16
Post Re: 右键菜单异步bug
在你的afterRightMenu 函数里加一段 就可以立即显示
if (popupMenu.onMenuShowing(e) === true) {
popupMenu.show(e);
}
不过这个延迟菜单还需要优化,因为如果是每次右键都需要请求菜单数据的话,你需要在第一次菜单弹出之后,清空菜单。保证下一次点击,弹出的是请求过来的数据,不然会在菜单显示的时候改变(或者是在连点之后会在不同位置闪烁点击的菜单)。要不然自己验证有缓存的数据就不是每次都请求。


2019-08-28 18:32
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron