Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Commit

Permalink
fix: category filter _id
Browse files Browse the repository at this point in the history
  • Loading branch information
Innei committed Feb 14, 2021
1 parent 4a1839f commit 35f6f27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/ManagePost/ListPosts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ export default {
data = data
.map((c) => {
return c.category.children.map((ch) => ({
...omit(c.category, ['children', 'id', '_id']),
...ch,
categoryId: c.category._id,
...omit(c.category, 'children'),
}))
})
.sort((a, b) => new Date(a).getTime() - new Date(b).getTime())
.flat()
// console.log(data)
this.data = data
this.isFilter = true
},
Expand Down

0 comments on commit 35f6f27

Please sign in to comment.