mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-04 02:50:59 +08:00
Revert "feat: add comment timeline component"
This reverts commit a509099455.
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
...(level > 0 ? { /*borderLeft: '1px solid #e0e0e0', */borderBottom: 'none' } : {})
|
||||
}"
|
||||
>
|
||||
<div class="user-avatar-container" v-if="showAvatar">
|
||||
<div class="user-avatar-container">
|
||||
<div class="user-avatar-item">
|
||||
<img class="user-avatar-item-img" :src="comment.avatar" alt="avatar" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-content">
|
||||
<div class="info-content-header">
|
||||
<div class="user-name">{{ comment.userName }}</div>
|
||||
@@ -45,7 +45,13 @@
|
||||
{{ comment.reply.length }}条回复
|
||||
</div>
|
||||
<div v-if="showReplies" class="reply-list">
|
||||
<CommentTimeline :comments="comment.reply" :level="level + 1" />
|
||||
<CommentItem
|
||||
v-for="r in comment.reply"
|
||||
:key="r.id"
|
||||
:comment="r"
|
||||
:level="level + 1"
|
||||
:default-show-replies="r.openReplies"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,7 +60,6 @@
|
||||
<script>
|
||||
import { ref, watch } from 'vue'
|
||||
import CommentEditor from './CommentEditor.vue'
|
||||
import CommentTimeline from './CommentTimeline.vue'
|
||||
import { renderMarkdown } from '../utils/markdown'
|
||||
import { API_BASE_URL, toast } from '../main'
|
||||
import { getToken } from '../utils/auth'
|
||||
@@ -72,10 +77,6 @@ const CommentItem = {
|
||||
defaultShowReplies: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showAvatar: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
@@ -149,7 +150,7 @@ const CommentItem = {
|
||||
return { showReplies, toggleReplies, showEditor, toggleEditor, submitReply, copyCommentLink, renderMarkdown, isWaitingForReply }
|
||||
}
|
||||
}
|
||||
CommentItem.components = { CommentItem, CommentEditor, CommentTimeline }
|
||||
CommentItem.components = { CommentItem, CommentEditor }
|
||||
export default CommentItem
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user