|
|
@ -768,7 +768,7 @@ export default { |
|
|
let message = this.chatStore.findMessage(chat, msgInfo); |
|
|
let message = this.chatStore.findMessage(chat, msgInfo); |
|
|
if (message) { |
|
|
if (message) { |
|
|
// 直接更新消息对象的content属性 |
|
|
// 直接更新消息对象的content属性 |
|
|
message.content = res; |
|
|
message.content = "原文本:" + message.content + "\n" + "翻译结果:" + res; |
|
|
// 标记需要保存 |
|
|
// 标记需要保存 |
|
|
chat.stored = false; |
|
|
chat.stored = false; |
|
|
this.chatStore.saveToStorage(); |
|
|
this.chatStore.saveToStorage(); |
|
|
@ -1347,7 +1347,7 @@ export default { |
|
|
if (res) { |
|
|
if (res) { |
|
|
// 将翻译结果替换到输入框中 |
|
|
// 将翻译结果替换到输入框中 |
|
|
chatInput.setTextContent(res); |
|
|
chatInput.setTextContent(res); |
|
|
this.$message.success("翻译成功"); |
|
|
this.$message.success("翻译成功111"); |
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(res); |
|
|
this.$message.error(res); |
|
|
} |
|
|
} |
|
|
|