<script setup>
import { useRouter } from "vue-router";
const router = useRouter();
const onKeyDown = (ev) => {
  // 8:Backspace, 27:Escape, 10000:盒子返回键
  if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
    router.go(-1); // 有router时，回退
    return true;
  }
  return false;
}
</script>

<template>
  <jsv-focus-block autoFocus :onKeyDown="onKeyDown"/>
</template>

<style scoped>
</style>