From 1954a2467c0228376eab88349f2cdc925ae18439 Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 20 Dec 2019 13:03:55 +0800 Subject: [PATCH] update style --- .../modules/developer/recordDetail/index.js | 8 +++-- .../leftpane/commitRecord/index.js | 32 ++++++++++++------- .../leftpane/commitRecord/index.scss | 2 ++ 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/public/react/src/modules/developer/recordDetail/index.js b/public/react/src/modules/developer/recordDetail/index.js index 7a3fc13e1..e4002004a 100644 --- a/public/react/src/modules/developer/recordDetail/index.js +++ b/public/react/src/modules/developer/recordDetail/index.js @@ -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) { - 语言: C + 语言: {detail.language} + + + 执行用时: {`${detail.execute_time && (+detail.execute_time * 1000)}ms`} - {/* */}
diff --git a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js index 7fc061765..7b6cce9f8 100644 --- a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js +++ b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.js @@ -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)); diff --git a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.scss b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.scss index 283617445..fb099445e 100644 --- a/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.scss +++ b/public/react/src/modules/developer/studentStudy/leftpane/commitRecord/index.scss @@ -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;