feat(Calendar): add color prop

This commit is contained in:
陈嘉涵
2019-12-27 18:01:51 +08:00
committed by neverland
parent 56e450f29e
commit 3250804791
10 changed files with 203 additions and 5 deletions
+32
View File
@@ -375,3 +375,35 @@ test('set show-mark prop to false', async () => {
expect(wrapper.find('.van-calendar__month-mark').element).toBeFalsy();
});
test('color prop when type is single', async () => {
const wrapper = mount(Calendar, {
propsData: {
minDate,
maxDate,
color: 'blue',
poppable: false
}
});
await later();
expect(wrapper).toMatchSnapshot();
});
test('color prop when type is range', async () => {
const wrapper = mount(Calendar, {
propsData: {
defaultDate: [minDate, maxDate],
type: 'range',
minDate,
maxDate,
color: 'blue',
poppable: false
}
});
await later();
expect(wrapper).toMatchSnapshot();
});