@daysnap/vue-use
Version:
daysnap vue hooks
17 lines (16 loc) • 430 B
JavaScript
export function useComposition() {
const handleCompositionstart = (e) => {
;
e.target.composing = true;
};
const handleCompositionend = (e) => {
var _a;
;
e.target.composing = false;
(_a = e.target) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new InputEvent('input'));
};
return {
handleCompositionstart,
handleCompositionend,
};
}