style: tag edit
This commit is contained in:
parent
2b05bf6999
commit
d9cbd2ff94
@ -195,6 +195,11 @@ export default {
|
|||||||
}
|
}
|
||||||
this.hasChange = true
|
this.hasChange = true
|
||||||
this.tags.push({ name: inputValue, color: this.defaultTagColor});
|
this.tags.push({ name: inputValue, color: this.defaultTagColor});
|
||||||
|
// 查看existingTags中是否有相同的标签
|
||||||
|
let index = this.existingTags.findIndex(item => item.name === inputValue)
|
||||||
|
if (index !== -1) {
|
||||||
|
this.existingTags.splice(index, 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.inputVisible = false;
|
this.inputVisible = false;
|
||||||
this.inputValue = '';
|
this.inputValue = '';
|
||||||
@ -222,6 +227,9 @@ export default {
|
|||||||
this.tagDialogVisible = false
|
this.tagDialogVisible = false
|
||||||
this.$emit('update:status', this.tagDialogVisible)
|
this.$emit('update:status', this.tagDialogVisible)
|
||||||
this.isEditMode = false
|
this.isEditMode = false
|
||||||
|
this.inputVisible = false
|
||||||
|
this.inputValue = ''
|
||||||
|
this.tags = []
|
||||||
},
|
},
|
||||||
editMode() {
|
editMode() {
|
||||||
this.isEditMode = !this.isEditMode
|
this.isEditMode = !this.isEditMode
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user