feat(Cell): add icon-prefix prop (#5666)

This commit is contained in:
chenjiahan
2020-02-24 21:24:26 +08:00
parent aba946f20e
commit 51513d9423
6 changed files with 27 additions and 1 deletions
@@ -12,6 +12,11 @@ exports[`arrow direction 1`] = `
<!----></i></div>
`;
exports[`icon-prefix prop 1`] = `
<div class="van-cell"><i class="my-icon my-icon-success van-cell__left-icon">
<!----></i></div>
`;
exports[`render slot 1`] = `
<div class="van-cell">Custom Icon<div class="van-cell__title">Custom Title<div class="van-cell__label">Custom Label</div>
</div>Custom Extra</div>
+11
View File
@@ -67,3 +67,14 @@ test('CellGroup title slot', () => {
expect(wrapper).toMatchSnapshot();
});
test('icon-prefix prop', () => {
const wrapper = mount(Cell, {
propsData: {
iconPrefix: 'my-icon',
icon: 'success',
},
});
expect(wrapper).toMatchSnapshot();
});