[new feature] Icon: size prop support number type

This commit is contained in:
陈嘉涵
2019-05-04 16:41:01 +08:00
parent b644c91383
commit ca020f3214
8 changed files with 29 additions and 7 deletions
@@ -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">
<!---->
+9
View File
@@ -36,3 +36,12 @@ test('tag prop', () => {
});
expect(wrapper).toMatchSnapshot();
});
test('size without unit', () => {
const wrapper = mount(Icon, {
propsData: {
size: 20
}
});
expect(wrapper).toMatchSnapshot();
});