markdown定位问题
This commit is contained in:
parent
3453aa31eb
commit
ae9b48953e
|
@ -50,14 +50,14 @@ export default ({
|
|||
}
|
||||
}
|
||||
}
|
||||
},[url])
|
||||
},[url,html])
|
||||
|
||||
const el = useRef();
|
||||
function onAncherHandler(e) {
|
||||
let target = e.target
|
||||
let target = e.target;
|
||||
if (target.tagName.toUpperCase() === 'A') {
|
||||
let ancher = target.getAttribute('href')
|
||||
if (ancher.startsWith('#')) {
|
||||
let ancher = target.getAttribute('href');
|
||||
if (ancher && ancher.startsWith('#')) {
|
||||
e.preventDefault()
|
||||
let viewEl = document.getElementById(ancher.replace('#', ''))
|
||||
if (viewEl) {
|
||||
|
|
|
@ -58,9 +58,12 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
|
|||
:""
|
||||
}
|
||||
</div>
|
||||
<div className="commonBox-info">
|
||||
<RenderHtml className="break_word_comments imageLayerParent" value={content} url={history.location}/>
|
||||
</div>
|
||||
{
|
||||
content &&
|
||||
<div className="commonBox-info">
|
||||
<RenderHtml className="break_word_comments imageLayerParent" value={content} url={history.location}/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue