Skip to content

Commit

Permalink
问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
a54552239 committed Aug 17, 2019
1 parent 154e9fa commit 59b4636
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/components/project/taskDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1604,12 +1604,15 @@
}
comment += ' ';
const regx = /(@[^@]+) /g;
comment.match(regx).forEach((v) => {
let str = v.substring(1, v.length - 1);
if (this.mentionsList.findIndex(item => item == str) === -1) {
this.mentionsList.push(str);
}
});
const res = comment.match(regx);
if (res) {
res.forEach((v) => {
let str = v.substring(1, v.length - 1);
if (this.mentionsList.findIndex(item => item == str) === -1) {
this.mentionsList.push(str);
}
});
}
createComment(this.code, this.comment, JSON.stringify(this.mentionsList)).then(() => {
this.comment = '';
this.mentionsList = [];
Expand Down

0 comments on commit 59b4636

Please sign in to comment.