dev_aliyun2
杨树明 5 years ago committed by harry
parent 44cbeba60e
commit 0de33314da

@ -1,6 +1,7 @@
import React, { Component } from 'react';
import { getUploadActionUrl } from 'educoder';
import './CommentItemMDEditor.css'
import './CommentItemMDEditor.css';
class CommentItemMDEditor extends Component {

@ -1,8 +1,8 @@
import React, { Component } from 'react';
import { getUploadActionUrl } from 'educoder'
import { getUploadActionUrl } from 'educoder';
import './MemoDetailEditor.css'
import './MemoDetailEditor.css';
const $ = window.$;
@ -109,6 +109,7 @@ class MemoDetailMDEditor extends Component {
}
showEditor() {
<<<<<<< HEAD
$("html, body").animate({ scrollTop: $('.commentInput:visible').offset().top - 100 }, 1000, () => {
if (this.commentMDEditor) {
this.commentMDEditor.cm.focus()
@ -116,6 +117,15 @@ class MemoDetailMDEditor extends Component {
this.onMockInputClick()
}
});
=======
// $("html, body").animate({ scrollTop: $('.commentInput:visible').offset().top - 100 }, 1000, () => {
// if (this.commentMDEditor) {
// this.commentMDEditor.cm.focus()
// } else {
// this.onMockInputClick()
// }
// });
>>>>>>> f8dfb5f... 调整
}
close = () => {
this.setState({ isInited: false })

@ -1,6 +1,8 @@
import React, { Component } from 'react';
import { getUploadActionUrl } from 'educoder'
import './MemoDetailEditor.css'
import { getUploadActionUrl } from 'educoder';
import './MemoDetailEditor.css';
const $ = window.$;
///作业回答 专用
@ -87,13 +89,13 @@ class MemoDetailMDEditortwo extends Component {
}
showEditor() {
$("html, body").animate({ scrollTop: $('#commentInput').offset().top - 100 }, 1000, () => {
if (this.commentMDEditor) {
this.commentMDEditor.cm.focus()
} else {
$('#commentInput input')[0].click()
}
});
// $("html, body").animate({ scrollTop: $('#commentInput').offset().top - 100 }, 1000, () => {
// if (this.commentMDEditor) {
// this.commentMDEditor.cm.focus()
// } else {
// $('#commentInput input')[0].click()
// }
// });
}
onMockInputClick = () => {
this.setState({ isInited: true })

Loading…
Cancel
Save