Skip to content

页面按键监听

监听全部按键

点击查看源码
js
import {ESKeyEvent} from "@extscreen/es-core";

export default {
    mixins: [ESKeyEvent],
    methods: {
        //按下
        onKeyDown(keyEvent) {
            //TODO 
        },
        //抬起
        onKeyUp(keyEvent) {
            //TODO 
        },
    }
}

监听返回键

点击查看源码
js
import {ESBackPress} from "@extscreen/es-core";

export default {
    mixins: [ESBackPress],
    methods: {
        onBackPressed() {
            //TODO 处理按返回键
        },
    }
}