Browse Source

use Table column.align

pull/266/head
afc163 8 years ago
parent
commit
0d00edd876
  1. 7
      src/components/StandardTable/index.js
  2. 2
      src/routes/Dashboard/Analysis.js
  3. 5
      src/routes/Dashboard/Analysis.less
  4. 6
      src/routes/Profile/BasicProfile.js
  5. 6
      src/routes/Profile/BasicProfile.less

7
src/components/StandardTable/index.js

@ -59,11 +59,8 @@ class StandardTable extends PureComponent {
title: '服务调用次数', title: '服务调用次数',
dataIndex: 'callNo', dataIndex: 'callNo',
sorter: true, sorter: true,
render: val => ( align: 'right',
<div style={{ textAlign: 'center' }}> render: val => `${val}`,
{val}
</div>
),
}, },
{ {
title: '状态', title: '状态',

2
src/routes/Dashboard/Analysis.js

@ -177,7 +177,7 @@ export default class Analysis extends Component {
<span style={{ marginRight: 4 }}>{text}%</span> <span style={{ marginRight: 4 }}>{text}%</span>
</Trend> </Trend>
), ),
className: styles.alignRight, align: 'right',
}, },
]; ];

5
src/routes/Dashboard/Analysis.less

@ -131,11 +131,6 @@
} }
} }
td.alignRight,
th.alignRight {
text-align: right!important;
}
.trendText { .trendText {
margin-left: 8px; margin-left: 8px;
color: @heading-color; color: @heading-color;

6
src/routes/Profile/BasicProfile.js

@ -99,13 +99,13 @@ export default class BasicProfile extends Component {
title: '单价', title: '单价',
dataIndex: 'price', dataIndex: 'price',
key: 'price', key: 'price',
className: 'col-money', align: 'right',
render: renderContent, render: renderContent,
}, { }, {
title: '数量(件)', title: '数量(件)',
dataIndex: 'num', dataIndex: 'num',
key: 'num', key: 'num',
className: 'col-money', align: 'right',
render: (text, row, index) => { render: (text, row, index) => {
if (index < basicGoods.length) { if (index < basicGoods.length) {
return text; return text;
@ -116,7 +116,7 @@ export default class BasicProfile extends Component {
title: '金额', title: '金额',
dataIndex: 'amount', dataIndex: 'amount',
key: 'amount', key: 'amount',
className: 'col-money', align: 'right',
render: (text, row, index) => { render: (text, row, index) => {
if (index < basicGoods.length) { if (index < basicGoods.length) {
return text; return text;

6
src/routes/Profile/BasicProfile.less

@ -6,9 +6,3 @@
font-weight: 500; font-weight: 500;
margin-bottom: 16px; margin-bottom: 16px;
} }
:global {
.col-money {
text-align: right!important;
}
}

Loading…
Cancel
Save