feat: 外层业务模块问题修复
Before Width: | Height: | Size: 880 KiB After Width: | Height: | Size: 432 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* @Author: donghao donghao@supervision.ltd
|
||||
* @Date: 2024-05-20 15:12:33
|
||||
* @LastEditors: donghao donghao@supervision.ltd
|
||||
* @LastEditTime: 2024-05-20 15:33:18
|
||||
* @FilePath: \general-ai-platform-web\src\hooks\useHomeRoute.tsx
|
||||
* @Description: 外层页面中间方法集合
|
||||
*/
|
||||
import modelListActive from '../../public/icons/modelList_active.png';
|
||||
import modelLisDefault from '../../public/icons/modelList_default.png';
|
||||
import modelRuntimeLibActive from '../../public/icons/modelRuntimeLib_active.png';
|
||||
import modelRuntimeLibDefault from '../../public/icons/modelRuntimeLib_default.png';
|
||||
|
||||
export const useHomeRoute = () => {
|
||||
const fetchMenuIconByRoute = (menuItem, currRoute) => {
|
||||
let currIcon = '';
|
||||
switch (menuItem?.name) {
|
||||
case 'model-index':
|
||||
currIcon = currRoute?.path === menuItem.path ? modelListActive : modelLisDefault;
|
||||
break;
|
||||
case 'model-runtime-lib':
|
||||
currIcon =
|
||||
currRoute?.path === menuItem.path ? modelRuntimeLibActive : modelRuntimeLibDefault;
|
||||
break;
|
||||
}
|
||||
|
||||
return currIcon ? (
|
||||
<img className="w-[14px] mr-[4px]" src={currIcon} />
|
||||
) : (
|
||||
<i className={`iconfont mr-[4px] ${menuItem.menuIcon}`}></i>
|
||||
);
|
||||
};
|
||||
|
||||
return {
|
||||
fetchMenuIconByRoute,
|
||||
};
|
||||
};
|
@ -1,102 +1,101 @@
|
||||
@font-face {
|
||||
font-family: "iconfont";
|
||||
font-family: 'iconfont';
|
||||
/* Project id 4530966 */
|
||||
src: url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff2?t=1715586941725') format('woff2'), url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.woff?t=1715586941725') format('woff'), url('//at.alicdn.com/t/c/font_4530966_zyyfefdavpo.ttf?t=1715586941725') format('truetype');
|
||||
}
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-family: 'iconfont' !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.icon-fuzhi:before {
|
||||
content: "\e719";
|
||||
content: '\e719';
|
||||
}
|
||||
.icon-zip:before {
|
||||
content: "\e71a";
|
||||
content: '\e71a';
|
||||
}
|
||||
.icon-shangchuanwenjian:before {
|
||||
content: "\e718";
|
||||
content: '\e718';
|
||||
}
|
||||
.icon-you:before {
|
||||
content: "\e717";
|
||||
content: '\e717';
|
||||
}
|
||||
.icon-delete:before {
|
||||
content: "\e716";
|
||||
content: '\e716';
|
||||
}
|
||||
.icon-tianjiafenlei:before {
|
||||
content: "\e714";
|
||||
content: '\e714';
|
||||
}
|
||||
.icon-shanchufenlei:before {
|
||||
content: "\e715";
|
||||
content: '\e715';
|
||||
}
|
||||
.icon-tianjiajiedian:before {
|
||||
content: "\e713";
|
||||
content: '\e713';
|
||||
}
|
||||
.icon-banbenxinxi:before {
|
||||
content: "\e711";
|
||||
content: '\e711';
|
||||
}
|
||||
.icon-shiyonghangye:before {
|
||||
content: "\e712";
|
||||
content: '\e712';
|
||||
}
|
||||
.icon-jiedianshezhi:before {
|
||||
content: "\e70f";
|
||||
content: '\e70f';
|
||||
}
|
||||
.icon-fuwuqizhuangtai:before {
|
||||
content: "\e710";
|
||||
content: '\e710';
|
||||
}
|
||||
.icon-yewumoxing:before {
|
||||
content: "\e70b";
|
||||
content: '\e70b';
|
||||
}
|
||||
.icon-shouye:before {
|
||||
content: "\e70c";
|
||||
content: '\e70c';
|
||||
}
|
||||
.icon-shebeizhuangtai:before {
|
||||
content: "\e70d";
|
||||
content: '\e70d';
|
||||
}
|
||||
.icon-qiyexinxi:before {
|
||||
content: "\e70e";
|
||||
content: '\e70e';
|
||||
}
|
||||
.icon-moxingliebiao-unselected:before {
|
||||
content: "\e709";
|
||||
content: '\e709';
|
||||
}
|
||||
.icon-moxingyunhangku-selected:before {
|
||||
content: "\e70a";
|
||||
content: '\e70a';
|
||||
}
|
||||
.icon-wen:before {
|
||||
content: "\e704";
|
||||
content: '\e704';
|
||||
}
|
||||
.icon-xia:before {
|
||||
content: "\e705";
|
||||
content: '\e705';
|
||||
}
|
||||
.icon-moxingliebiao-selected:before {
|
||||
content: "\e706";
|
||||
content: '\e706';
|
||||
}
|
||||
.icon-moxingyunhangku-unselected:before {
|
||||
content: "\e707";
|
||||
content: '\e707';
|
||||
}
|
||||
.icon-close:before {
|
||||
content: "\e708";
|
||||
content: '\e708';
|
||||
}
|
||||
.icon-moxingshuliang:before {
|
||||
content: "\e6fd";
|
||||
content: '\e6fd';
|
||||
}
|
||||
.icon-shebeishuliang:before {
|
||||
content: "\e6fe";
|
||||
content: '\e6fe';
|
||||
}
|
||||
.icon-xinjian:before {
|
||||
content: "\e6ff";
|
||||
content: '\e6ff';
|
||||
}
|
||||
.icon-gengduo:before {
|
||||
content: "\e700";
|
||||
content: '\e700';
|
||||
}
|
||||
.icon-chuangjianshijian:before {
|
||||
content: "\e701";
|
||||
content: '\e701';
|
||||
}
|
||||
.icon-search:before {
|
||||
content: "\e702";
|
||||
content: '\e702';
|
||||
}
|
||||
.icon-refresh:before {
|
||||
content: "\e703";
|
||||
content: '\e703';
|
||||
}
|
||||
|