<!--
* @Author: wangrui
* @Description: 输入框无法自动弹出键盘
* @Date: 2024-11-28 10:42:10
* @LastEditors: Do not edit
-->
<script setup lang="ts">
import { onMounted} from 'vue';
const callKeyboard = () =>{
const input = document.getElementById("keybord");
if (input) {
input.focus();
}
}
onMounted(() => {
(window as any).callKeyboard = callKeyboard;
});
</script>
<template>
<input id="keybord" type="text"/>
</template>
<style lang="scss" scoped>
#keybord{
position: absolute;
left:-300px;
width:100px;
}
</style>
(window as any).callKeyboard();
field.value.focus();
input框前端ios自动吊起键盘
最新推荐文章于 2024-12-31 14:32:00 发布
663

被折叠的 条评论
为什么被折叠?



