Skip to content

Commit 7944e08

Browse files
author
yangjian
committed
fix:修复文集图标为None时的图标显示问题
1 parent 7370828 commit 7944e08

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

template/app_doc/manage/manage_project_options.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
<div class="layui-input-inline" style="width: 30px;">
4242
<button class="layui-btn layui-btn-primary layui-btn-sm" id="project-icon-select">
4343
{% if pro.icon %}
44-
<svg class="icon" aria-hidden="true"><use xlink:href="{% if pro.icon %}#{{pro.icon}}{% else %}#mrdoc-icon-pro-2{% endif %}"></use></svg>
44+
<svg class="icon" aria-hidden="true">
45+
<use xlink:href="{% if pro.icon and pro.icon != 'None' %}#{{pro.icon}}{% else %}#mrdoc-icon-pro-2{% endif %}"></use>
46+
</svg>
4547
{% else %}
4648
<i class="layui-icon layui-icon-addition"></i>
4749
{% endif %}

template/app_doc/pro_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
style="background: url({% static 'icon_img/viewcode.svg' %}) no-repeat right center;"
141141
{% endif %}
142142
>
143-
{% if p.icon and p.icon != None %}
143+
{% if p.icon and p.icon != 'None' %}
144144
<p class="layui-elip" style="font-weight: 700;">
145145
{% if p.is_top %}<i class="iconfont mrdoc-icon-totop" title="置顶文集" style="color: red;font-size: 12px;"></i>{% endif %}
146146
<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>

0 commit comments

Comments
 (0)