修复文集图标在某些情况下不显示的问题

This commit is contained in:
yangjian 2021-05-15 16:49:03 +08:00
parent 56a0242adf
commit 87b2525be8
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@
<div class="layui-input-inline" style="width: 30px;">
<button class="layui-btn layui-btn-primary layui-btn-sm" id="project-icon-select">
{% if pro.icon %}
<svg class="icon" aria-hidden="true"><use xlink:href="#{{pro.icon}}"></use></svg>
<svg class="icon" aria-hidden="true"><use xlink:href="{% if p.icon %}#{{pro.icon}}{% else %}#mrdoc-icon-pro-2{% endif %}"></use></svg>
{% else %}
<i class="layui-icon layui-icon-addition"></i>
{% endif %}

View File

@ -140,7 +140,7 @@
style="background: url({% static 'icon_img/viewcode.svg' %}) no-repeat right center;"
{% endif %}
>
{% if p.icon %}
{% if p.icon and p.icon != None %}
<p class="layui-elip" style="font-weight: 700;">
{% if p.is_top %}<i class="iconfont mrdoc-icon-totop" title="置顶文集" style="color: red;font-size: 12px;"></i>{% endif %}
<svg class="icon" aria-hidden="true"><use xlink:href="#{{p.icon}}"></use></svg> {{ p.name }}&nbsp;&nbsp;<span class="layui-badge-rim">{{p.id|get_doc_count}}</span>