+ 如果本地没有文本信息,就用网络请求

This commit is contained in:
maxmon 2021-06-09 01:00:39 +08:00
parent ee087fee55
commit b4183d74be
1 changed files with 15 additions and 11 deletions

View File

@ -284,6 +284,9 @@ export default {
const hasCache = !!that.nersCache[newFile]
that.$set(that, 'ners', that.nersCache[newFile] ? [...that.nersCache[newFile]] : [])
that.flushWordsType()
if (that.nowText) {
delete window.isLoadingNowText
} else {
get(`/v1/anno/query?projectName=${that.projectName}&fileName=${newFile}`, function (info) {
delete window.isLoadingNowText
// 线
@ -296,6 +299,7 @@ export default {
that.$set(that.textDic, newFile, info.fileContent)
that.nowText = that.textDic[newFile]
})
}
},
changeIdx: function (d) {
const nowIdx = this.files.indexOf(this.nowFile)