[new feature] SwitchCell: add cell-size prop

This commit is contained in:
陈嘉涵
2019-04-30 15:30:24 +08:00
parent 95925ab328
commit 70351dc4f0
8 changed files with 36 additions and 3 deletions

View File

@@ -9,3 +9,13 @@ exports[`border prop 1`] = `
</div>
</div>
`;
exports[`cell-size prop 1`] = `
<div class="van-cell van-cell--center van-cell--large van-switch-cell van-switch-cell--large">
<div class="van-cell__value van-cell__value--alone">
<div class="van-switch" style="font-size: 24px;">
<div class="van-switch__node"></div>
</div>
</div>
</div>
`;

View File

@@ -25,3 +25,13 @@ test('border prop', () => {
expect(wrapper).toMatchSnapshot();
});
test('cell-size prop', () => {
const wrapper = mount(SwitchCell, {
propsData: {
cellSize: 'large'
}
});
expect(wrapper).toMatchSnapshot();
});