From 09ee7ebe5bfc0175b3fe07996cb2bca7ff93fa2e Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Tue, 29 Oct 2024 15:53:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A8=A1=E5=9E=8B=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=95=B0=E6=8D=AE=E9=9B=86=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=9C=81=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/src/components/BasicTableInfo/index.less | 2 +- .../Dataset/components/ResourceInfo/index.less | 2 +- .../Dataset/components/ResourceIntro/index.less | 13 ++++++++++++- .../Dataset/components/ResourceIntro/index.tsx | 7 ++++++- .../Dataset/components/ResourceVersion/index.less | 2 +- .../Model/components/ModelEvolution/index.less | 2 +- .../pages/Model/components/ModelMetrics/index.less | 2 +- .../components/VersionCompareModal/index.less | 5 ++++- react-ui/src/styles/theme.less | 9 ++++++--- react-ui/src/utils/ui.tsx | 4 +--- 10 files changed, 34 insertions(+), 14 deletions(-) diff --git a/react-ui/src/components/BasicTableInfo/index.less b/react-ui/src/components/BasicTableInfo/index.less index 314b05ca..850af79c 100644 --- a/react-ui/src/components/BasicTableInfo/index.less +++ b/react-ui/src/components/BasicTableInfo/index.less @@ -27,7 +27,7 @@ display: flex; flex: 1; flex-direction: column; - align-items: flex-start; + align-items: stretch; min-width: 0; } diff --git a/react-ui/src/pages/Dataset/components/ResourceInfo/index.less b/react-ui/src/pages/Dataset/components/ResourceInfo/index.less index 8cbba3d6..91eec995 100644 --- a/react-ui/src/pages/Dataset/components/ResourceInfo/index.less +++ b/react-ui/src/pages/Dataset/components/ResourceInfo/index.less @@ -50,7 +50,7 @@ height: 100%; .ant-tabs-nav-wrap { padding-top: 8px; - padding-left: 30px; + padding-left: @content-padding; background-color: white; border-radius: 10px 10px 0 0; } diff --git a/react-ui/src/pages/Dataset/components/ResourceIntro/index.less b/react-ui/src/pages/Dataset/components/ResourceIntro/index.less index 6ac9223b..28f0d976 100644 --- a/react-ui/src/pages/Dataset/components/ResourceIntro/index.less +++ b/react-ui/src/pages/Dataset/components/ResourceIntro/index.less @@ -2,7 +2,7 @@ width: 100%; &__top { - padding: 20px 30px; + padding: 20px @content-padding; background: white; border-radius: 0 0 10px 10px; box-shadow: 0px 2px 12px rgba(180, 182, 191, 0.09); @@ -22,4 +22,15 @@ font-size: @font-size; } } + + &--dataset { + height: 100%; + background-color: white; + border-radius: 0 0 10px 10px; + } + + &--dataset &__top { + border-radius: 0; + box-shadow: none; + } } diff --git a/react-ui/src/pages/Dataset/components/ResourceIntro/index.tsx b/react-ui/src/pages/Dataset/components/ResourceIntro/index.tsx index 0aa3b7e3..e30dfa5d 100644 --- a/react-ui/src/pages/Dataset/components/ResourceIntro/index.tsx +++ b/react-ui/src/pages/Dataset/components/ResourceIntro/index.tsx @@ -12,6 +12,7 @@ import { } from '@/pages/Dataset/config'; import ModelMetrics from '@/pages/Model/components/ModelMetrics'; import { getGitUrl } from '@/utils'; +import classNames from 'classnames'; import styles from './index.less'; type ResourceIntroProps = { @@ -206,7 +207,11 @@ function ResourceIntro({ : getModelDatas(info as ModelData); return ( -
+
{ const { pathname, search } = location; const urlParams = new URLSearchParams(); urlParams.append('redirect', pathname + search); - const newSearch = toHome && pathname !== '/' ? '' : urlParams.toString(); - // console.log('pathname', pathname); - // console.log('search', search); + const newSearch = toHome || pathname === '/' ? '' : urlParams.toString(); if (pathname !== PageEnum.LOGIN) { closeAllModals(); removeAllPageCacheState();