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

dev_aliyun_beta
jingquan huang 5 years ago
commit 5299b08965

@ -2641,7 +2641,7 @@ class Listofworksstudentone extends Component {
<ul className="clearfix" style={{padding: '20px 15px 10px 20px'}}>
<li className="clearfix ">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{course_is_end===true?<span>
{course_is_end===true?"":<span>
{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTimet}>
计算成绩
@ -2651,7 +2651,7 @@ class Listofworksstudentone extends Component {
计算成绩
</div>:"")
}
</span>:""}
</span>}
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<Search

@ -188,6 +188,19 @@ function getLanguageByMirrorName(mirror_name) {
}
let notCallCodeMirrorOnChangeFlag = false;
/**
props :
mirror_name 决定语言
isEditablePath
repositoryCode
codemirrorDidMount
shixun.forbid_copy
showSettingDrawer, settingDrawerOpen
*/
class TPIMonaco extends Component {
constructor(props) {
@ -201,7 +214,7 @@ class TPIMonaco extends Component {
}
componentDidUpdate(prevProps, prevState, snapshot) {
const { game, mirror_name } = this.props
const { mirror_name } = this.props
const editor_monaco = this.editor_monaco;
if (editor_monaco && !_.isEqual(prevProps.mirror_name, mirror_name)) {
// TODO 后期考虑加入根据文件类型的不同使用不同的lang
@ -294,7 +307,7 @@ class TPIMonaco extends Component {
})
this.props.codemirrorDidMount && this.props.codemirrorDidMount()
if(this.props.shixun.forbid_copy == true) {
if(this.props.shixun && this.props.shixun.forbid_copy == true) {
// 禁用粘贴
// https://github.com/Microsoft/monaco-editor/issues/100
window.editor_monaco.onDidPaste( (a, b, c) => { window.__pastePosition = a })

Loading…
Cancel
Save