mirror of https://github.com/halo-dev/halo-admin
Fix category tree select bug
parent
4d5d5a5926
commit
4613ecd8d1
|
@ -89,7 +89,7 @@
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="javascript:;"
|
href="javascript:;"
|
||||||
@click="handleEditCategory(record.id)"
|
@click="handleEditCategory(record)"
|
||||||
>编辑</a>
|
>编辑</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
|
@ -179,11 +179,9 @@ export default {
|
||||||
this.formType = 'create'
|
this.formType = 'create'
|
||||||
this.categoryToCreate = {}
|
this.categoryToCreate = {}
|
||||||
},
|
},
|
||||||
handleEditCategory(id) {
|
handleEditCategory(category) {
|
||||||
categoryApi.get(id).then(response => {
|
this.categoryToCreate = category
|
||||||
this.categoryToCreate = response.data.data
|
|
||||||
this.formType = 'update'
|
this.formType = 'update'
|
||||||
})
|
|
||||||
},
|
},
|
||||||
handleDeleteCategory(id) {
|
handleDeleteCategory(id) {
|
||||||
categoryApi.delete(id).then(response => {
|
categoryApi.delete(id).then(response => {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
treeDefaultExpandAll
|
treeDefaultExpandAll
|
||||||
:treeDataSimpleMode="true"
|
:treeDataSimpleMode="true"
|
||||||
:allowClear="true"
|
:allowClear="true"
|
||||||
|
:value="categoryId"
|
||||||
@change="handleSelectionChange"
|
@change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
</a-tree-select>
|
</a-tree-select>
|
||||||
|
|
Loading…
Reference in New Issue