add problem.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, reactive, watch, VueElement } from "vue"
|
||||
import { onMounted, ref, reactive, watch } from "vue"
|
||||
import { useRoute, useRouter } from "vue-router"
|
||||
import { useUserStore } from "../../shared/stores/user"
|
||||
import { filterEmptyValue } from "../../utils/functions"
|
||||
import { getTagColor } from "../../utils/constants"
|
||||
import { getProblemList, getProblemTagList, getRandomProblemID } from "../api"
|
||||
|
||||
const difficultyOptions = [
|
||||
@@ -27,14 +28,6 @@ const query = reactive({
|
||||
limit: parseInt(<string>route.query.limit) || 10,
|
||||
})
|
||||
|
||||
function getTagColor(tag: string) {
|
||||
return {
|
||||
简单: "success",
|
||||
中等: "",
|
||||
困难: "danger",
|
||||
}[tag]
|
||||
}
|
||||
|
||||
async function listTags() {
|
||||
const res = await getProblemTagList()
|
||||
tags.value = res.data
|
||||
|
||||
Reference in New Issue
Block a user