|
|
|
@ -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));
|
|
|
|
|