mirror of https://github.com/halo-dev/halo-admin
解决文章编辑时tag回显问题
parent
e3611a36b2
commit
5cf946a142
|
@ -42,7 +42,14 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.loadTags()
|
||||
},
|
||||
watch: {
|
||||
tags(newValue, oldValue) {
|
||||
// 解决tags未赋上值就使用导致的取值报错问题
|
||||
if (newValue) {
|
||||
this.selectedTagNames = this.tagIds.map(tagId => this.tagIdMap[tagId].name)
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tagIdMap() {
|
||||
|
|
Loading…
Reference in New Issue