Skip to content

diary 主题兼容问题 #168

Answered by lizheming
tsq456 asked this question in Q&A
Discussion options

You must be logged in to vote

https://github.com/tsq456/aTuGo/blob/master/aTuGo/themes/diary/layouts/partials/journal.html
我看了下应该就是主题的兼容性问题了,这个主题整体用了一层 Vue 框架重新渲染了页面,而 Waline 和 Twikoo 都是使用 React/Vue 这种前端框架渲染的,外部重新监听 DOM 会导致渲染发生异常。
解决的办法有两种,要么是将主题的 Vue 渲染去除掉使用原生 JS 处理。要么就是把评论的 HTML 放在 <div id="app"> 外面,这样就不会有冲突的问题了。有能力的话我建议选择前者处理一下,看了下代码似乎没必要大费周章的用 Vue 去做处理。

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Mister-Hope
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #167 on March 12, 2021 12:02.