lanjianrong 4 anos atrás
pai
commit
a1a557c98d

+ 8 - 3
src/pages/Workbench/Dashboard/components/LeaderBoard.jsx

@@ -24,11 +24,16 @@ const LeaderBoard = ({ loading = false, dataList = [] }) => {
     const oColumns = [
       {
         title: '排名',
-        dataIndex: 'rank',
+        dataIndex: 'index',
+        valueType: 'indexBorder',
         align: 'center',
         width: '30%',
-        render: (_, record) =>
-          record.rank <= 3 ? <Iconfont type="icon-trophy" className={colorMap[record.rank]} /> : ''
+        render: (_, __, index) =>
+          index + 1 <= 3 ? (
+            <span className={colorMap[index + 1]}>
+              <Iconfont type="icon-trophy" />
+            </span>
+          ) : null
       },
       {
         title: '姓名',

+ 5 - 1
src/pages/Workbench/Dashboard/components/SoftLeaderboard.jsx

@@ -24,7 +24,11 @@ const SoftLeaderboard = ({ loading = false, productLeaderBoard = [] }) => {
         align: 'center',
         width: '20%',
         render: (_, __, index) =>
-          index + 1 <= 3 ? <Iconfont type="icon-trophy" className={colorMap[index + 1]} /> : ''
+          index + 1 <= 3 ? (
+            <span className={colorMap[index + 1]}>
+              <Iconfont type="icon-trophy" />
+            </span>
+          ) : null
       },
       {
         title: '姓名',