Browse Source

修复样式错误

pull/11096/head
期贤 2 years ago
parent
commit
91429eb14f
  1. 6
      src/pages/dashboard/analysis/components/SalesCard.tsx
  2. 9
      src/pages/dashboard/analysis/components/Trend/index.style.ts
  3. 2
      src/pages/dashboard/analysis/components/Trend/index.tsx
  4. 11
      src/pages/dashboard/analysis/style.style.ts

6
src/pages/dashboard/analysis/components/SalesCard.tsx

@ -118,7 +118,7 @@ const SalesCard = ({
<li key={item.title}> <li key={item.title}>
<span <span
className={`${styles.rankingItemNumber} ${ className={`${styles.rankingItemNumber} ${
i < 3 ? styles.active : '' i < 3 ? styles.rankingItemNumberActive : ''
}`} }`}
> >
{i + 1} {i + 1}
@ -126,9 +126,7 @@ const SalesCard = ({
<span className={styles.rankingItemTitle} title={item.title}> <span className={styles.rankingItemTitle} title={item.title}>
{item.title} {item.title}
</span> </span>
<span className={styles.rankingItemValue}> <span>{numeral(item.total).format('0,0')}</span>
{numeral(item.total).format('0,0')}
</span>
</li> </li>
))} ))}
</ul> </ul>

9
src/pages/dashboard/analysis/components/Trend/index.style.ts

@ -14,8 +14,13 @@ const useStyles = createStyles(({ token }) => {
top: '-1px', top: '-1px',
color: token['green-6'], color: token['green-6'],
}, },
'trendItemGrey .up, trendItemGrey .down': { trendItemGrey: {
color: token.colorText, up: {
color: token.colorText,
},
down: {
color: token.colorText,
},
}, },
'reverseColor .up': { 'reverseColor .up': {
color: token['green-6'], color: token['green-6'],

2
src/pages/dashboard/analysis/components/Trend/index.tsx

@ -2,6 +2,7 @@ import { CaretDownOutlined, CaretUpOutlined } from '@ant-design/icons';
import classNames from 'classnames'; import classNames from 'classnames';
import React from 'react'; import React from 'react';
import useStyles from './index.style'; import useStyles from './index.style';
export type TrendProps = { export type TrendProps = {
colorful?: boolean; colorful?: boolean;
flag: 'up' | 'down'; flag: 'up' | 'down';
@ -10,6 +11,7 @@ export type TrendProps = {
className?: string; className?: string;
children?: React.ReactNode; children?: React.ReactNode;
}; };
const Trend: React.FC<TrendProps> = ({ const Trend: React.FC<TrendProps> = ({
colorful = true, colorful = true,
reverseColor = false, reverseColor = false,

11
src/pages/dashboard/analysis/style.style.ts

@ -32,11 +32,6 @@ const useStyles = createStyles(({ token }) => {
fontSize: '0', fontSize: '0',
visibility: 'hidden', visibility: 'hidden',
}, },
span: {
color: token.colorText,
fontSize: '14px',
lineHeight: '22px',
},
}, },
[`@media screen and (max-width: ${token.screenLG}px)`]: { [`@media screen and (max-width: ${token.screenLG}px)`]: {
li: { li: {
@ -54,8 +49,8 @@ const useStyles = createStyles(({ token }) => {
fontSize: '12px', fontSize: '12px',
lineHeight: '20px', lineHeight: '20px',
textAlign: 'center', textAlign: 'center',
backgroundColor: '#F9F9F9',
borderRadius: '20px', borderRadius: '20px',
backgroundColor: token.colorBgContainerDisabled,
}, },
rankingItemTitle: { rankingItemTitle: {
flex: '1', flex: '1',
@ -64,9 +59,9 @@ const useStyles = createStyles(({ token }) => {
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
}, },
active: { rankingItemNumberActive: {
color: '#fff', color: '#fff',
backgroundColor: '#314659', backgroundColor: token.colorBgSpotlight,
}, },
salesExtra: { salesExtra: {
display: 'inline-block', display: 'inline-block',

Loading…
Cancel
Save