add loading

This commit is contained in:
Harvey Zack committed 2018-10-15 17:36:10 +08:00
1 parent e319afd422
commit 7cdf9f69e6
14 files changed
+329 -6

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import loading from './loading.svg';
const Icons = {
loading: loading
};
function creatDomFromSvg(map) {
const result = {};
Object.keys(map).forEach(name => {
const tmp = document.createElement('div');
tmp.innerHTML = map[name];
[result[name]] = tmp.childNodes;
});
return result;
}
export default creatDomFromSvg(Icons);