export default {
  mounted(el, binding) {
    const disabledComponents = binding.value;
    // 添加聚焦事件监听器
    // el.addEventListener('focusin', () => {
    //   if (disabledComponents.includes('disableKeyboard')) {
    //     // 键盘显示后立即隐藏
    //     setTimeout(() => {
    //       const keyboardElement = document.querySelector('.virtualkeyboard'); // 根据实际类名修改
    //       if (keyboardElement) {
    //         keyboardElement.style.display = 'none';
    //       }
    //     }); // 设置一个短暂的延时
    //   }
    // });
    el.addEventListener('click', () => {
      if (disabledComponents.includes('disableKeyboard')) {
        // 键盘显示后立即隐藏
        setTimeout(() => {
          const keyboardElement = document.querySelector('.virtualkeyboard'); // 根据实际类名修改
          if (keyboardElement) {
            keyboardElement.style.display = 'none';
          }
        }); // 设置一个短暂的延时
      }
    });
  }
};
