mirror of
https://github.com/Physton/sd-webui-prompt-all-in-one.git
synced 2026-05-01 03:31:41 +00:00
Fix the issue #121
Former-commit-id: 54cd47159d1730376ed79d08d4e11749305fdfca
This commit is contained in:
@@ -1 +1 @@
|
||||
ac9173f92d0d9efb5ad096515c59f1b80e80c7c6
|
||||
adbc0994e8389b296fd143527e38f7c0aaaf1777
|
||||
@@ -1 +1 @@
|
||||
6608d3648d4ae007d02e8de65b1a21a8f6c7de7f
|
||||
f2260bdbdce1f69fc050c59a014dffde4879fe87
|
||||
@@ -1 +1 @@
|
||||
c07839494381a8b93f80adca0cabbfce8a7bc492
|
||||
a0419acb5f80b8b9774051d49ab33a9ef9a776fa
|
||||
@@ -306,11 +306,14 @@ export default {
|
||||
}
|
||||
let indexes = []
|
||||
tags.forEach(tag => {
|
||||
let index = -1
|
||||
if (tag === "\n") {
|
||||
indexes.push(this._appendTag("\n", "\n", false, -1, 'wrap'))
|
||||
index = this._appendTag("\n", "\n", false, -1, 'wrap')
|
||||
} else {
|
||||
indexes.push(this._appendTag(tag))
|
||||
index = this._appendTag(tag)
|
||||
console.log(tag, index)
|
||||
}
|
||||
if (index !== -1) indexes.push(index)
|
||||
})
|
||||
this.updatePrompt() // 先更新再翻译
|
||||
if (this.autoTranslateToEnglish || this.autoTranslateToLocal) {
|
||||
|
||||
@@ -114,6 +114,7 @@ export default {
|
||||
return tag
|
||||
},
|
||||
_appendTag(value, localValue = '', disabled = false, index = -1, type = 'text') {
|
||||
if (value === '') return -1
|
||||
// 唯一数:当前时间戳+随机数
|
||||
const id = Date.now() + (Math.random() * 1000000).toFixed(0)
|
||||
let tag = {
|
||||
|
||||
Reference in New Issue
Block a user