mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
fix(components): [el-cascader] suddenly jump to the left (#4516)
This commit is contained in:
parent
7f025e1efc
commit
d05acba3d0
@ -5,7 +5,14 @@
|
||||
:append-to-body="popperAppendToBody"
|
||||
:popper-class="`el-cascader__dropdown ${popperClass}`"
|
||||
:popper-options="popperOptions"
|
||||
:fallback-placements="['bottom-start', 'top-start', 'right', 'left']"
|
||||
:fallback-placements="[
|
||||
'bottom-start',
|
||||
'bottom',
|
||||
'top-start',
|
||||
'top',
|
||||
'right',
|
||||
'left',
|
||||
]"
|
||||
:stop-popper-mouse-event="false"
|
||||
:gpu-acceleration="false"
|
||||
placement="bottom-start"
|
||||
@ -215,7 +222,7 @@ const popperOptions: Partial<Options> = {
|
||||
phase: 'main',
|
||||
fn: ({ state }) => {
|
||||
const { modifiersData, placement } = state as any
|
||||
if (['right', 'left'].includes(placement)) return
|
||||
if (['right', 'left', 'bottom', 'top'].includes(placement)) return
|
||||
modifiersData.arrow.x = 35
|
||||
},
|
||||
requires: ['arrow'],
|
||||
|
Loading…
Reference in New Issue
Block a user