Challenge Submit

This commit is contained in:
2023-12-13 21:18:14 +08:00
parent ffa7f097af
commit 961508449f
8 changed files with 161 additions and 13 deletions

View File

@ -0,0 +1,21 @@
<template>
<n-card>
<n-code :hljs="hljs" :language="language" :code="props.answers?.code" />
</n-card>
</template>
<script setup lang="ts">
import { NCard, NCode } from "naive-ui";
import hljs from "highlight.js/lib/core";
import cpp from "highlight.js/lib/languages/cpp";
hljs.registerLanguage("cpp", cpp);
const props = defineProps<{
challenge: any,
problem: any,
answers: any,
}>();
const language = computed(() => props.answers?.language ?? "text");
</script>