Fix category ids and tag ids initialization bug

pull/9/head
johnniang 2019-04-12 13:29:49 +08:00
parent 1a25c41d1d
commit d30a5b5ca1
2 changed files with 5 additions and 1 deletions

View File

@ -221,7 +221,10 @@ export default {
next(vm => { next(vm => {
if (postId) { if (postId) {
postApi.get(postId).then(response => { 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
}) })
} }
}) })

View File

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