Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into ysm_jupyter

chromesetting
杨树林 5 years ago
commit 7fca3f2e87

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-04 08:36:21
* @LastEditors: tangjiang
* @LastEditTime: 2019-12-20 10:38:00
* @LastEditTime: 2019-12-20 10:52:36
*/
import './index.scss';
import React, { useState, useEffect } from 'react';
@ -87,9 +87,11 @@ function RecordDetail (props) {
</span>
</span>
<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 className> */}
</div>
<div className="result_error_area">
<ErrorResult detail={detail}/>

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

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

Loading…
Cancel
Save