From 75b5ea43ce1d7f6784396ed0b6e713bdbf279a62 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Fri, 20 Dec 2019 22:06:31 +0800 Subject: [PATCH] feat: support markdown for journal. --- src/components/global.less | 7 ++ .../components/TargetCommentDrawer.vue | 5 +- src/views/dashboard/Dashboard.vue | 4 +- src/views/sheet/internal/JournalList.vue | 68 ++++++------------- src/views/system/components/BackupDrawer.vue | 2 +- .../system/developer/tabs/RuntimeLogs.vue | 2 +- 6 files changed, 36 insertions(+), 52 deletions(-) diff --git a/src/components/global.less b/src/components/global.less index 14014097..b60716e0 100644 --- a/src/components/global.less +++ b/src/components/global.less @@ -874,4 +874,11 @@ body { bottom: 0; left: 0; z-index: 10; +} + +.journal-list-content, +.comment-drawer-content { + img { + width: 100%; + } } \ No newline at end of file diff --git a/src/views/comment/components/TargetCommentDrawer.vue b/src/views/comment/components/TargetCommentDrawer.vue index 101f0bb1..5b01954d 100644 --- a/src/views/comment/components/TargetCommentDrawer.vue +++ b/src/views/comment/components/TargetCommentDrawer.vue @@ -14,7 +14,10 @@ - + +

{{ title }}

diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index 3567a068..89d7dbea 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -203,7 +203,7 @@ @@ -446,7 +446,7 @@ export default { this.$router.push({ name: 'PostEdit', query: { postId: post.id } }) }, handleCreateJournalClick() { - if (!this.journal.content) { + if (!this.journal.sourceContent) { this.$notification['error']({ message: '提示', description: '内容不能为空!' diff --git a/src/views/sheet/internal/JournalList.vue b/src/views/sheet/internal/JournalList.vue index 1cc356a2..19e740a9 100644 --- a/src/views/sheet/internal/JournalList.vue +++ b/src/views/sheet/internal/JournalList.vue @@ -14,7 +14,10 @@ :sm="24" > - +
- + + {{ item.createTime | moment }}