naive-ui.

This commit is contained in:
2023-01-17 13:26:36 +08:00
parent 01760b8eaa
commit 947111247e
8 changed files with 134 additions and 126 deletions

View File

@@ -22,14 +22,16 @@ export function buildProblemCodeKey(problemID: string, contestID = "") {
return `${STORAGE_KEY.PROBLEM_CODE}_NaN_${problemID}`
}
export function getTagColor(tag: "Low" | "Mid" | "High") {
return {
export function getTagColor(
tag: "Low" | "Mid" | "High" | "简单" | "中等" | "困难"
) {
return <"success" | "info" | "error">{
Low: "success",
Mid: "",
High: "danger",
Mid: "info",
High: "error",
: "success",
: "",
: "danger",
: "info",
: "error",
}[tag]
}