this.inputValue
This commit is contained in:
parent
378ba46ef8
commit
bd1a9ad617
1 changed files with 3 additions and 3 deletions
|
@ -146,7 +146,6 @@ export default defineComponent({
|
|||
|
||||
caption: async () => {
|
||||
const img = document.getElementById('imgtocaption');
|
||||
const textarea = document.getElementById("captioninput");
|
||||
await worker.load();
|
||||
await worker.loadLanguage('eng');
|
||||
await worker.initialize('eng', OEM.LSTM_ONLY);
|
||||
|
@ -154,8 +153,9 @@ export default defineComponent({
|
|||
tessedit_pageseg_mode: PSM.SINGLE_BLOCK,
|
||||
});
|
||||
const { data: { text } } = await worker.recognize(img);
|
||||
const allowedLength = 512 - textarea.value.length;
|
||||
textarea.value += text.slice(0, allowedLength);
|
||||
console.log(text);
|
||||
const allowedLength = 512 - this.inputValue.length;
|
||||
this.inputValue += text.slice(0, allowedLength);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue