|
31 | 31 | </el-button>
|
32 | 32 | </div>
|
33 | 33 | </template>
|
34 |
| - <div v-hlcode class="comment-body" v-html="comment.mdcontent"></div> |
| 34 | + <div v-hlcode class="comment-body" v-html="comment.mdcontent"></div> |
35 | 35 | </el-card>
|
36 | 36 | <el-divider></el-divider>
|
37 | 37 | <div>
|
38 | 38 | <el-form ref="commentFormRef" :model="commentForm">
|
39 | 39 | <el-form-item prop="content">
|
40 |
| - <mavon-editor |
41 |
| - ref="commentEditor" |
42 |
| - class="mavon-edtior-custom-comment" |
43 |
| - code-style="vs2015" |
44 |
| - placeholder="发表评论,支持markdown语法" |
45 |
| - :ishljs="true" |
46 |
| - v-model="commentForm.content" |
47 |
| - /> |
| 40 | + <!-- <mavon-editor--> |
| 41 | + <!-- ref="commentEditor"--> |
| 42 | + <!-- class="mavon-edtior-custom-comment"--> |
| 43 | + <!-- code-style="vs2015"--> |
| 44 | + <!-- placeholder="发表评论,支持markdown语法"--> |
| 45 | + <!-- :ishljs="true"--> |
| 46 | + <!-- v-model="commentForm.content"--> |
| 47 | + <!-- />--> |
| 48 | + |
| 49 | + <!--todo tiny editor多个组件是分开加载的比较慢--> |
| 50 | +<!-- <tiny-editor--> |
| 51 | +<!-- api-key="iuykxb7ohtmpw9c8fboekzycycj1zxhqumwjm73lkm1cu2gl"--> |
| 52 | +<!-- :init="{plugins:['wordcount','visualchars']}"--> |
| 53 | +<!-- >--> |
| 54 | +<!-- </tiny-editor>--> |
| 55 | + |
| 56 | +<!-- <tiny-mce></tiny-mce>--> |
| 57 | + |
48 | 58 | </el-form-item>
|
49 | 59 | </el-form>
|
50 | 60 | <div class="comment-status">
|
|
62 | 72 | <script>
|
63 | 73 | import {getCommentList, createComment} from "@/api/comment";
|
64 | 74 | import {mapGetters} from 'vuex'
|
| 75 | + // import TinyEditor from '@tinymce/tinymce-vue' |
| 76 | + // import TinyMce from '@/components/TinyMce' |
65 | 77 |
|
66 | 78 | export default {
|
67 | 79 | name: 'ArticleComment',
|
68 |
| - components: {}, |
| 80 | + components: { |
| 81 | + // TinyEditor: TinyEditor, |
| 82 | + // TinyMce:TinyMce |
| 83 | +
|
| 84 | + }, |
69 | 85 | props: {
|
70 | 86 | articleId: {
|
71 | 87 | type: Number
|
|
112 | 128 | this.commentForm.replied_to = comment.comment_order
|
113 | 129 | content = "> 回复 " + comment.comment_order + "楼 @" + comment.author
|
114 | 130 | if (quoted) {
|
115 |
| - content = "> 引用 " + comment.comment_order + "楼 @" + comment.author + "\n\n" |
| 131 | + content = "> 引用 " + comment.comment_order + "楼 @" + comment.author + "\n\n" |
116 | 132 |
|
117 |
| - content = content + "<div class='quote-reply'>" + comment.mdcontent + "</div>" |
| 133 | + content = content + "<div class='quote-reply'>" + comment.mdcontent + "</div>" |
118 | 134 | }
|
119 | 135 |
|
120 | 136 | this.commentForm.content = content + "\n\n"
|
|
154 | 170 |
|
155 | 171 | .comment-item {
|
156 | 172 | margin-top: 10px;
|
157 |
| - padding:5px; |
| 173 | + padding: 5px; |
158 | 174 |
|
159 | 175 |
|
160 | 176 | }
|
| 177 | +
|
161 | 178 | .comment-body {
|
162 | 179 | padding-left: 30px;
|
163 | 180 | font-size: small;
|
|
180 | 197 |
|
181 | 198 |
|
182 | 199 | blockquote {
|
183 |
| - padding:0 1em; |
| 200 | + padding: 0 1em; |
184 | 201 | color: black;
|
185 | 202 | border-left: 0.25em solid;
|
186 |
| - } |
| 203 | + } |
187 | 204 |
|
188 | 205 | .comment-status {
|
189 | 206 | text-align: right;
|
|
0 commit comments