From a0c091ee7656e8277916711c3afedfed18df3883 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Thu, 4 May 2023 21:56:15 +0800 Subject: [PATCH] testcat. --- src/oj/problem/components/Form.vue | 28 +++------- src/oj/problem/components/TestCat.vue | 46 +++++++++++++++++ src/play/index.vue | 73 --------------------------- src/routes.ts | 5 -- src/shared/CodeEditor.vue | 7 ++- src/shared/Header.vue | 9 ---- 6 files changed, 58 insertions(+), 110 deletions(-) create mode 100644 src/oj/problem/components/TestCat.vue delete mode 100644 src/play/index.vue diff --git a/src/oj/problem/components/Form.vue b/src/oj/problem/components/Form.vue index f42d8cd..2a2699d 100644 --- a/src/oj/problem/components/Form.vue +++ b/src/oj/problem/components/Form.vue @@ -5,6 +5,7 @@ import { problem } from "oj/composables/problem" import { isDesktop, isMobile } from "~/shared/composables/breakpoints" import { useUserStore } from "~/shared/store/user" import Submit from "./Submit.vue" +import TestCat from "./TestCat.vue" import storage from "~/utils/storage" import { STORAGE_KEY } from "utils/constants" import { LANGUAGE } from "~/utils/types" @@ -24,20 +25,14 @@ function goSubmissions() { router.push({ name, query: { problem: problem.value!._id } }) } -function goTestCat() { - const data = router.resolve({ name: "play" }) - window.open(data.href, "_blank") -} +function goTestCat() {} function goEdit() { const data = router.resolve("/admin/problem/edit/" + problem.value!.id) window.open(data.href, "_blank") } -const menu: DropdownOption[] = [ - { label: "提交信息", key: "submissions" }, - { label: "自测猫", key: "testcat" }, -] +const menu: DropdownOption[] = [{ label: "提交信息", key: "submissions" }] const options: DropdownOption[] = problem.value!.languages.map((it) => ({ label: () => [ @@ -60,9 +55,6 @@ function select(key: string) { case "submissions": goSubmissions() break - case "testcat": - goTestCat() - break } } @@ -73,7 +65,7 @@ function changeLanguage(v: LANGUAGE) {