Skip to content

Commit

Permalink
修改代码逻辑错误
Browse files Browse the repository at this point in the history
  • Loading branch information
HcGys committed May 24, 2024
1 parent 3646b6b commit 6c28fcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/client/view/components/TkComment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export default {
}
},
showContentExpandIfNeed () {
this.hasContentExpand = this.$refs['tk-content'].scrollHeight > 500
this.hasContentExpand = this.hasContentExpand || this.$refs['tk-content'].scrollHeight > 500 // 如果已经折叠就不再判断 主要是为了防止图片在onload之前就已经折叠而导致图片在onload之后取消折叠
},
showContentExpandIfNeedAfterImagesLoaded () {
this.$refs['tk-content'].querySelectorAll('img').forEach((imgEl) => {
Expand Down Expand Up @@ -334,7 +334,7 @@ export default {
handler: function (highlight) {
if (highlight === 'true') {
this.$nextTick(() => {
renderCode(this.$refs.comment, this.config.HIGHLIGHT_THEME, this.serverConfig.HIGHLIGHT_PLUGIN)
renderCode(this.$refs.comment, this.config.HIGHLIGHT_THEME, this.config.HIGHLIGHT_PLUGIN)
})
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/client/view/components/TkSubmit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default {
renderLinks(this.$refs['comment-preview'])
renderMath(this.$refs['comment-preview'], this.$twikoo.katex)
if (this.config.HIGHLIGHT === 'true') {
renderCode(this.$refs['comment-preview'], this.config.HIGHLIGHT_THEME, this.serverConfig.HIGHLIGHT_PLUGIN)
renderCode(this.$refs['comment-preview'], this.config.HIGHLIGHT_THEME, this.config.HIGHLIGHT_PLUGIN)
}
})
}
Expand Down

0 comments on commit 6c28fcc

Please sign in to comment.