Commit bbb44ba8 authored by afc163's avatar afc163

Improve details

parent 2f57afd1
...@@ -10,8 +10,19 @@ const NumberInfo = ({ theme, title, subTitle, total, subTotal, status, suffix, g ...@@ -10,8 +10,19 @@ const NumberInfo = ({ theme, title, subTitle, total, subTotal, status, suffix, g
})} })}
{...rest} {...rest}
> >
{title && <div className={styles.numberInfoTitle}>{title}</div>} {title && (
{subTitle && <div className={styles.numberInfoSubTitle}>{subTitle}</div>} <div className={styles.numberInfoTitle} title={typeof title === 'string' ? title : ''}>
{title}
</div>
)}
{subTitle && (
<div
className={styles.numberInfoSubTitle}
title={typeof subTitle === 'string' ? subTitle : ''}
>
{subTitle}
</div>
)}
<div className={styles.numberInfoValue} style={gap ? { marginTop: gap } : null}> <div className={styles.numberInfoValue} style={gap ? { marginTop: gap } : null}>
<span> <span>
{total} {total}
......
...@@ -38,19 +38,19 @@ export default { ...@@ -38,19 +38,19 @@ export default {
'app.home.introduce': 'introduce', 'app.home.introduce': 'introduce',
'app.analysis.test': 'Gongzhuan No.{no} shop', 'app.analysis.test': 'Gongzhuan No.{no} shop',
'app.analysis.introduce': 'Introduce', 'app.analysis.introduce': 'Introduce',
'app.analysis.total-sales': 'total sales', 'app.analysis.total-sales': 'Total Sales',
'app.analysis.day-sales': 'Day Sales', 'app.analysis.day-sales': 'Day Sales',
'app.analysis.visits': 'Visits', 'app.analysis.visits': 'Visits',
'app.analysis.visits-trend': 'Visits Trend', 'app.analysis.visits-trend': 'Visits Trend',
'app.analysis.visits-ranking': 'Visits Ranking', 'app.analysis.visits-ranking': 'Visits Ranking',
'app.analysis.day-visits': 'Day Visits', 'app.analysis.day-visits': 'Day Visits',
'app.analysis.week': 'week ratio', 'app.analysis.week': 'Week Ratio',
'app.analysis.day': 'day ratio', 'app.analysis.day': 'Day Ratio',
'app.analysis.payments': 'Payments', 'app.analysis.payments': 'Payments',
'app.analysis.conversion-rate': 'Conversion Rate', 'app.analysis.conversion-rate': 'Conversion Rate',
'app.analysis.operational-effect': 'Operational Effect', 'app.analysis.operational-effect': 'Operational Effect',
'app.analysis.sales-trend': 'Stores Sales Trend', 'app.analysis.sales-trend': 'Stores Sales Trend',
'app.analysis.sales-ranking': 'sales ranking', 'app.analysis.sales-ranking': 'Sales Ranking',
'app.analysis.all-year': 'All Year', 'app.analysis.all-year': 'All Year',
'app.analysis.all-month': 'All Month', 'app.analysis.all-month': 'All Month',
'app.analysis.all-week': 'All Week', 'app.analysis.all-week': 'All Week',
......
...@@ -456,9 +456,19 @@ class Analysis extends Component { ...@@ -456,9 +456,19 @@ class Analysis extends Component {
<ul className={styles.rankingList}> <ul className={styles.rankingList}>
{this.rankingListData.map((item, i) => ( {this.rankingListData.map((item, i) => (
<li key={item.title}> <li key={item.title}>
<span className={i < 3 ? styles.active : ''}>{i + 1}</span> <span
<span>{item.title}</span> className={`${styles.rankingItemNumber} ${
<span>{numeral(item.total).format('0,0')}</span> i < 3 ? styles.active : ''
}`}
>
{i + 1}
</span>
<span className={styles.rankingItemTitle} title={item.title}>
{item.title}
</span>
<span className={styles.rankingItemValue}>
{numeral(item.total).format('0,0')}
</span>
</li> </li>
))} ))}
</ul> </ul>
......
...@@ -20,30 +20,36 @@ ...@@ -20,30 +20,36 @@
li { li {
.clearfix(); .clearfix();
margin-top: 16px; margin-top: 16px;
display: flex;
align-items: center;
span { span {
color: @text-color; color: @text-color;
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
} }
span:first-child { .rankingItemNumber {
background-color: @background-color-base; background-color: @background-color-base;
border-radius: 20px; border-radius: 20px;
display: inline-block; display: inline-block;
font-size: 12px; font-size: 12px;
font-weight: 600; font-weight: 600;
margin-right: 24px; margin-right: 16px;
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
width: 20px; width: 20px;
text-align: center; text-align: center;
} margin-top: 1.5px;
span.active { &.active {
//background-color: @primary-color;
background-color: #314659; background-color: #314659;
color: #fff; color: #fff;
} }
span:last-child { }
float: right; .rankingItemTitle {
flex: 1;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-right: 8px;
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment