forked from Gitlink/forgeplus-react
fix
This commit is contained in:
parent
554ff5b175
commit
080e0f6d4e
|
@ -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