mirror of https://github.com/halo-dev/halo
Fixed add photo error.
parent
7e2bd70794
commit
0e4a4e104f
|
@ -322,10 +322,12 @@ export default {
|
||||||
if (this.photo.id) {
|
if (this.photo.id) {
|
||||||
photoApi.update(this.photo.id, this.photo).then(response => {
|
photoApi.update(this.photo.id, this.photo).then(response => {
|
||||||
this.$message.success('照片更新成功')
|
this.$message.success('照片更新成功')
|
||||||
|
this.loadPhotos()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
photoApi.create(this.photo).then(response => {
|
photoApi.create(this.photo).then(response => {
|
||||||
this.$message.success('照片添加成功')
|
this.$message.success('照片添加成功')
|
||||||
|
this.loadPhotos()
|
||||||
this.photo = response.data.data
|
this.photo = response.data.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue