fix(Field): input composing #7035

This commit is contained in:
chenjiahan
2020-09-18 22:18:15 +08:00
parent cc8b76c86d
commit e7510585ab
2 changed files with 22 additions and 9 deletions
+6
View File
@@ -56,3 +56,9 @@ export function preventDefault(event: Event, isStopPropagation?: boolean) {
stopPropagation(event);
}
}
export function trigger(target: Element, type: string) {
const inputEvent = document.createEvent('HTMLEvents');
inputEvent.initEvent(type, true, true);
target.dispatchEvent(inputEvent);
}