mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-24 11:05:17 +08:00
fix(popper): fix popper gets covered by dialog/drawer (#861)
- Make popper's zIndex dynamic in order to allow popper related features in `Dialog/Drawer` to show
This commit is contained in:
parent
9ad78debcf
commit
977767e2e7
@ -1,4 +1,4 @@
|
||||
import { computed, ref, reactive, watch } from 'vue'
|
||||
import { computed, ref, reactive, watch, CSSProperties } from 'vue'
|
||||
import { createPopper } from '@popperjs/core'
|
||||
|
||||
import {
|
||||
@ -41,11 +41,7 @@ export default function(
|
||||
|
||||
const isManualMode = () => props.manualMode || props.trigger === 'manual'
|
||||
|
||||
const popperStyle = computed(() => {
|
||||
return {
|
||||
zIndex: String(PopupManager.nextZIndex()),
|
||||
}
|
||||
})
|
||||
const popperStyle = ref<CSSProperties>({ zIndex: PopupManager.nextZIndex() })
|
||||
|
||||
const popperOptions = usePopperOptions(props, {
|
||||
arrow: arrowRef,
|
||||
@ -189,6 +185,7 @@ export default function(
|
||||
|
||||
function onVisibilityChange(toState: boolean) {
|
||||
if (toState) {
|
||||
popperStyle.value.zIndex = PopupManager.nextZIndex()
|
||||
initializePopper()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user