提交 6c0d8f7b 编写于 作者: C codecalm

svg fix

上级 09a0ea58
......@@ -28,7 +28,7 @@
<ul class="demo-icons-list">
{% for icon in icons limit: limit %}
<li class="demo-icons-list-item">
<a href="#" class="text-reset" data-toggle-icon="{{ icon }}" data-toggle="tooltip" title="{{ icon }}" data-icon-svg="{% capture svg %}{% highlight html %}{% include ui/icon.html icon=icon %}{% endhighlight %}{% endcapture %}{{ svg | escape }}">
<a href="#" class="text-reset" data-toggle-icon="{{ icon }}" title="{{ icon }}" data-icon-svg="{% capture svg %}{% highlight html %}{% include ui/icon.html icon=icon %}{% endhighlight %}{% endcapture %}{{ svg | escape }}">
{% include ui/icon.html icon=icon %}
<div class="mt-1 text-muted text-h5">{{ icon }}</div>
</a>
......@@ -60,10 +60,12 @@
elements.forEach(function (element) {
element.addEventListener('click', function(e){
var icon = this.dataset.toggleIcon,
svg = this.innerHTML,
svg = this.querySelector('svg'),
iconCode = this.dataset.iconSvg,
editor = getClosest(this, '[data-icon-preview]');
console.log('icon', icon);
console.log('icon', this.querySelector('svg'));
console.log('iconCode', iconCode);
editor.querySelectorAll('[data-icon-preview-icon]')[0].innerHTML = svg;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册