fix: 虚拟键盘多次监听

This commit is contained in:
unanmed 2024-10-06 21:14:18 +08:00
parent 787fc7e837
commit def189e5bc

View File

@ -446,7 +446,7 @@ export function getVitualKeyOnce(
const key = Keyboard.get('full')!;
key.withAssist(assist);
const id = mainUi.open('virtualKey', { keyboard: key });
key.on('emit', (item, assist, index, ev) => {
key.once('emit', (item, assist, index, ev) => {
ev.preventDefault();
if (emitAssist) {
if (emittable.length === 0 || emittable.includes(item.key)) {