设置表格宽度

sso^2
tangjiang 5 years ago
parent 64cfcc3eb7
commit f1b0b5b9de

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2020-01-10 09:33:45 * @Date: 2020-01-10 09:33:45
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2020-02-14 14:39:40 * @LastEditTime : 2020-02-14 15:06:32
*/ */
import './index.scss'; import './index.scss';
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
@ -173,35 +173,35 @@ const App = (props) => {
title: '通关实训数', title: '通关实训数',
dataIndex: 'passed_myshixun_count', dataIndex: 'passed_myshixun_count',
align: 'center', align: 'center',
with: 150, // with: 150,
sorter: (a, b) => a.passed_myshixun_count - b.passed_myshixun_count sorter: (a, b) => a.passed_myshixun_count - b.passed_myshixun_count
}, },
{ {
title: '完成关卡', title: '完成关卡',
dataIndex: 'passed_games_count', dataIndex: 'passed_games_count',
align: 'center', align: 'center',
with: 150, // with: 150,
sorter: (a, b) => a.passed_games_count - b.passed_games_count sorter: (a, b) => a.passed_games_count - b.passed_games_count
}, },
{ {
title: '代码行', title: '代码行',
dataIndex: 'code_line_count', dataIndex: 'code_line_count',
align: 'center', align: 'center',
with: 150, // with: 150,
sorter: (a, b) => a.code_line_count - b.code_line_count sorter: (a, b) => a.code_line_count - b.code_line_count
}, },
{ {
title: '评测次数', title: '评测次数',
dataIndex: 'evaluate_count', dataIndex: 'evaluate_count',
align: 'center', align: 'center',
with: 150, // with: 150,
sorter: (a, b) => a.evaluate_count - b.evaluate_count sorter: (a, b) => a.evaluate_count - b.evaluate_count
}, },
{ {
title: '所用时间', title: '所用时间',
dataIndex: 'cost_time', dataIndex: 'cost_time',
align: 'center', align: 'center',
with: 150, // with: 150,
render: (text) => (text && moment(text).format('HH:mm:ss')) || '-', render: (text) => (text && moment(text).format('HH:mm:ss')) || '-',
sorter: (a, b) => a.cost_time - b.cost_time sorter: (a, b) => a.cost_time - b.cost_time
} }

Loading…
Cancel
Save