From ccebac7a14871e52a5381fb23167d7c1a416ddc1 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 2 Jul 2019 22:26:36 +0800 Subject: [PATCH] Support post settings in post list table. --- src/components/global.less | 11 ++ src/views/interface/ThemeList.vue | 2 - src/views/post/PostEdit.vue | 19 --- src/views/post/PostList.vue | 229 +++++++++++++++++++++++++++++- 4 files changed, 237 insertions(+), 24 deletions(-) diff --git a/src/components/global.less b/src/components/global.less index 1e33d699..929a6ab8 100644 --- a/src/components/global.less +++ b/src/components/global.less @@ -697,4 +697,15 @@ body { p{ margin-bottom: 0; } +} + +.post-thum { + .img { + width: 100%; + cursor: pointer; + border-radius: 4px; + } + .post-thum-remove { + margin-top: 16px; + } } \ No newline at end of file diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index 41df9b6f..d27d4542 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -427,9 +427,7 @@ export default { this.themeConfiguration = response.data.data themeApi.fetchSettings(theme.id).then(response => { this.themeSettings = response.data.data - setTimeout(() => { - this.visible = true this.optionLoading = false }, 300) }) diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index 3eeb5559..baed7cf0 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -199,7 +199,6 @@ import FooterToolBar from '@/components/FooterToolbar' import { mixin, mixinDevice } from '@/utils/mixin.js' import { toolbars } from '@/core/const' import 'mavon-editor/dist/css/index.css' -import tagApi from '@/api/tag' import categoryApi from '@/api/category' import postApi from '@/api/post' import optionApi from '@/api/option' @@ -226,7 +225,6 @@ export default { postSettingVisible: false, thumDrawerVisible: false, categoryForm: false, - tags: [], categories: [], selectedCategoryIds: [], selectedTagIds: [], @@ -238,7 +236,6 @@ export default { } }, created() { - this.loadTags() this.loadCategories() this.loadOptions() clearInterval(this.timer) @@ -273,11 +270,6 @@ export default { }) }, methods: { - loadTags() { - tagApi.listAll(true).then(response => { - this.tags = response.data.data - }) - }, loadCategories() { categoryApi.listAll().then(response => { this.categories = response.data.data @@ -365,15 +357,4 @@ export default { z-index: 1000; min-height: 580px; } - -.post-thum { - .img { - width: 100%; - cursor: pointer; - border-radius: 4px; - } - .post-thum-remove { - margin-top: 16px; - } -} diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index c838e910..b12ba513 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -209,6 +209,13 @@ > 删除 + + + + 设置
@@ -223,12 +230,165 @@
+ + +
+
+

基本设置

+
+ + + + + + + + + + 开启 + 关闭 + + + +
+
+ + +
+

分类目录

+
+ +
+ + + + + + + + + + + + 保存 + 新增 + 取消 + + +
+
+
+ + +
+

标签

+
+ + + + + +
+
+ + +
+

摘要

+
+ + + + + +
+
+ + +
+

缩略图

+
+
+ + 移除 +
+
+
+ +
+ +
+ 保存 +
+