From 0ad42bc89e6a3e1a8ed95cfa3724ee63a92a7429 Mon Sep 17 00:00:00 2001 From: hanaabi-shunyou Date: Thu, 10 Jun 2021 19:29:21 +0800 Subject: [PATCH] =?UTF-8?q?follow=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=98=B5=E7=A7=B0=EF=BC=8C=E5=8E=BB=E6=8E=89=E4=BA=86=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E4=B8=AD=E7=9A=84=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/Nav/Fan.vue | 12 ++++++------ src/component/Nav/Follow.vue | 7 +++++-- src/util/toolbar.js | 31 +++++++++++++++++++++++++++++++ src/view/post/Create.vue | 2 ++ src/view/post/Edit.vue | 2 ++ 5 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 src/util/toolbar.js diff --git a/src/component/Nav/Fan.vue b/src/component/Nav/Fan.vue index 3460632..5499d96 100644 --- a/src/component/Nav/Fan.vue +++ b/src/component/Nav/Fan.vue @@ -7,21 +7,21 @@
- + - {{ item.username }} + {{ item.alias }} + {{ + '@' + item.username + }}
diff --git a/src/component/Nav/Follow.vue b/src/component/Nav/Follow.vue index 3889050..9a6d567 100644 --- a/src/component/Nav/Follow.vue +++ b/src/component/Nav/Follow.vue @@ -15,14 +15,17 @@ - {{ item.username }} + {{ item.alias }} + {{ + '@' + item.username + }}
diff --git a/src/util/toolbar.js b/src/util/toolbar.js new file mode 100644 index 0000000..6c62e13 --- /dev/null +++ b/src/util/toolbar.js @@ -0,0 +1,31 @@ +export default [ + 'emoji', + 'headings', + 'bold', + 'italic', + 'strike', + 'link', + '|', + 'list', + 'ordered-list', + 'check', + 'outdent', + 'indent', + '|', + 'quote', + 'line', + 'code', + 'inline-code', + 'insert-before', + 'insert-after', + '|', + // "upload", + // "record", + 'table', + '|', + 'undo', + 'redo', + '|', + 'fullscreen', + 'edit-mode', +] diff --git a/src/view/post/Create.vue b/src/view/post/Create.vue index 2dbef22..554375a 100644 --- a/src/view/post/Create.vue +++ b/src/view/post/Create.vue @@ -46,6 +46,7 @@ import { createPost } from "@/api/post"; import Vditor from "vditor"; import "vditor/dist/index.css"; +import toolbar from "@/util/toolbar" export default { name: "TopicPost", @@ -104,6 +105,7 @@ export default { style: "monokai", } }, + toolbar }); }, methods: { diff --git a/src/view/post/Edit.vue b/src/view/post/Edit.vue index c0e9fc6..3e02bf4 100644 --- a/src/view/post/Edit.vue +++ b/src/view/post/Edit.vue @@ -44,6 +44,7 @@ import { getPost, updatePost } from "@/api/post"; import Vditor from "vditor"; import "vditor/dist/index.css"; +import toolbar from "@/util/toolbar" export default { name: "TopicEdit", @@ -87,6 +88,7 @@ export default { style: "monokai", }, }, + toolbar, after: () => { this.contentEditor.setValue(content); }, -- Gitee