|
@@ -58,7 +58,7 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { clearInspectedTask, getInspectedHistory } from "@/api/inspectPage";
|
|
|
-import { computed, defineComponent, ref } from "vue";
|
|
|
+import { computed, defineComponent, onMounted, ref } from "vue";
|
|
|
import { store } from "./store";
|
|
|
import {
|
|
|
ZoomInOutlined,
|
|
@@ -157,6 +157,13 @@ export default defineComponent({
|
|
|
window.close();
|
|
|
};
|
|
|
|
|
|
+ onMounted(() => {
|
|
|
+ // 不确定是否一定能在关闭页面时调用
|
|
|
+ window.addEventListener("beforeunload", () => {
|
|
|
+ updateClearTask();
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
return {
|
|
|
store,
|
|
|
isSingleStudent,
|