解决文章编辑时tag回显问题

pull/34/head
guqing 2019-07-07 21:27:50 +08:00
parent e3611a36b2
commit 5cf946a142
1 changed files with 8 additions and 1 deletions

View File

@ -42,7 +42,14 @@ export default {
},
created() {
this.loadTags()
this.selectedTagNames = this.tagIds.map(tagId => this.tagIdMap[tagId].name)
},
watch: {
tags(newValue, oldValue) {
// tags使
if (newValue) {
this.selectedTagNames = this.tagIds.map(tagId => this.tagIdMap[tagId].name)
}
}
},
computed: {
tagIdMap() {