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

chromesetting
杨树林 5 years ago
commit 5600969a81

@ -4,8 +4,9 @@
* @Github: * @Github:
* @Date: 2019-12-18 08:49:30 * @Date: 2019-12-18 08:49:30
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-19 16:58:50 * @LastEditTime: 2019-12-20 16:07:37
*/ */
import './index.scss';
import 'quill/dist/quill.core.css'; // 核心样式 import 'quill/dist/quill.core.css'; // 核心样式
import 'quill/dist/quill.snow.css'; // 有工具栏 import 'quill/dist/quill.snow.css'; // 有工具栏
import 'quill/dist/quill.bubble.css'; // 无工具栏 import 'quill/dist/quill.bubble.css'; // 无工具栏
@ -70,6 +71,8 @@ function QuillForEditor ({
useEffect(() => { useEffect(() => {
const quillNode = document.createElement('div');
editorRef.current.appendChild(quillNode);
const _quill = new Quill(editorRef.current, quillOption); const _quill = new Quill(editorRef.current, quillOption);
setQuill(_quill); setQuill(_quill);

@ -0,0 +1,5 @@
.quill_editor_for_react_area{
.ql-editing{
left: 0 !important;
}
}

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-27 15:02:52 * @Date: 2019-11-27 15:02:52
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-19 19:36:24 * @LastEditTime: 2019-12-20 17:33:21
*/ */
import './index.scss'; import './index.scss';
import React, { useState, useRef, useEffect } from 'react'; import React, { useState, useRef, useEffect } from 'react';
@ -137,7 +137,7 @@ function MyMonacoEditor (props, ref) {
<div className="code_title"> <div className="code_title">
{/* 未保存时 ? '学员初始代码文件' : main.x */} {/* 未保存时 ? '学员初始代码文件' : main.x */}
<span className='flex_strict' style={{ color: '#ddd'}}>{identifier ? language ? maps[language.toLowerCase()] : '' : '学员初始代码文件'}</span> <span className='flex_strict' style={{ color: '#ddd'}}>{identifier ? language ? maps[language.toLowerCase()] : '' : '学员初始代码文件'}</span>
<span className={_classnames}>{identifier ? '已保存' : ''}</span> <span className={_classnames}>{hadCodeUpdate ? '已保存' : ''}</span>
<Badge <Badge
className="flex_normal" className="flex_normal"
style={{ color: '#666'}} style={{ color: '#666'}}

@ -4,10 +4,10 @@
* @Github: * @Github:
* @Date: 2019-11-21 09:19:38 * @Date: 2019-11-21 09:19:38
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-20 09:23:07 * @LastEditTime: 2019-12-20 17:32:10
*/ */
import './index.scss'; import './index.scss';
import React, { useState } from 'react'; import React from 'react';
import { Collapse, Icon, Input, Form } from 'antd'; import { Collapse, Icon, Input, Form } from 'antd';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import actions from '../../../../../redux/actions'; import actions from '../../../../../redux/actions';
@ -68,6 +68,7 @@ const AddTestDemo = (props) => {
const genExtra = () => ( const genExtra = () => (
<Icon <Icon
type="close" type="close"
className="collapse_close_icon"
onClick={handleDeletePanel} onClick={handleDeletePanel}
/> />
) )

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-20 10:35:40 * @Date: 2019-11-20 10:35:40
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-19 20:16:32 * @LastEditTime: 2019-12-20 16:53:55
*/ */
import './index.scss'; import './index.scss';
// import 'katex/dist/katex.css'; // import 'katex/dist/katex.css';
@ -24,17 +24,20 @@ const FormItem = Form.Item;
const { Option } = Select; const { Option } = Select;
const maps = { const maps = {
language: [ language: [
{ title: (<span style={{ color: 'rgba(0, 0, 0, 0.35)' }}>请选择</span>), key: '' },
{ title: 'C', key: 'C' }, { title: 'C', key: 'C' },
{ title: 'C++', key: 'C++' }, { title: 'C++', key: 'C++' },
{ title: 'Python', key: 'Python' }, { title: 'Python', key: 'Python' },
{ title: 'Java', key: 'Java' } { title: 'Java', key: 'Java' }
], ],
difficult: [ difficult: [
{ title: (<span style={{ color: 'rgba(0, 0, 0, 0.35)' }}>请选择</span>), key: '' },
{ title: '简单', key: '1' }, { title: '简单', key: '1' },
{ title: '中等', key: '2'}, { title: '中等', key: '2'},
{ title: '困难', key: '3' } { title: '困难', key: '3' }
], ],
category: [ category: [
{ title: (<span style={{ color: 'rgba(0, 0, 0, 0.35)' }}>请选择</span>), key: '' },
{ title: '程序设计', key: '1' }, { title: '程序设计', key: '1' },
{ title: '算法', key: '2'} { title: '算法', key: '2'}
], ],
@ -310,7 +313,7 @@ class EditTab extends React.Component {
> >
<div style={{ marginTop: '15px'}}> <div style={{ marginTop: '15px'}}>
<QuillForEditor <QuillForEditor
style={{ height: '200px', 'overflowY': 'auto' }} style={{ height: '200px' }}
placeholder="请输入描述信息" placeholder="请输入描述信息"
onContentChange={handleContentChange} onContentChange={handleContentChange}
options={quillConfig} options={quillConfig}

@ -66,9 +66,9 @@
&.fix_top{ &.fix_top{
position: absolute; position: absolute;
top: 43px; top: 43px;
left: -30px; left: -20px;
right: -30px; right: -20px;
padding: 0 20px; padding: 0 26px 0 20px;
// background: gold; // background: gold;
background: rgb(249,249,249); background: rgb(249,249,249);
z-index: 1000; z-index: 1000;
@ -83,3 +83,21 @@
} }
} }
} }
.collapse_close_icon{
position: relative;
background: rgba(235, 235, 235, 1);
border-radius: 50%;
font-size: 12px;
padding: 5px 5px;
color: rgb(142, 142, 142);
transition: all .3s;
&:hover{
color: #fff;
background: rgb(231, 81, 79);
}
// &:hover{
// color: red;
// }
}

@ -10,7 +10,7 @@
// background:rgba(34,34,34,1); // background:rgba(34,34,34,1);
// background: #1E1E1E; // background: #1E1E1E;
background: rgba(7,15,25,1); background: rgba(7,15,25,1);
padding:0 30px; padding:0 20px;
} }
.task_header{ .task_header{

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-20 16:35:46 * @Date: 2019-11-20 16:35:46
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-19 17:20:48 * @LastEditTime: 2019-12-20 16:40:42
*/ */
import types from './actionTypes'; import types from './actionTypes';
import CONST from '../../constants'; import CONST from '../../constants';

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-20 16:40:32 * @Date: 2019-11-20 16:40:32
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-17 16:19:04 * @LastEditTime: 2019-12-20 16:40:52
*/ */
import { Base64 } from 'js-base64'; import { Base64 } from 'js-base64';
import types from '../actions/actionTypes'; import types from '../actions/actionTypes';
@ -14,8 +14,8 @@ const init = {
name: '', // 任务名称 name: '', // 任务名称
language: '', language: '',
description: '', description: '',
difficult: 1, difficult: '',
category: 1, category: '',
// openOrNot: 1, // openOrNot: 1,
timeLimit: 3 timeLimit: 3
}, },

Loading…
Cancel
Save