[improvement] move overlay component (#2192)

This commit is contained in:
neverland
2018-11-30 16:40:50 +08:00
committed by GitHub
parent 996c67b4fc
commit 89ff50944c
11 changed files with 40 additions and 18 deletions
-9
View File
@@ -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;
}
+2 -2
View File
@@ -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();