[bugfix] Icon: should support render local image
This commit is contained in:
@@ -10,6 +10,11 @@ exports[`render icon with builtin icon name 1`] = `
|
||||
<!----></i>
|
||||
`;
|
||||
|
||||
exports[`render icon with local image 1`] = `
|
||||
<i class="van-icon van-icon--image"><img src="/assets/icon.jpg">
|
||||
<!----></i>
|
||||
`;
|
||||
|
||||
exports[`render icon with url name 1`] = `
|
||||
<i class="van-icon van-icon--image"><img src="https://img.yzcdn.com/icon.jpg">
|
||||
<!----></i>
|
||||
|
||||
@@ -19,6 +19,15 @@ test('render icon with url name', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('render icon with local image', () => {
|
||||
const wrapper = mount(Icon, {
|
||||
propsData: {
|
||||
name: '/assets/icon.jpg'
|
||||
}
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('render icon default slot', () => {
|
||||
const wrapper = mount({
|
||||
render(h) {
|
||||
|
||||
Reference in New Issue
Block a user