【发布时间】:2018-08-16 05:34:35
【问题描述】:
我使用这样的 svg 精灵:
<svg><use href="combined.svg#filter_sent"></use></svg>
在Meteor/Blaze 模板助手中,不会渲染 svg 精灵:
<div class="colorset">
{{{color}}}
</div>
color: function () {
if (this.color && !this.validate) {
return '<svg><use href="combined.svg#green"></use></svg>';
}
if (this.color && this.certain) {
return '<svg><use href="combined.svg#orange"></use></svg>';
} else {
return '<svg><use href="combined.svg#red"></use></svg>';
}
}
=> 在use > shadow-root 内,没有插入任何内容。
【问题讨论】:
-
请添加模板的HTML部分
-
@Jankapunkt 完成 - 没什么特别的。
标签: meteor meteor-blaze