添加文档注释,方便生成技术文档

This commit is contained in:
wzy-warehouse
2026-04-13 22:28:56 +08:00
parent 8ef7d36d26
commit 27fba7ce12
34 changed files with 520 additions and 160 deletions
+12 -1
View File
@@ -1,8 +1,15 @@
import { useRoute } from 'vue-router';
/**
* 首页导航相关钩子函数
* @returns 顶部导航映射和激活状态判断函数
*/
export const useIndex = () => {
const route = useRoute();
/**
* 顶部导航映射配置
*/
const topNavMap = [
{ title: '暴雨灾害链', name: 'rainstorm', query: { identification: 1 } },
{ title: '地震灾害链', name: 'earthquake', query: { identification: 2 } },
@@ -12,7 +19,11 @@ export const useIndex = () => {
{ title: '文件管理', name: 'index', query: { identification: 6 } },
];
// 判断当前导航项是否激活
/**
* 判断当前导航项是否激活
* @param identification - 导航项标识
* @returns 是否为激活状态
*/
const isActive = (identification: number) => {
const targetId = identification.toString();
let currentId = route.query.identification;