feat(competition): 新增比赛活动管理功能模块

实现比赛活动的创建、编辑、详情查看功能,包括基础信息配置、分组管理、题库配置和硬件绑定
添加比赛列表页面的路由跳转逻辑,优化卡片点击交互
完善比赛详情页的编辑状态管理,支持基础信息和题包配置的修改
新增本地SVG图标资源,更新系统Logo组件样式
This commit is contained in:
2026-01-19 18:03:45 +08:00
parent 77315b36ed
commit d13077a3f1
24 changed files with 971 additions and 200 deletions

View File

@ -7,15 +7,15 @@ defineOptions({ name: 'SvgIcon', inheritAttrs: false })
const props = defineProps<Props>()
/**
* Props
* 属性
*
* - Support iconify and local svg icon
* - If icon and localIcon are passed at the same time, localIcon will be rendered first
* - 支持 iconify 和本地 svg 图标
* - 如果同时传递了 icon localIcon,将优先渲染 localIcon
*/
interface Props {
/** Iconify icon name */
/** Iconify 图标名称 */
icon?: string
/** Local svg icon name */
/** 本地 svg 图标名称 */
localIcon?: string
}
@ -26,8 +26,9 @@ const bindAttrs = computed<{ class: string, style: string }>(() => ({
style: (attrs.style as string) || '',
}))
// 本地 svg 图标 id 格式:#icon-local-{icon}
const symbolId = computed(() => {
const { VITE_ICON_LOCAL_PREFIX: prefix } = import.meta.env
const { VITE_ICON_LOCAL_PREFIX: prefix } = import.meta.env // icon-local
const defaultLocalIcon = 'no-icon'
@ -36,17 +37,19 @@ const symbolId = computed(() => {
return `#${prefix}-${icon}`
})
/** If localIcon is passed, render localIcon first */
/** 如果传递了 localIcon,则优先渲染 localIcon */
const renderLocalIcon = computed(() => props.localIcon || !props.icon)
</script>
<template>
<!-- 渲染本地 svg 图标 -->
<template v-if="renderLocalIcon">
<svg aria-hidden="true" width="1em" height="1em" v-bind="bindAttrs">
<use :xlink:href="symbolId" fill="currentColor" />
</svg>
</template>
<template v-else>
<!-- 渲染 iconify 图标 -->
<Icon v-if="icon" :icon="icon" v-bind="bindAttrs" />
</template>
</template>