icon 支持自定义元素

This commit is contained in:
Harvey Zack committed 2019-05-07 08:27:16 +08:00
1 parent 5d286e5d00
commit 23237c5ed6
3 files changed
+4 -6

No files matched your search

+1 -2
View File
@@ -5240,11 +5240,10 @@
next: next
}, art.option.icons);
Object.keys(icons).forEach(function (key) {
errorHandle(typeof icons[key] === 'string', 'Custom icon values ​​only support string types.');
var icon = document.createElement('i');
icon.classList.add('art-icon');
icon.classList.add("art-icon-".concat(key));
icon.innerHTML = icons[key];
append(icon, icons[key]);
_this[key] = icon;
});
};