[new feature] Image: add loading slot

This commit is contained in:
陈嘉涵
2019-05-17 14:51:06 +08:00
parent 1321ba6902
commit d7b69d2fe4
8 changed files with 185 additions and 34 deletions
+4
View File
@@ -19,6 +19,10 @@ test('load event', () => {
wrapper.find('img').trigger('load');
expect(wrapper.emitted('load')[0][0]).toBeTruthy();
expect(wrapper).toMatchSnapshot();
wrapper.setProps({ src: '' });
expect(wrapper).toMatchSnapshot();
});
test('error event', () => {