diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index b20eb3f4..2e7713dd 100644 --- a/src/views/post/PostEdit.vue +++ b/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 }) } }) diff --git a/src/views/post/components/CategoryTree.vue b/src/views/post/components/CategoryTree.vue index 5fa5b2d6..369436c6 100644 --- a/src/views/post/components/CategoryTree.vue +++ b/src/views/post/components/CategoryTree.vue @@ -3,6 +3,7 @@ checkable :treeData="categoryTree" :defaultExpandAll="true" + :checkedKeys="categoryIds" @check="onCheck" >