处理一个小问题

This commit is contained in:
mnjnhuang 2026-01-15 02:02:49 +08:00
parent 749e1d94c2
commit 8ca4a424f8
3 changed files with 9 additions and 5 deletions

View File

@ -12,7 +12,9 @@ Web版本的标签管理工具:
接下来的图片将教会你如何使用这个工具, 祝大家使用愉快,
附上 demo 地址 http://113.46.142.74:12224/#/dist
附上 demo 地址
机器翻译 => http://113.46.142.74:12224/#/dist
AI翻译(在机器翻译的基础上重做了大部分内容, 且准确度比机器翻译更高) => http://113.46.142.74:12224/#/dist1
![教程1](tutorial01.png)

View File

@ -18,7 +18,7 @@ class TencentCloud(TranslateParent):
use_model = "hunyuan-translation"
rebuild_text = ""
rebuild_list = []
use_field = "AI/SD generated image prompt. Help me analyze the meaning of each word, Do not change the comma"
use_field = "AI/SD generated image prompt"
for one_prompt in goto_translate_map.keys():
rebuild_list.append(one_prompt)
rebuild_text += f"{one_prompt}, "
@ -40,7 +40,7 @@ class TencentCloud(TranslateParent):
choices = resp.Choices[0]
translate_context = choices.Message.Content
if translate_context[-1] == "" or translate_context[-1 == '.']:
translate_context = translate_context[:-1].replace("", ",")
translate_context = translate_context[:-1].replace("", ",").replace("", ",")
translate_prompt_list: list = translate_context.split(",")
translate_prompt_list = [i.strip() for i in translate_prompt_list]
except TencentCloudSDKException as err:

View File

@ -78,10 +78,10 @@
</strong>
</template>
<template #translate="{ row }">
<Text :delete="!row.active">{{ row.translate }}</Text>
<Text :delete="!row.active">{{ row.translate }}</Text>
</template>
<template #translate_from="{ row }">
<Text :delete="!row.active">{{ row.translate_model }}</Text>
<Text :delete="!row.active">{{ row.translate_model }}</Text>
</template>
<template #action="{ row, index }">
<template v-if="row.active === true ">
@ -161,6 +161,8 @@ export default {
})
},
on_click_check_out() {
this.readonly_result_text = '';
this.readonly_result_text_translate = '';
for (let i = 0; i < this.translate_data.length; i++) {
if (this.translate_data[i].active) {
this.readonly_result_text += this.translate_data[i].source + ',';