Browse Source

Fix category ids and tag ids initialization bug

pull/9/head
johnniang 6 years ago
parent
commit
d30a5b5ca1
  1. 5
      src/views/post/PostEdit.vue
  2. 1
      src/views/post/components/CategoryTree.vue

5
src/views/post/PostEdit.vue

@ -221,7 +221,10 @@ export default {
next(vm => {
if (postId) {
postApi.get(postId).then(response => {
vm.postToStage = response.data.data
const post = response.data.data
vm.postToStage = post
vm.selectedTagIds = post.tagIds
vm.selectedCategoryIds = post.categoryIds
})
}
})

1
src/views/post/components/CategoryTree.vue

@ -3,6 +3,7 @@
checkable
:treeData="categoryTree"
:defaultExpandAll="true"
:checkedKeys="categoryIds"
@check="onCheck"
>
<span

Loading…
Cancel
Save