fix: 修复访问过频繁导致标注跑到其他文件的问题

This commit is contained in:
maxmon 2022-04-22 20:03:36 +08:00
parent a7ad14b26d
commit c85261dce7
1 changed files with 11 additions and 5 deletions

View File

@ -340,13 +340,19 @@ export default {
delete window.isLoadingNowText delete window.isLoadingNowText
// 线 // 线
if (!hasCache && info.annoDetails) { if (!hasCache && info.annoDetails) {
that.$set(that, 'ners', info.annoDetails) console.log(newFile, that.nowFile)
that.$set(that.nersCache, that.nowFile, [...that.ners]) if (newFile === that.nowFile) {
that.flushWordsType() that.$set(that, 'ners', info.annoDetails)
that.flushWordsType()
}
//
that.$set(that.nersCache, newFile, info.annoDetails)
} }
// //
that.$set(that.textDic, newFile, info.fileContent) that.$set(that.textDic, newFile, info.fileContent)
that.nowText = that.textDic[newFile] if (newFile === that.nowFile) {
that.nowText = that.textDic[newFile]
}
}) })
} }
if (that.files.indexOf(newFile) >= (that.files.length - 1) - 2) { if (that.files.indexOf(newFile) >= (that.files.length - 1) - 2) {