From 079eac87dca57a9a503eabb90ba50b76d46949fd Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Thu, 10 Oct 2024 16:47:31 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=9C=8D=E5=8A=A1=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=93=BE=E6=8E=A5=E6=B7=BB=E5=8A=A0=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/ModelDeployment/components/BasicInfo/index.less | 6 ++++++ .../pages/ModelDeployment/components/BasicInfo/index.tsx | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 react-ui/src/pages/ModelDeployment/components/BasicInfo/index.less 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 ( -
+