mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] Actionsheet: get-container not work (#2853)
This commit is contained in:
parent
2dcd64c515
commit
c3cf74cda0
@ -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);
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user