diff --git a/web/pages/dataset-create.html b/web/pages/dataset-create.html index 9c9dac1..add4072 100644 --- a/web/pages/dataset-create.html +++ b/web/pages/dataset-create.html @@ -92,9 +92,9 @@ 模型评测 - + - 模型部署 + 模型对比 @@ -448,6 +448,15 @@ // 初始化单选框选中样式 initRadioStyles(); + + // 设置侧边栏当前页高亮 + const currentPage = 'dataset-manage'; + document.querySelectorAll('.nav-link').forEach(link => { + if (link.dataset.page === currentPage) { + link.classList.add('active'); + link.classList.remove('hover:bg-[#001529]/20', 'transition-colors'); + } + }); }); // 加载数据集数据(编辑模式) diff --git a/web/pages/fine-tune-create.html b/web/pages/fine-tune-create.html index 8971239..8e8f1ca 100644 --- a/web/pages/fine-tune-create.html +++ b/web/pages/fine-tune-create.html @@ -94,9 +94,9 @@ 模型评测 - + - 模型部署 + 模型对比 @@ -589,6 +589,15 @@ // 初始化训练方法参数显示 toggleTrainMethod(); + // 设置侧边栏当前页高亮 + const currentPage = 'fine-tune'; + document.querySelectorAll('.nav-link').forEach(link => { + if (link.dataset.page === currentPage) { + link.classList.add('active'); + link.classList.remove('hover:bg-[#001529]/20', 'transition-colors'); + } + }); + // 绑定导航点击事件 document.querySelectorAll('.nav-link').forEach(link => { link.addEventListener('click', function(e) { diff --git a/web/pages/model-compare-create.html b/web/pages/model-compare-create.html index 8904fca..0b9958c 100644 --- a/web/pages/model-compare-create.html +++ b/web/pages/model-compare-create.html @@ -522,6 +522,15 @@ // 加载模型列表 loadModels(); + + // 设置侧边栏当前页高亮 + const currentPage = 'model-compare'; + document.querySelectorAll('.nav-link').forEach(link => { + if (link.dataset.page === currentPage) { + link.classList.add('active'); + link.classList.remove('hover:bg-[#001529]/20', 'transition-colors'); + } + }); }); diff --git a/web/pages/model-eval-create.html b/web/pages/model-eval-create.html index 1b0c60d..e5825e6 100644 --- a/web/pages/model-eval-create.html +++ b/web/pages/model-eval-create.html @@ -98,9 +98,9 @@ 模型评测 - + - 模型部署 + 模型对比 @@ -340,6 +340,15 @@ // 加载模型列表 loadModels(); + // 设置侧边栏当前页高亮 + const currentPage = 'model-eval'; + document.querySelectorAll('.nav-link').forEach(link => { + if (link.dataset.page === currentPage) { + link.classList.add('active'); + link.classList.remove('hover:bg-[#001529]/20', 'transition-colors'); + } + }); + // 绑定导航点击事件 document.querySelectorAll('.nav-link').forEach(link => { link.addEventListener('click', function(e) { diff --git a/web/pages/model-manage-create.html b/web/pages/model-manage-create.html index 7cda7fd..ba5d35c 100644 --- a/web/pages/model-manage-create.html +++ b/web/pages/model-manage-create.html @@ -85,9 +85,9 @@ 模型评测 - + - 模型部署 + 模型对比 @@ -329,6 +329,15 @@ } }); }); + + // 设置侧边栏当前页高亮 + const currentPage = 'model-manage'; + document.querySelectorAll('.nav-link').forEach(link => { + if (link.dataset.page === currentPage) { + link.classList.add('active'); + link.classList.remove('hover:bg-[#001529]/20', 'transition-colors'); + } + }); }); // 加载模型数据(编辑模式)