✨ Challenge Submit
This commit is contained in:
21
application/components/problem/preview/program.vue
Normal file
21
application/components/problem/preview/program.vue
Normal 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>
|
Reference in New Issue
Block a user