8000 debug comment css · pycoder404/blog-vue@c22ebce · GitHub
[go: up one dir, main page]

Skip to content

Commit c22ebce

Browse files
committed
debug comment css
1 parent 6376856 commit c22ebce

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

src/views/article/components/ArticleComment.vue

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
:key="comment.id"
99
>
1010
<template #header>
11-
<div class="card-header">
11+
<div class="card-header" id="comment.comment_order">
1212
<!-- todo add isAuthor label -->
13-
<span>
14-
{{ comment.comment_order}}楼 <b>{{comment.author}}</b> @<span>{{comment.created_time}} </span>
13+
<span>
14+
{{ comment.comment_order}}楼 <b>{{comment.author}}</b> @<span>{{comment.created_time}} </span>
1515
</span>
1616

17+
1718
<el-button
1819
type="primary"
1920
text
@@ -109,15 +110,14 @@
109110
if (comment !== undefined) {
110111
let content = ''
111112
this.commentForm.replied_to = comment.comment_order
112-
content = "> 回复 " + comment.comment_order + "楼 @" + comment.author + "\n"
113+
content = "> 回复 " + comment.comment_order + "楼 @" + comment.author
113114
if (quoted) {
114-
content = "<div class='quote-reply'> 引用 " + comment.comment_order + "楼 @" + comment.author + "\n"
115+
content = "> 引用 " + comment.comment_order + "楼 @" + comment.author + "\n\n"
115116
116-
// content = content + ">" + comment.content.split("\n").join("\n>")
117-
content = content + "" + comment.content + "</div>\n\n"
117+
content = content + "<div class='quote-reply'>" + comment.mdcontent + "</div>"
118118
}
119119
120-
this.commentForm.content = content + "\n\n\n"
120+
this.commentForm.content = content + "\n\n"
121121
}
122122
this.$refs.commentEditor.textAreaFocus()
123123
},
@@ -167,21 +167,23 @@
167167
.card-header {
168168
font-size: 1.5ch;
169169
}
170-
p {
171-
margin-top: 5px;
172-
margin-bottom: 5px;
173-
}
170+
174171
.mavon-edtior-custom-comment {
175172
width: 100%;
176173
min-height: 200px;
177174
}
178175
179176
.quote-reply {
180-
background-color: #8f8f87;
177+
background-color: #ccccc9;
181178
padding-left: 20px;
182179
}
183180
184181
182+
blockquote {
183+
padding:0 1em;
184+
color: black;
185+
border-left: 0.25em solid;
186+
}
185187
186188
.comment-status {
187189
text-align: right;

src/views/article/detail.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@
2424
<div class="article-desc">
2525
<span>
2626
@{{articleDetail.created_time }} {{ articleDetail.author }},views:{{articleDetail.views_count}} likes:{{articleDetail.likes_count}} comments:0
27-
<el-button icon="DeleteFilled" type="text"/>
27+
<el-button icon="DeleteFilled" text/>
2828
<router-link
2929
:to="'/article/edit/'+ articleDetail.id"
3030
><el-button
3131
icon="EditPen"
32-
type="text"/>
32+
text
33+
/>
3334
</router-link>
3435
</span>
3536
</div>
@@ -75,7 +76,7 @@
7576
},
7677
7778
created() {
78-
this.articleId = this.$route.params && this.$route.params.id
79+
this.articleId = this.$route.params && Number(this.$route.params.id)
7980
this.fetchData(this.articleId)
8081
// Why need to make a copy of this.$route here?
8182
// Because if you enter this page and quickly switch tag, may be in the execution of the setTagsViewTitle function, this.$route is no longer pointing to the current page

src/views/article/list.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
<div class="article-desc">
1616
<span>
1717
@{{article.created_time }} {{ article.author }}, views:{{article.views_count}} likes:{{article.likes_count}} 7F96 comments:{{article.comments_count}}
18-
<el-button icon="DeleteFilled" type="text"/>
18+
<el-button icon="DeleteFilled" text/>
1919
<router-link
2020
:to="'/article/edit/'+ article.id"
2121
class="article-title"
2222
><el-button
2323
icon="EditPen"
24-
type="text"/>
24+
text
25+
/>
2526
</router-link>
2627
</span>
2728

0 commit comments

Comments
 (0)
0