Commit 3b95b111 by caoyanzhi

添加注释

parent 0efa4e69
......@@ -80,6 +80,8 @@ export default {
delTagsGroup(data) {
this.tagsGroupRelation.splice(data.tagsGroupIndex === this.selectedTagsData.length - 1 ? data.tagsGroupIndex - 1 : data.tagsGroupIndex, 1);
this.selectedTagsData.splice(data.tagsGroupIndex, 1);
// 删除一个标签组,会导致之后标签组中标签的level不再等于当前标签组的索引,即level !== index
// 所以这里重置标签的level为index,即tag.level = index
this.selectedTagsData.forEach((group, index) => {
group.forEach(tag => tag.level = index);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment