From 64aa7ef1bc0969b33c52850a6b510411a86a28be Mon Sep 17 00:00:00 2001 From: johnniang Date: Wed, 10 Apr 2019 18:53:11 +0800 Subject: [PATCH] Complete post query --- src/views/post/PostList.vue | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index c1bc5921..66554ce8 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -9,10 +9,7 @@ :sm="24" > - + - 已发布 - 草稿箱 - 回收站 + + {{ postStatus[status].text }} + @@ -55,7 +56,7 @@ 查询 - + 移到回收站 - + 永久删除 @@ -182,7 +177,7 @@ export default { components: {}, data() { return { - mdl: {}, + postStatus: postApi.postStatus, // 查询参数 pagination: {}, queryParam: { @@ -248,16 +243,14 @@ export default { options: {}, optionAlertShow: false, categories: [], - postStatus: 0, posts: [], postsLoading: false } }, computed: { formattedPosts() { - const postStatus = postApi.postStatus return this.posts.map(post => { - post.statusProperty = postStatus[post.status] + post.statusProperty = this.postStatus[post.status] return post }) }