afc163 8 лет назад
Родитель
Сommit
0d00edd876

+ 2 - 5
src/components/StandardTable/index.js

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

+ 1 - 1
src/routes/Dashboard/Analysis.js

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

+ 0 - 5
src/routes/Dashboard/Analysis.less

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

+ 3 - 3
src/routes/Profile/BasicProfile.js

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

+ 0 - 6
src/routes/Profile/BasicProfile.less

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