题目页「编辑题目」从只给超管放宽到有权改这道题的人(含学生管理员改自己出的题); 题目、比赛、题单列表加「新建」;自学首页加「自学情况」「管理教程」,课文加「编辑这一课」; 公告加「编辑这条」「发公告」;成就加「管理成就」;智能分析加「AI 报告」,看某个学生时 带着用户名过去直接筛到他。按钮统一走 shared/components/AdminLink.vue。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e7b6e27b85
commit
0ffc405a20
12 files changed
+140
-3
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
import { RouterLink, type RouteLocationRaw } from "vue-router"
|
||||
|
||||
/**
|
||||
* 前台页面上直达后台对应功能的按钮(「编辑这一课」「新建比赛」……),和题单页的
|
||||
* 「编辑题单」、比赛页的「比赛设置」同一种样子。渲染成真的 <a>:老师常要一边看前台
|
||||
* 一边改,中键 / Ctrl 点开新标签页得能用。给谁看由调用方用 v-if 管,要和
|
||||
* routes.ts 里目标路由的 meta 对齐,否则点下去被守卫静默踢回首页。
|
||||
*/
|
||||
withDefaults(defineProps<{ to: RouteLocationRaw; size?: "tiny" | "small" | "medium" }>(), {
|
||||
size: "medium",
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RouterLink v-slot="{ href, navigate }" :to="to" custom>
|
||||
<n-button tag="a" :href="href" :size="size" @click="navigate"><slot /></n-button>
|
||||
</RouterLink>
|
||||
</template>
|
||||
Reference in new issue
Block a user