| @@ -27,7 +27,7 @@ | |||||
| display: flex; | display: flex; | ||||
| flex: 1; | flex: 1; | ||||
| flex-direction: column; | flex-direction: column; | ||||
| align-items: flex-start; | |||||
| align-items: stretch; | |||||
| min-width: 0; | min-width: 0; | ||||
| } | } | ||||
| @@ -50,7 +50,7 @@ | |||||
| height: 100%; | height: 100%; | ||||
| .ant-tabs-nav-wrap { | .ant-tabs-nav-wrap { | ||||
| padding-top: 8px; | padding-top: 8px; | ||||
| padding-left: 30px; | |||||
| padding-left: @content-padding; | |||||
| background-color: white; | background-color: white; | ||||
| border-radius: 10px 10px 0 0; | border-radius: 10px 10px 0 0; | ||||
| } | } | ||||
| @@ -2,7 +2,7 @@ | |||||
| width: 100%; | width: 100%; | ||||
| &__top { | &__top { | ||||
| padding: 20px 30px; | |||||
| padding: 20px @content-padding; | |||||
| background: white; | background: white; | ||||
| border-radius: 0 0 10px 10px; | border-radius: 0 0 10px 10px; | ||||
| box-shadow: 0px 2px 12px rgba(180, 182, 191, 0.09); | box-shadow: 0px 2px 12px rgba(180, 182, 191, 0.09); | ||||
| @@ -22,4 +22,15 @@ | |||||
| font-size: @font-size; | font-size: @font-size; | ||||
| } | } | ||||
| } | } | ||||
| &--dataset { | |||||
| height: 100%; | |||||
| background-color: white; | |||||
| border-radius: 0 0 10px 10px; | |||||
| } | |||||
| &--dataset &__top { | |||||
| border-radius: 0; | |||||
| box-shadow: none; | |||||
| } | |||||
| } | } | ||||
| @@ -12,6 +12,7 @@ import { | |||||
| } from '@/pages/Dataset/config'; | } from '@/pages/Dataset/config'; | ||||
| import ModelMetrics from '@/pages/Model/components/ModelMetrics'; | import ModelMetrics from '@/pages/Model/components/ModelMetrics'; | ||||
| import { getGitUrl } from '@/utils'; | import { getGitUrl } from '@/utils'; | ||||
| import classNames from 'classnames'; | |||||
| import styles from './index.less'; | import styles from './index.less'; | ||||
| type ResourceIntroProps = { | type ResourceIntroProps = { | ||||
| @@ -206,7 +207,11 @@ function ResourceIntro({ | |||||
| : getModelDatas(info as ModelData); | : getModelDatas(info as ModelData); | ||||
| return ( | return ( | ||||
| <div className={styles['resource-intro']}> | |||||
| <div | |||||
| className={classNames(styles['resource-intro'], { | |||||
| [styles['resource-intro--dataset']]: resourceType === ResourceType.Dataset, | |||||
| })} | |||||
| > | |||||
| <div className={styles['resource-intro__top']}> | <div className={styles['resource-intro__top']}> | ||||
| <SubAreaTitle | <SubAreaTitle | ||||
| title="基本信息" | title="基本信息" | ||||
| @@ -1,6 +1,6 @@ | |||||
| .resource-version { | .resource-version { | ||||
| min-height: 100%; | min-height: 100%; | ||||
| padding: 20px 30px; | |||||
| padding: 20px @content-padding; | |||||
| color: @text-color; | color: @text-color; | ||||
| font-size: @font-size-content; | font-size: @font-size-content; | ||||
| background: white; | background: white; | ||||
| @@ -1,7 +1,7 @@ | |||||
| .model-evolution { | .model-evolution { | ||||
| width: 100%; | width: 100%; | ||||
| height: 100%; | height: 100%; | ||||
| padding: 0 30px 20px; | |||||
| padding: 0 @content-padding 20px; | |||||
| overflow-x: hidden; | overflow-x: hidden; | ||||
| background: white; | background: white; | ||||
| border-radius: 0 0 10px 10px; | border-radius: 0 0 10px 10px; | ||||
| @@ -1,7 +1,7 @@ | |||||
| .model-metrics { | .model-metrics { | ||||
| &__table { | &__table { | ||||
| margin-top: 10px; | margin-top: 10px; | ||||
| padding: 20px 30px 0; | |||||
| padding: 20px @content-padding 0; | |||||
| background: white; | background: white; | ||||
| border-radius: 10px; | border-radius: 10px; | ||||
| @@ -9,6 +9,7 @@ | |||||
| line-height: 42px; | line-height: 42px; | ||||
| text-align: center; | text-align: center; | ||||
| background: @background; | background: @background; | ||||
| border-radius: 4px 4px 0 0; | |||||
| .singleLine(); | .singleLine(); | ||||
| } | } | ||||
| @@ -16,6 +17,7 @@ | |||||
| margin-bottom: 20px !important; | margin-bottom: 20px !important; | ||||
| color: @text-color-secondary; | color: @text-color-secondary; | ||||
| font-size: 13px; | font-size: 13px; | ||||
| line-height: 22px; | |||||
| word-break: break-all; | word-break: break-all; | ||||
| .singleLine(); | .singleLine(); | ||||
| } | } | ||||
| @@ -54,9 +56,10 @@ | |||||
| flex: none; | flex: none; | ||||
| width: 117px; | width: 117px; | ||||
| padding: 0 15px; | padding: 0 15px; | ||||
| background: white; | |||||
| background: rgba(255, 255, 255, 0.1); | |||||
| border: 1px solid .addAlpha(@primary-color, 0.2) []; | border: 1px solid .addAlpha(@primary-color, 0.2) []; | ||||
| border-radius: 4px; | border-radius: 4px; | ||||
| box-shadow: 0px 3px 6px .addAlpha(@primary-color, 0.1) [] inset; | |||||
| &__title { | &__title { | ||||
| margin-bottom: 20px; | margin-bottom: 20px; | ||||
| @@ -38,11 +38,14 @@ | |||||
| ); | ); | ||||
| // 字体大小 | // 字体大小 | ||||
| @font-size-input: 14px; | |||||
| @font-size: 15px; | @font-size: 15px; | ||||
| @font-size-title: 18px; | |||||
| @font-size-content: 16px; | @font-size-content: 16px; | ||||
| @font-size-input: 14px; | |||||
| @font-size-input-lg: 16px; | |||||
| @font-size-input-lg: @font-size-content; | |||||
| @font-size-title: 18px; | |||||
| // padding | |||||
| @content-padding: 25px; | |||||
| // 函数 | // 函数 | ||||
| .addAlpha(@color, @alpha) { | .addAlpha(@color, @alpha) { | ||||
| @@ -75,9 +75,7 @@ export const gotoLoginPage = (toHome: boolean = true) => { | |||||
| const { pathname, search } = location; | const { pathname, search } = location; | ||||
| const urlParams = new URLSearchParams(); | const urlParams = new URLSearchParams(); | ||||
| urlParams.append('redirect', pathname + search); | 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) { | if (pathname !== PageEnum.LOGIN) { | ||||
| closeAllModals(); | closeAllModals(); | ||||
| removeAllPageCacheState(); | removeAllPageCacheState(); | ||||