mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [popper] prioritise user's popper-style (#12833)
* fix(components): [popper] prioritise users popper-style fix: #12831 * test: fix packages/popper testcase
This commit is contained in:
@@ -75,14 +75,14 @@ describe('<ElPopperContent />', () => {
|
||||
expect(wrapper.classes()).toEqual(['el-popper', 'is-dark'])
|
||||
expect(wrapper.vm.contentStyle).toHaveLength(3)
|
||||
expect(wrapper.vm.contentStyle[0]).toHaveProperty('zIndex')
|
||||
expect(wrapper.vm.contentStyle[1]).toEqual({})
|
||||
expect(wrapper.vm.contentStyle[2]).toEqual(
|
||||
expect(wrapper.vm.contentStyle[1]).toEqual(
|
||||
expect.objectContaining({
|
||||
position: 'absolute',
|
||||
top: '0',
|
||||
left: '0',
|
||||
})
|
||||
)
|
||||
expect(wrapper.vm.contentStyle[2]).toEqual({})
|
||||
})
|
||||
|
||||
it('should be able to be pure and themed', async () => {
|
||||
@@ -108,7 +108,7 @@ describe('<ElPopperContent />', () => {
|
||||
popperStyle: style,
|
||||
})
|
||||
|
||||
expect(wrapper.vm.contentStyle[1]).toEqual(style)
|
||||
expect(wrapper.vm.contentStyle[2]).toEqual(style)
|
||||
})
|
||||
|
||||
it('should be able to emit events', async () => {
|
||||
|
||||
@@ -29,8 +29,8 @@ export const usePopperContentDOM = (
|
||||
const contentStyle = computed<StyleValue[]>(() => {
|
||||
return [
|
||||
{ zIndex: unref(contentZIndex) } as CSSProperties,
|
||||
props.popperStyle || {},
|
||||
unref(styles).popper as CSSProperties,
|
||||
props.popperStyle || {},
|
||||
]
|
||||
})
|
||||
const ariaModal = computed<string | undefined>(() =>
|
||||
|
||||
Reference in New Issue
Block a user