diff --git a/react-ui/src/pages/ModelDeployment/components/BasicInfo/index.less b/react-ui/src/pages/ModelDeployment/components/BasicInfo/index.less new file mode 100644 index 00000000..0995b6c7 --- /dev/null +++ b/react-ui/src/pages/ModelDeployment/components/BasicInfo/index.less @@ -0,0 +1,6 @@ +.basic-info { + a:hover { + text-decoration: underline @underline-color; + text-underline-offset: 3px; + } +} diff --git a/react-ui/src/pages/ModelDeployment/components/BasicInfo/index.tsx b/react-ui/src/pages/ModelDeployment/components/BasicInfo/index.tsx index e6f62cae..2ade95a0 100644 --- a/react-ui/src/pages/ModelDeployment/components/BasicInfo/index.tsx +++ b/react-ui/src/pages/ModelDeployment/components/BasicInfo/index.tsx @@ -5,6 +5,7 @@ import { formatDate } from '@/utils/date'; import { Link } from '@umijs/max'; import { Col, Row } from 'antd'; import ServiceRunStatusCell from '../ModelDeployStatusCell'; +import styles from './index.less'; type BasicInfoProps = { info?: ServiceVersionData; @@ -15,7 +16,7 @@ function BasicInfo({ info }: BasicInfoProps) { // 格式化环境变量 const formatEnvText = () => { - if (!info?.env_variables) { + if (!info?.env_variables || Object.keys(info.env_variables).length === 0) { return '--'; } const env = info.env_variables; @@ -53,7 +54,7 @@ function BasicInfo({ info }: BasicInfoProps) { }; return ( -