mirror of https://github.com/halo-dev/halo-admin
Fix category ids and tag ids initialization bug
parent
1a25c41d1d
commit
d30a5b5ca1
|
@ -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
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
checkable
|
checkable
|
||||||
:treeData="categoryTree"
|
:treeData="categoryTree"
|
||||||
:defaultExpandAll="true"
|
:defaultExpandAll="true"
|
||||||
|
:checkedKeys="categoryIds"
|
||||||
@check="onCheck"
|
@check="onCheck"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|
Loading…
Reference in New Issue