add monaco editor.

This commit is contained in:
2023-01-04 19:09:40 +08:00
parent 521a602a51
commit 56e28abfa6
6 changed files with 126 additions and 3 deletions

View File

@@ -1,5 +1,34 @@
<script setup lang="ts"></script>
<script setup lang="ts">
import { onMounted } from "vue"
import { useRoute } from "vue-router"
import Editor from "../components/editor.vue"
import { getProblem } from "../api"
<template>problem id</template>
const route = useRoute()
async function init() {
const id = route.params.id as string
const res = await getProblem(id)
console.log(res.data)
}
onMounted(() => {
init()
})
</script>
<template>
<el-row>
<el-col :span="12">
<el-tabs type="border-card">
<el-tab-pane label="题目描述">1</el-tab-pane>
<el-tab-pane label="提交信息">2</el-tab-pane>
</el-tabs>
</el-col>
<el-col :span="12">
<Editor />
</el-col>
</el-row>
</template>
<style scoped></style>