فهرست منبع

fix(contextmenu): 解决IE11下右键菜单定位错误和页签头部高度问题

zhaihaoyi 6 سال پیش
والد
کامیت
5174de8dc5
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 1
      src/components/RouterTab.js
  2. 2 1
      src/scss/routerTab.scss

+ 1 - 1
src/components/RouterTab.js

@@ -439,7 +439,7 @@ export default {
     // 显示页签右键菜单
     showContextmenu (id, index, e) {
       // 菜单定位
-      let { y: top, x: left } = e || emptyObj
+      let { clientY: top, clientX: left } = e || emptyObj
       Object.assign(this.contextmenu, { id, index, top, left })
     },
 

+ 2 - 1
src/scss/routerTab.scss

@@ -12,8 +12,9 @@ $color-primary: #409eff;
   flex-direction: column;
 
   &-header {
+    flex: none;
     position: relative;
-		z-index: 9;
+    z-index: 9;
     border-bottom: 2px solid $color-primary;
     box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
     transition: all .2s ease-in-out;