Skip to content

Commit eafbb43

Browse files
committed
修复border显示不全
1 parent c669009 commit eafbb43

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

blog-view/src/components/comment/Comment.vue

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,18 @@
3030
<div class="metadata">
3131
<strong class="date">{{ reply.createTime | dateFormat('YYYY-MM-DD HH:mm') }}</strong>
3232
</div>
33-
<div class="text"><a :href="`#comment-${reply.parentCommentId}`">@{{ reply.parentCommentNickname }}</a><div v-html="reply.content"></div></div>
33+
<div class="text">
34+
<a :href="`#comment-${reply.parentCommentId}`">@{{ reply.parentCommentNickname }}</a>
35+
<div v-html="reply.content"></div>
36+
</div>
3437
<div class="actions">
3538
<el-button size="mini" type="primary" @click="setReply(reply.id)">回复</el-button>
3639
</div>
3740
</div>
3841
<CommentForm v-if="parentCommentId===reply.id"/>
3942
</div>
4043
</div>
44+
<div class="border"></div>
4145
<CommentForm v-if="parentCommentId===comment.id"/>
4246
</div>
4347
</div>
@@ -63,6 +67,20 @@
6367
</script>
6468

6569
<style scoped>
70+
.comments + .border {
71+
position: absolute;
72+
left: 34px;
73+
top: 47px;
74+
bottom: 0;
75+
border-style: solid;
76+
border-width: 0 0 0 1px;
77+
border-color: #e0e0e0;
78+
}
79+
.ui.threaded.comments .comment .comments {
80+
box-shadow: none;
81+
margin-top: -2em;
82+
}
83+
6684
.comment {
6785
padding-right: 2em !important;
6886
padding-left: 1em !important;
@@ -78,11 +96,13 @@
7896
padding: 4px 5px;
7997
}
8098
81-
.anchor {
82-
display: block;
83-
height: 55px;
84-
margin-top: -55px;
85-
visibility: hidden;
99+
.comment > .anchor {
100+
position: absolute;
101+
left: 0;
102+
top: -48px;
103+
}
104+
.comment .comments .comment > .anchor {
105+
top: -55px;
86106
}
87107
88108
.ui.comments .comment .avatar {

blog-view/src/components/comment/CommentForm.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@
170170
</script>
171171

172172
<style>
173+
.form {
174+
background: #fff;
175+
position: relative;
176+
}
177+
173178
.form h3 {
174179
margin: 5px;
175180
font-weight: 500 !important;

0 commit comments

Comments
 (0)