修改textinput和textarea的回调函数

This commit is contained in:
浔阳陌客 2024-04-06 14:48:25 +08:00
parent f06c82085e
commit 0e372e9068
2 changed files with 4 additions and 2 deletions

View file

@ -212,7 +212,7 @@ export class SettingUtils {
let textInputElement: HTMLInputElement = document.createElement('input');
textInputElement.className = 'b3-text-field fn__flex-center fn__size200';
textInputElement.value = item.value;
textInputElement.onkeyup = item.action?.callback ?? (() => { });
textInputElement.onchange = item.action?.callback ?? (() => { });
itemElement = textInputElement;
break;
@ -220,7 +220,7 @@ export class SettingUtils {
let textareaElement: HTMLTextAreaElement = document.createElement('textarea');
textareaElement.className = "b3-text-field fn__block";
textareaElement.value = item.value;
textareaElement.onkeyup = item.action?.callback ?? (() => { });
textareaElement.onchange = item.action?.callback ?? (() => { });
itemElement = textareaElement;
break;
case 'number':