Browse Source

fix: Typography.Paragraph 样式

pull/195/head
cp3hnu 7 months ago
parent
commit
56fc11d7e4
7 changed files with 22 additions and 10 deletions
  1. +1
    -1
      .gitignore
  2. +3
    -0
      react-ui/Dockerfile
  3. +1
    -1
      react-ui/package.json
  4. +5
    -0
      react-ui/src/global.less
  5. +0
    -5
      react-ui/src/overrides.less
  6. +4
    -1
      react-ui/src/pages/Workspace/components/UserPoints/index.less
  7. +8
    -2
      react-ui/src/pages/Workspace/components/UserPoints/index.tsx

+ 1
- 1
.gitignore View File

@@ -64,4 +64,4 @@ mvnw
/react-ui/docs
/react-ui/types/tsconfig.tsbuildinfo
/react-ui/storybook-static
/react-ui/.storybook/deploy.sh
/react-ui/.storybook/scripts

+ 3
- 0
react-ui/Dockerfile View File

@@ -0,0 +1,3 @@
# Dockerfile
FROM nginx:alpine
COPY storybook-static/ /usr/share/nginx/html

+ 1
- 1
react-ui/package.json View File

@@ -40,7 +40,7 @@
"start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev max dev",
"storybook": "storybook dev -p 6006",
"storybook-build": "storybook build",
"storybook-deploy": "./.storybook/deploy.sh",
"storybook-deploy": "./.storybook/scripts/upload-deploy.sh",
"storybook-docs": "storybook dev --docs",
"storybook-docs-build": "storybook build --docs",
"test": "jest",


+ 5
- 0
react-ui/src/global.less View File

@@ -160,3 +160,8 @@ ol {
input:-webkit-autofill {
transition: background-color 5000s ease-in-out 0s;
}

.ant-typography {
color: inherit;
font-size: inherit;
}

+ 0
- 5
react-ui/src/overrides.less View File

@@ -261,8 +261,3 @@
}
}
}

.ant-typography {
color: inherit;
font-size: inherit;
}

+ 4
- 1
react-ui/src/pages/Workspace/components/UserPoints/index.less View File

@@ -3,9 +3,9 @@
flex: none;
flex-direction: column;
align-items: center;

width: 326px;
height: 228px;
padding: 0 20px;
.backgroundFullImage(url(@/assets/img/user-points-bg.png));

&__label {
@@ -16,12 +16,15 @@
}

&__value {
width: 100%;
margin-top: 8px;
margin-bottom: 12px;
color: @primary-color;
font-size: 36px;
font-family: DingTalk-JinBuTi;
line-height: 43px;
text-align: center;
.singleLine();
}

&__button {


+ 8
- 2
react-ui/src/pages/Workspace/components/UserPoints/index.tsx View File

@@ -2,6 +2,7 @@ import { PointsStatistics } from '@/pages/Points/index';
import { getPointsStatisticsReq } from '@/services/points';
import { to } from '@/utils/promise';
import { useNavigate } from '@umijs/max';
import { Typography } from 'antd';
import { useEffect, useState } from 'react';
import styles from './index.less';

@@ -23,8 +24,13 @@ function UserPoints() {

return (
<div className={styles['user-points']}>
<span className={styles['user-points__label']}>当前可用算力积分</span>
<span className={styles['user-points__value']}>{statistics?.userCredit ?? '--'}</span>
<div className={styles['user-points__label']}>当前可用算力积分</div>
<Typography.Paragraph
className={styles['user-points__value']}
ellipsis={{ tooltip: statistics?.userCredit ?? '--' }}
>
{statistics?.userCredit ?? '--'}
</Typography.Paragraph>
<div
className={styles['user-points__button']}
onClick={() => {


Loading…
Cancel
Save