修复:使用web方式加载评论组件避免与pjax同时启用的bug

This commit is contained in:
mjsoftware 2024-03-14 14:58:53 +08:00
parent f135a2ffd4
commit 7a0de6a289
3 changed files with 9 additions and 6 deletions

View File

@ -49,11 +49,12 @@
</div> </div>
<div class="card card-content comment-wrapper-z-index" id="comment-wrapper" th:if="${enableComment}"> <div class="card card-content comment-wrapper-z-index" id="comment-wrapper" th:if="${enableComment}">
<h3 class="comment-title">评论</h3> <h3 class="comment-title">评论</h3>
<halo:comment <comment-widget
group="content.halo.run" group="content.halo.run"
kind="SinglePage" kind="SinglePage"
version="v1alpha1"
th:name="${theme.config.page_config.link_comment_id}" th:name="${theme.config.page_config.link_comment_id}"
/> ></comment-widget>
</div> </div>
</th:block> </th:block>
</th:block> </th:block>

View File

@ -92,10 +92,11 @@
<div class="card card-content comment-wrapper-z-index" id="comment-wrapper" th:if="${enableComment}"> <div class="card card-content comment-wrapper-z-index" id="comment-wrapper" th:if="${enableComment}">
<h3 class="comment-title">评论</h3> <h3 class="comment-title">评论</h3>
<halo:comment <comment-widget
group="content.halo.run" group="content.halo.run"
th:kind="${type}" th:kind="${type}"
version="v1alpha1"
th:name="${post.metadata.name}" th:name="${post.metadata.name}"
/> ></comment-widget>
</div> </div>
</th:block> </th:block>

View File

@ -46,11 +46,12 @@
</div> </div>
</div> </div>
<div class="journal-comment comment-wrapper-z-index" th:if="${enableComment}"> <div class="journal-comment comment-wrapper-z-index" th:if="${enableComment}">
<halo:comment <comment-widget
group="moment.halo.run" group="moment.halo.run"
kind="Moment" kind="Moment"
version="v1alpha1"
th:name="${moment.metadata.name}" th:name="${moment.metadata.name}"
/> ></comment-widget>
</div> </div>
</div> </div>
<th:block th:replace="~{main/pagination :: pagination (${moments}, '/moments')}"/> <th:block th:replace="~{main/pagination :: pagination (${moments}, '/moments')}"/>