Browse Source

修复样式错误

pull/11096/head
期贤 2 years ago
parent
commit
91429eb14f
  1. 6
      src/pages/dashboard/analysis/components/SalesCard.tsx
  2. 7
      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}>
<span
className={`${styles.rankingItemNumber} ${
i < 3 ? styles.active : ''
i < 3 ? styles.rankingItemNumberActive : ''
}`}
>
{i + 1}
@ -126,9 +126,7 @@ const SalesCard = ({
<span className={styles.rankingItemTitle} title={item.title}>
{item.title}
</span>
<span className={styles.rankingItemValue}>
{numeral(item.total).format('0,0')}
</span>
<span>{numeral(item.total).format('0,0')}</span>
</li>
))}
</ul>

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

@ -14,9 +14,14 @@ const useStyles = createStyles(({ token }) => {
top: '-1px',
color: token['green-6'],
},
'trendItemGrey .up, trendItemGrey .down': {
trendItemGrey: {
up: {
color: token.colorText,
},
down: {
color: token.colorText,
},
},
'reverseColor .up': {
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 React from 'react';
import useStyles from './index.style';
export type TrendProps = {
colorful?: boolean;
flag: 'up' | 'down';
@ -10,6 +11,7 @@ export type TrendProps = {
className?: string;
children?: React.ReactNode;
};
const Trend: React.FC<TrendProps> = ({
colorful = true,
reverseColor = false,

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

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

Loading…
Cancel
Save