[new feature] Popup: add duration prop

This commit is contained in:
陈嘉涵
2019-05-06 17:01:51 +08:00
parent 403c362476
commit 9c9642ee1f
6 changed files with 29 additions and 2 deletions
@@ -1,3 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`duration prop 1`] = `<div class="van-popup van-popup--center" style="transition-duration: 0.5s;" name="van-fade"></div>`;
exports[`reset z-index 1`] = `<div class="van-popup van-popup--center" name="van-fade"></div>`;
+11
View File
@@ -200,3 +200,14 @@ test('click event', () => {
wrapper.trigger('click');
expect(wrapper.emitted('click')).toBeTruthy();
});
test('duration prop', () => {
const wrapper = mount(Popup, {
propsData: {
value: true,
duration: 0.5
}
});
expect(wrapper).toMatchSnapshot();
});