feat(Popup): add closeable prop (#4362)

This commit is contained in:
neverland
2019-09-04 17:58:34 +08:00
committed by GitHub
parent 0bd3997373
commit e64beee5b0
7 changed files with 92 additions and 115 deletions
+12
View File
@@ -227,3 +227,15 @@ test('round prop', () => {
expect(wrapper).toMatchSnapshot();
});
test('closeable prop', () => {
const wrapper = mount(Popup, {
propsData: {
value: true,
closeable: true
}
});
wrapper.find('.van-popup__close-icon').trigger('click');
expect(wrapper.emitted('input')[0][0]).toEqual(false);
});