fix: Typography.Paragraph 样式

This commit is contained in:
cp3hnu 2025-04-09 16:18:11 +08:00
parent cfee0d495c
commit 56fc11d7e4
7 changed files with 22 additions and 10 deletions

2
.gitignore vendored
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
react-ui/Dockerfile Normal file
View File

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

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",

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;
}

View File

@ -261,8 +261,3 @@
}
}
}
.ant-typography {
color: inherit;
font-size: inherit;
}

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 {

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={() => {