forked from Gitlink/forgeplus-react
Merge branch 'dev_educoder_new' of https://gitlink.org.cn/Gitlink/forgeplus-react into dev_educoder_new
This commit is contained in:
commit
bfc51c04aa
|
@ -33,10 +33,11 @@ function Quality(props){
|
|||
useEffect(()=>{
|
||||
if(indexValue){
|
||||
// document.getElementById('htmlDOM').innerHTML
|
||||
const domBox = document.getElementsByClassName('CodeMirror-code')[0].childNodes[indexValue.line - 1]
|
||||
const divs = document.createElement("div");
|
||||
const key = indexValue.line
|
||||
divs.innerHTML = questionList[indexValue.index].message;
|
||||
domBox.appendChild(divs)
|
||||
const domBox = document.getElementsByClassName('CodeMirror-code')[0].childNodes[key]
|
||||
domBox.prepend(divs)
|
||||
divs.style.cssText='border:1px solid red; padding: 5px;border-radius: 10px;color: black;background: lemonchiffon;'
|
||||
}
|
||||
},[indexValue])
|
||||
|
@ -92,7 +93,9 @@ function Quality(props){
|
|||
const dom = document.createElement("div");
|
||||
dom.innerHTML = text;
|
||||
setDetail(true)
|
||||
setCodeDetailValue({content:dom.innerText,line:item.line + 5})
|
||||
setCodeDetailValue({content:dom.innerText,
|
||||
line:item.line + 5
|
||||
})
|
||||
setIndexValue({
|
||||
line:item.line,
|
||||
index
|
||||
|
|
Loading…
Reference in New Issue