使用鼠标移动事件触发函数
<iframe
**@mouseover="setFocus()"**
id="iframeUE4"
frameborder="0"
src="路径地址"
></iframe>
再调用内置聚焦函数focus,就解决啦
const setFocus = () => {
document.getElementById('iframeUE4').contentWindow.focus()
}
标签:触发,vue,focus,键盘,嵌入,iframe
From: https://www.cnblogs.com/neseder/p/17010210.html