naive-ui.
This commit is contained in:
@@ -3,7 +3,7 @@ import { TabsPaneContext } from "element-plus"
|
||||
import { SOURCES } from "utils/constants"
|
||||
import { Problem } from "utils/types"
|
||||
import Monaco from "~/shared/Monaco/index.vue"
|
||||
import { useCodeStore } from "oj/store/code"
|
||||
import { code } from "oj/composables/code"
|
||||
|
||||
const SubmitPanel = defineAsyncComponent(() => import("./SubmitPanel.vue"))
|
||||
const TestcasePanel = defineAsyncComponent(() => import("./TestcasePanel.vue"))
|
||||
@@ -14,8 +14,6 @@ interface Props {
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const { code } = useCodeStore()
|
||||
|
||||
code.language = props.problem.languages[0] || "C"
|
||||
code.value = props.problem.template[code.language] || SOURCES[code.language]
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Flag, CloseBold, Select, CopyDocument } from "@element-plus/icons-vue"
|
||||
import copy from "copy-text-to-clipboard"
|
||||
import { useCodeStore } from "oj/store/code"
|
||||
import { code } from "oj/composables/code"
|
||||
import { SOURCES } from "utils/constants"
|
||||
import { Problem, ProblemStatus } from "utils/types"
|
||||
import { createTestSubmission } from "utils/judge"
|
||||
@@ -33,7 +33,6 @@ const samples = ref<Sample[]>(
|
||||
loading: false,
|
||||
}))
|
||||
)
|
||||
const { code } = useCodeStore()
|
||||
|
||||
const disabled = computed(
|
||||
() =>
|
||||
|
||||
@@ -5,12 +5,11 @@ import { SOURCES, JUDGE_STATUS, SubmissionStatus } from "utils/constants"
|
||||
import { submissionMemoryFormat, submissionTimeFormat } from "utils/functions"
|
||||
import { Problem, Submission, SubmitCodePayload } from "utils/types"
|
||||
import { getSubmission, submitCode } from "oj/api"
|
||||
import { useCodeStore } from "oj/store/code"
|
||||
import { code } from "oj/composables/code"
|
||||
|
||||
import SubmissionResultTag from "../../components/SubmissionResultTag.vue"
|
||||
|
||||
const problem = inject<Ref<Problem>>("problem")
|
||||
const { code } = useCodeStore()
|
||||
|
||||
const route = useRoute()
|
||||
const contestID = <string>route.params.contestID ?? ""
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { createTestSubmission } from "utils/judge"
|
||||
import { useCodeStore } from "oj/store/code"
|
||||
import { code } from "oj/composables/code"
|
||||
|
||||
const input = ref("")
|
||||
const result = ref("")
|
||||
const { code } = useCodeStore()
|
||||
|
||||
async function submit() {
|
||||
const res = await createTestSubmission(code, input.value)
|
||||
|
||||
Reference in New Issue
Block a user