feat(Calendar): add lazy-render prop (#6245)

This commit is contained in:
neverland
2020-05-08 20:03:23 +08:00
committed by GitHub
parent 2582d334ca
commit f344334e12
6 changed files with 79 additions and 2 deletions
+13
View File
@@ -167,3 +167,16 @@ test('min-date before current time', () => {
wrapper.find('.van-calendar__confirm').trigger('click');
expect(formatDate(wrapper.emitted('confirm')[0][0])).toEqual('1800/1/2');
});
test('lazy-render prop', () => {
const wrapper = mount(Calendar, {
propsData: {
minDate,
maxDate,
poppable: false,
lazyRender: false,
},
});
expect(wrapper).toMatchSnapshot();
});