onLoad() {
this.test()
},
onShow() { },
methods: {
//键盘按键
KeyEventFun(event : UniKeyEvent) {
console.log("------event-------", event.keyCode)
},
test() {
let myPageKeyEle = uni.getElementById("myPageKey")
console.log("------myPageKeyEle-------", myPageKeyEle)
myPageKeyEle?.addEventListener("keydown", this.KeyEventFun)
}
}
1***@qq.com
- 发布:2024-05-16 14:32
- 更新:2024-05-16 14:32
- 阅读:117
0 个回复