From 1810e6833c6774b65c173dcc64259ce121be9f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Tue, 31 Oct 2023 16:56:28 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=85=AC=E5=91=8A=E6=94=AF=E6=8C=81mar?= =?UTF-8?q?kdown=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Widgets/MarkDown/index.vue | 83 +++++++++++++++++++-- src/views/settings/Feature/Announcement.vue | 3 + 2 files changed, 80 insertions(+), 6 deletions(-) diff --git a/src/components/Widgets/MarkDown/index.vue b/src/components/Widgets/MarkDown/index.vue index 696677509..fed32a276 100644 --- a/src/components/Widgets/MarkDown/index.vue +++ b/src/components/Widgets/MarkDown/index.vue @@ -1,6 +1,27 @@ @@ -16,21 +37,71 @@ export default { value: { type: String, default: '' + }, + preview: { + type: Boolean, + default: false + }, + rows: { + type: Number, + default: 4 } }, data() { - return {} + return { + span: 12, + isShow: true, + iValue: this.value + } + }, + methods: { + onChange() { + this.$emit('change', this.iValue) + }, + onView() { + this.isShow = !this.isShow + if (this.isShow) { + this.span = 12 + } else { + this.span = 24 + } + } } } diff --git a/src/views/settings/Feature/Announcement.vue b/src/views/settings/Feature/Announcement.vue index f013a6f72..7d04785a8 100644 --- a/src/views/settings/Feature/Announcement.vue +++ b/src/views/settings/Feature/Announcement.vue @@ -7,6 +7,7 @@