模拟输入
ts
function input(text: string, element: HTMLInputElement) {
element.value = text;
element.dispatchEvent(new Event("input", { bubbles: true }));
element.dispatchEvent(new Event("change", { bubbles: true }));
}