update style

chromesetting
tangjiang 5 years ago
parent bd8de2b86c
commit 1954a2467c

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-12-04 08:36:21 * @Date: 2019-12-04 08:36:21
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-20 10:38:00 * @LastEditTime: 2019-12-20 10:52:36
*/ */
import './index.scss'; import './index.scss';
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
@ -87,9 +87,11 @@ function RecordDetail (props) {
</span> </span>
</span> </span>
<span className="status_label"> <span className="status_label">
语言: <span className="status_label_sub">C</span> 语言: <span className="status_label_sub">{detail.language}</span>
</span>
<span className="status_label" style={{ visibility: detail.status === 0 ? 'visible' : 'hidden'}}>
执行用时: <span className="status_label_sub">{`${detail.execute_time && (+detail.execute_time * 1000)}ms`}</span>
</span> </span>
{/* <span className> */}
</div> </div>
<div className="result_error_area"> <div className="result_error_area">
<ErrorResult detail={detail}/> <ErrorResult detail={detail}/>

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-27 09:49:33 * @Date: 2019-11-27 09:49:33
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-20 09:35:00 * @LastEditTime: 2019-12-20 11:44:22
*/ */
import './index.scss'; import './index.scss';
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
@ -149,19 +149,27 @@ const CommitRecord = (props) => {
setRenderCtx(() => (renderRecordDetail)) setRenderCtx(() => (renderRecordDetail))
}, [commitRecordDetail]); }, [commitRecordDetail]);
// 复制功能 // 复制功能
let count = 0;
useEffect(() => { useEffect(() => {
if (!clipboard) { clipboard = new ClipboardJS('.copy_error');
clipboard = new ClipboardJS('.copy_error'); clipboard.on('success', (e) => {
} e.clearSelection();
if (commitRecordDetail.status !== 0) { if (count > 0) return;
clipboard.on('success', (e) => { count++;
message.success('复制成功'); message.success('复制成功');
e.clearSelection(); setTimeout(() => {
}); message.destroy();
} }, 300);
}, [commitRecordDetail.status]); });
}, []);
// if (commitRecordDetail.status !== 0) {
// clipboard.on('success', (e) => {
// console.log('成功=====》》》》》');
// message.success('复制成功');
// e.clearSelection();
// });
// }
// //
const handleTableChange = (pagination) => { const handleTableChange = (pagination) => {
setPagination(Object.assign({}, pagination)); setPagination(Object.assign({}, pagination));

@ -1,6 +1,8 @@
.commit_record_area{ .commit_record_area{
// padding: 20px 30px; // padding: 20px 30px;
padding: 0 20px; padding: 0 20px;
overflow-y: auto;
height: calc(100vh - 177px);
.record_header{ .record_header{
display: flex; display: flex;
// justify-content: space-between; // justify-content: space-between;

Loading…
Cancel
Save