[bugfix] Actionsheet: get-container not work (#2853)

This commit is contained in:
neverland 2019-02-26 19:31:23 +08:00 committed by GitHub
parent 2dcd64c515
commit c3cf74cda0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -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);

View File

@ -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);
});