diff --git a/packages/components/popper/__tests__/content.test.tsx b/packages/components/popper/__tests__/content.test.tsx index 266e63fada..6a82f8e015 100644 --- a/packages/components/popper/__tests__/content.test.tsx +++ b/packages/components/popper/__tests__/content.test.tsx @@ -75,14 +75,14 @@ describe('', () => { 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('', () => { popperStyle: style, }) - expect(wrapper.vm.contentStyle[1]).toEqual(style) + expect(wrapper.vm.contentStyle[2]).toEqual(style) }) it('should be able to emit events', async () => { diff --git a/packages/components/popper/src/composables/use-content-dom.ts b/packages/components/popper/src/composables/use-content-dom.ts index ac290feaef..0022ba07f3 100644 --- a/packages/components/popper/src/composables/use-content-dom.ts +++ b/packages/components/popper/src/composables/use-content-dom.ts @@ -29,8 +29,8 @@ export const usePopperContentDOM = ( const contentStyle = computed(() => { return [ { zIndex: unref(contentZIndex) } as CSSProperties, - props.popperStyle || {}, unref(styles).popper as CSSProperties, + props.popperStyle || {}, ] }) const ariaModal = computed(() =>