|
@@ -77,7 +77,13 @@ export default {
|
|
|
that.showCustomMenu(event)
|
|
|
});
|
|
|
// 当点击任意地方或者按下ESC键时,隐藏菜单
|
|
|
- window.onclick = this.hideCustomMenu
|
|
|
+ // window.onclick = this.hideCustomMenu
|
|
|
+ window.addEventListener('click',function(event){
|
|
|
+ var customMenu = that.$refs.customMenu
|
|
|
+ if (event.target != customMenu && !customMenu.contains(event.target)) {
|
|
|
+ customMenu.style.display = "none";
|
|
|
+ }
|
|
|
+ })
|
|
|
window.onkeydown = this.checkKeyPress
|
|
|
},
|
|
|
methods: {
|