File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<transition name =" viewer-fade" >
3
- <div tabindex =" -1" ref =" el-image-viewer__wrapper" class =" el-image-viewer__wrapper" :style =" { 'z-index': zIndex }" >
3
+ <div tabindex =" -1" ref =" el-image-viewer__wrapper" class =" el-image-viewer__wrapper" :style =" { 'z-index': viewerZIndex }" >
4
4
<div class =" el-image-viewer__mask" @click.self =" handleMaskClick" ></div >
5
5
<!-- CLOSE -->
6
6
<span class =" el-image-viewer__btn el-image-viewer__close" @click =" hide" >
54
54
<script >
55
55
import { on , off } from ' element-ui/src/utils/dom' ;
56
56
import { rafThrottle , isFirefox } from ' element-ui/src/utils/util' ;
57
+ import { PopupManager } from ' element-ui/src/utils/popup' ;
57
58
58
59
const Mode = {
59
60
CONTAIN : {
@@ -143,6 +144,10 @@ export default {
143
144
style .maxWidth = style .maxHeight = ' 100%' ;
144
145
}
145
146
return style;
147
+ },
148
+ viewerZIndex () {
149
+ const nextZIndex = PopupManager .nextZIndex ();
150
+ return this .zIndex > nextZIndex ? this .zIndex : nextZIndex;
146
151
}
147
152
},
148
153
watch: {
@@ -167,7 +172,8 @@ export default {
167
172
this .onClose ();
168
173
},
169
174
deviceSupportInstall () {
170
- this ._keyDownHandler = rafThrottle (e => {
175
+ this ._keyDownHandler = e => {
176
+ e .stopPropagation ();
171
177
const keyCode = e .keyCode ;
172
178
switch (keyCode) {
173
179
// ESC
@@ -195,7 +201,7 @@ export default {
195
201
this .handleActions (' zoomOut' );
196
202
break ;
197
203
}
198
- }) ;
204
+ };
199
205
this ._mouseWheelHandler = rafThrottle (e => {
200
206
const delta = e .wheelDelta ? e .wheelDelta : - e .detail ;
201
207
if (delta > 0 ) {
You can’t perform that action at this time.
0 commit comments