[improvement] move overlay component (#2192)
This commit is contained in:
@@ -1,15 +1,6 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van {
|
||||
&-modal {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
&-overflow-hidden {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ test('render overlay', () => {
|
||||
}
|
||||
});
|
||||
|
||||
expect(div.querySelector('.van-modal')).toBeTruthy();
|
||||
expect(div.querySelector('.van-overlay')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('close on click modal', () => {
|
||||
@@ -136,7 +136,7 @@ test('close on click modal', () => {
|
||||
}
|
||||
});
|
||||
|
||||
const modal = div.querySelector('.van-modal');
|
||||
const modal = div.querySelector('.van-overlay');
|
||||
triggerDrag(modal, 0, -30);
|
||||
modal.click();
|
||||
expect(wrapper.vm.value).toBeFalsy();
|
||||
|
||||
Reference in New Issue
Block a user