mirror of
https://github.com/Physton/sd-webui-prompt-all-in-one.git
synced 2026-01-26 19:29:56 +00:00
Modify the batch translation button to stop translation when clicked during translation
Former-commit-id: d1306b98c99fb1ddc93e230cf0370ef8398c39f1
This commit is contained in:
@@ -1 +1 @@
|
||||
9c068d1d470911810bea124edae4ce5372f70370
|
||||
f4a9a373b9d941a4f46b8f50c890dbe637bc9afe
|
||||
@@ -1 +1 @@
|
||||
29cf5f5b8e25714298cade003f51f052e1d6ef7f
|
||||
9aa6f92e1d185e959f8591b0372989a7c6ec0300
|
||||
@@ -178,6 +178,12 @@ export default {
|
||||
}
|
||||
for (const index in texts) {
|
||||
const text = texts[index]
|
||||
if (this.cancelMultiTranslate) {
|
||||
// 如果取消了翻译,跳过
|
||||
callback(this._translateRes(true, '', text, '', from_lang, to_lang, translateApi, translateApiConfig), index)
|
||||
completeFunc()
|
||||
continue
|
||||
}
|
||||
this.translate(text, from_lang, to_lang, translateApi, translateApiConfig).then(res => {
|
||||
callback(res, index)
|
||||
completeFunc()
|
||||
|
||||
Reference in New Issue
Block a user