diff --git a/packages/actionsheet/index.tsx b/packages/actionsheet/index.tsx index e0bac3c54..8d5898717 100644 --- a/packages/actionsheet/index.tsx +++ b/packages/actionsheet/index.tsx @@ -92,6 +92,7 @@ function Actionsheet( position="bottom" overlay={props.overlay} lazyRender={props.lazyRender} + getContainer={props.getContainer} closeOnClickOverlay={props.closeOnClickOverlay} onInput={(value: boolean) => { emit(ctx, 'input', value); diff --git a/packages/actionsheet/test/index.spec.js b/packages/actionsheet/test/index.spec.js index dcb7e8c06..6d209c27b 100644 --- a/packages/actionsheet/test/index.spec.js +++ b/packages/actionsheet/test/index.spec.js @@ -52,3 +52,14 @@ test('disable lazy-render', () => { expect(wrapper).toMatchSnapshot(); }); + +test('get container', () => { + const wrapper = mount(Actionsheet, { + propsData: { + value: true, + getContainer: 'body' + } + }); + + expect(wrapper.vm.$el.parentNode).toEqual(document.body); +});