Skip to content

Commit ffdbb3b

Browse files
committed
update
1 parent dec87b5 commit ffdbb3b

File tree

9 files changed

+49
-38
lines changed

9 files changed

+49
-38
lines changed

dist/halo-comment.js

Lines changed: 30 additions & 28 deletions
Large diffs are not rendered by default.

dist/halo-comment.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/halo-comment.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/halo-comment.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "halo-comment-alex",
3-
"version": "v1.1.5",
3+
"version": "v1.1.6",
44
"private": false,
55
"scripts": {
66
"serve": "vue-cli-service serve",

src/components/CommentEditor.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,15 @@
216216
import md5 from "md5";
217217
import VEmojiPicker from "./EmojiPicker/VEmojiPicker";
218218
import emojiData from "./EmojiPicker/data/emojis.js";
219-
import {isEmpty, isObject, isQQ, getUrlKey, renderedEmojiHtml, validEmail, queryStringify} from "../utils/util";
219+
import {
220+
isEmpty,
221+
isObject,
222+
isQQ,
223+
getUrlKey,
224+
renderedEmojiHtml,
225+
validEmail,
226+
queryStringify
227+
} from "../utils/util";
220228
import commentApi from "../api/comment";
221229
import axios from "axios";
222230
import autosize from "autosize";
@@ -274,6 +282,7 @@
274282
},
275283
computed: {
276284
renderedContent() {
285+
//要预览的评论内容
277286
let str = this.comment.content ? marked(this.comment.content) : "";
278287
return renderedEmojiHtml(str);
279288
},
@@ -314,7 +323,6 @@
314323
this.comment.author = author ? author : "";
315324
this.comment.authorUrl = authorUrl ? authorUrl : "";
316325
this.comment.email = email ? email : "";
317-
// this.handleGetGithubUser();
318326
},
319327
mounted() {
320328
// autosize(this.$refs.commentTextArea);
@@ -336,6 +344,7 @@
336344
return;
337345
}
338346
347+
//要保存的评论内容
339348
const content = this.comment.content;
340349
341350
// Submit the comment
@@ -373,7 +382,6 @@
373382
if (createdComment.status === "PUBLISHED") {
374383
this.successes.push("评论成功,刷新即可显示最新评论!");
375384
} else {
376-
// Show tips
377385
this.infoes.push("您的评论已经投递至博主,等待博主审核!");
378386
}
379387
},

src/components/CommentNode.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
if (this.comment.parentId !== null && this.comment.parentId > 0) {
153153
at = '<a>@' + this.comment.parentAuthor + '</a>';
154154
}
155+
//要页面展示的评论内容
155156
let str = at + marked(decodeHTML(this.comment.content));
156157
return renderedEmojiHtml(str);
157158
},

src/components/Pagination.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,3 @@
195195
}
196196
};
197197
</script>
198-
199-
<style lang="scss">
200-
</style>

src/utils/util.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ export function getUrlKey(name) {
9595
}
9696

9797
export function decodeHTML(html) {
98+
/**
99+
* 特殊字符转义成HTML标签
100+
*/
98101
var output, elem = document.createElement('div');
99102
elem.innerHTML = html;
100103
output = elem.innerText || elem.textContent;

0 commit comments

Comments
 (0)