fix: 修复自定义知识库不能正常访问的问题

This commit is contained in:
chenjinsong
2023-10-27 11:45:58 +08:00
parent 20a4bb22ef
commit 00df0414c2
2 changed files with 16 additions and 11 deletions

View File

@@ -250,15 +250,17 @@ export default {
}
},
colorText () {
const vm = this
return function (color) {
const t = this.knowledgeBaseColor.find(t => t.value === color)
return t ? t.label : this.knowledgeBaseColor[0].label
const t = vm.knowledgeBaseColor.find(t => t.value === color)
return t ? t.label : vm.knowledgeBaseColor[0].label
}
},
colorName () {
const vm = this
return function (color) {
const t = this.knowledgeBaseColor.find(t => t.value === color)
return t ? t.name : this.knowledgeBaseColor[0].name
const t = vm.knowledgeBaseColor.find(t => t.value === color)
return t ? t.name : vm.knowledgeBaseColor[0].name
}
}
}