diff --git a/src/admin/problem/detail.vue b/src/admin/problem/detail.vue index d914f7d..ef402b1 100644 --- a/src/admin/problem/detail.vue +++ b/src/admin/problem/detail.vue @@ -510,7 +510,7 @@ watch( - + @@ -146,7 +146,7 @@ function rowProps(row: Contest) { - - diff --git a/src/oj/problem/components/Form.vue b/src/oj/problem/components/Form.vue index 6fd831a..70d362e 100644 --- a/src/oj/problem/components/Form.vue +++ b/src/oj/problem/components/Form.vue @@ -10,6 +10,7 @@ import storage from "~/utils/storage" import { LANGUAGE } from "~/utils/types" import Submit from "./Submit.vue" import StatisticsPanel from "~/shared/components/StatisticsPanel.vue" +import {Icon} from "@iconify/vue" interface Props { storageKey: string @@ -144,8 +145,10 @@ function showStatisticsPanel() { 操作 - - 编辑 + + diff --git a/src/oj/problem/components/ProblemInfo.vue b/src/oj/problem/components/ProblemInfo.vue index d789e38..ce42269 100644 --- a/src/oj/problem/components/ProblemInfo.vue +++ b/src/oj/problem/components/ProblemInfo.vue @@ -109,7 +109,7 @@ onMounted(getBeatRate) - +
import { Icon } from "@iconify/vue" -defineEmits(["click", "search"]) +interface Props { + type: "题目" | "用户" + username?: string +} + +const props = defineProps() + +const emits = defineEmits(["click", "search", "filterClass"]) + +const showFilterClass = computed(() => { + return props.type === "用户" && props.username?.startsWith("ks") +}) + +function filterClass() { + const match = props.username!.match(/^ks\d{3,4}/) + const classname = match ? match[0] : "" + if (!classname) return + emits("filterClass", classname) +}