From a28b3e9a9af84bd41ca9686988af2eab8fde2a48 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sat, 20 Apr 2019 16:02:27 +0800 Subject: [PATCH] Support post thumb select. --- src/views/post/PostEdit.vue | 92 +++++++++++-------------------------- src/views/user/Profile.vue | 5 +- 2 files changed, 31 insertions(+), 66 deletions(-) diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index 1bf5fafe..8c249a61 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -1,14 +1,7 @@ @@ -167,6 +124,7 @@ import tagApi from '@/api/tag' import categoryApi from '@/api/category' import postApi from '@/api/post' import AttachmentDrawer from '../attachment/components/AttachmentDrawer' +import AttachmentSelectDrawer from '../attachment/components/AttachmentSelectDrawer' const toolbars = { bold: true, // 粗体 @@ -194,7 +152,8 @@ export default { mavonEditor, CategoryTree, FooterToolBar, - AttachmentDrawer + AttachmentDrawer, + AttachmentSelectDrawer }, mixins: [mixin, mixinDevice], data() { @@ -296,6 +255,9 @@ export default { }, onChildClose() { this.childDrawerVisible = false + }, + selectPostThumb(data) { + this.postToStage.thumbnail = data.path } } } diff --git a/src/views/user/Profile.vue b/src/views/user/Profile.vue index 7b22392b..ebe2e7e0 100644 --- a/src/views/user/Profile.vue +++ b/src/views/user/Profile.vue @@ -9,7 +9,10 @@ prompt text
- +
{{ user.nickname }}