<!--
 * @Author: ChenChanghua
 * @Date: 2022-04-20 21:05:26
 * @LastEditors: ChenChanghua
 * @LastEditTime: 2022-07-08 11:16:52
 * @Description: file content
-->
<script setup>
import { ref, reactive, onMounted } from "vue";
import { useRouter } from "vue-router";
import { jJsvRuntimeBridge } from "jsview";
import TestFrame2 from "./TestFrame2.vue";

const UseTestFrame = TestFrame2;

const router = useRouter();

const _onKeyDown = (ev) => {
  if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
    router.go(-1); // 有router时，是从DemoHomepage进入，回退
  }

  return true;
};

onMounted(() => {
  jJsvRuntimeBridge.notifyPageLoaded();
});
</script>

<template>
  <jsv-focus-block
    autoFocus
    :onAction="{
      onKeyDown: _onKeyDown,
    }"
  >
    <UseTestFrame />
  </jsv-focus-block>
</template>

<style scoped></style>
