mirror of
https://github.com/youzan/vant.git
synced 2026-05-07 01:01:01 +08:00
[new feature] Icon: size prop support number type
This commit is contained in:
@@ -15,6 +15,11 @@ exports[`render icon with url name 1`] = `
|
||||
<!----></i>
|
||||
`;
|
||||
|
||||
exports[`size without unit 1`] = `
|
||||
<i class="van-icon van-icon-undefined" style="font-size: 20px;">
|
||||
<!----></i>
|
||||
`;
|
||||
|
||||
exports[`tag prop 1`] = `
|
||||
<div class="van-icon van-icon-undefined">
|
||||
<!---->
|
||||
|
||||
@@ -36,3 +36,12 @@ test('tag prop', () => {
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('size without unit', () => {
|
||||
const wrapper = mount(Icon, {
|
||||
propsData: {
|
||||
size: 20
|
||||
}
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user