Browse Source

Refactor CommentList and PostList.

pull/9/head
ruibaby 6 years ago
parent
commit
31a66723c1
  1. 9
      src/views/comment/CommentList.vue
  2. 16
      src/views/post/PostList.vue

9
src/views/comment/CommentList.vue

@ -20,6 +20,7 @@
<a-select
v-model="queryParam.status"
placeholder="请选择评论状态"
@change="loadComments(isSearch)"
>
<a-select-option
v-for="status in Object.keys(commentStatus)"
@ -50,9 +51,9 @@
</div>
<div class="table-operator">
<a-dropdown>
<a-dropdown v-show="queryParam.status!=null && queryParam.status!=''">
<a-menu slot="overlay">
<a-menu-item key="1">
<a-menu-item key="1" v-if="queryParam.status ==='AUDITING'">
<a
href="javascript:void(0);"
@click="handlePublishMore"
@ -60,7 +61,7 @@
通过
</a>
</a-menu-item>
<a-menu-item key="2">
<a-menu-item key="2" v-if="queryParam.status === 'PUBLISHED' || queryParam.status ==='AUDITING'">
<a
href="javascript:void(0);"
@click="handleRecycleMore"
@ -68,7 +69,7 @@
移到回收站
</a>
</a-menu-item>
<a-menu-item key="3">
<a-menu-item key="3" v-if="queryParam.status === 'RECYCLE'">
<a
href="javascript:void(0);"
@click="handleDeleteMore"

16
src/views/post/PostList.vue

@ -20,6 +20,7 @@
<a-select
v-model="queryParam.status"
placeholder="请选择文章状态"
@change="handleQuery"
>
<a-select-option
v-for="status in Object.keys(postStatus)"
@ -37,6 +38,7 @@
<a-select
v-model="queryParam.categoryId"
placeholder="请选择分类"
@change="handleQuery"
>
<a-select-option
v-for="category in categories"
@ -72,9 +74,17 @@
icon="plus"
>写文章</a-button>
</router-link>
<a-dropdown>
<a-dropdown v-show="queryParam.status!=null && queryParam.status!=''">
<a-menu slot="overlay">
<a-menu-item key="1">
<a-menu-item key="1" v-if="queryParam.status === 'DRAFT'">
<a
href="javascript:void(0);"
@click="handleDeleteMore"
>
<span>发布</span>
</a>
</a-menu-item>
<a-menu-item key="2" v-if="queryParam.status === 'PUBLISHED' || queryParam.status ==='DRAFT'">
<a
href="javascript:void(0);"
@click="handleRecycleMore"
@ -82,7 +92,7 @@
<span>移到回收站</span>
</a>
</a-menu-item>
<a-menu-item key="2">
<a-menu-item key="3" v-if="queryParam.status === 'RECYCLE'">
<a
href="javascript:void(0);"
@click="handleDeleteMore"

Loading…
Cancel
Save