代码库二级issue滚动条

This commit is contained in:
hucong 2021-09-30 19:47:40 +08:00
parent 6d1b410ba1
commit 7a06e21933
1 changed files with 56 additions and 50 deletions

View File

@ -68,6 +68,7 @@ class m_editor extends Component {
const lineHeight = editor.getOption(
monaco.editor.EditorOption.lineHeight
);
const lineCount = editor.getModel().getLineCount() || 1;
const height =
editor.getTopForLineNumber(lineCount + 1) +
@ -85,11 +86,15 @@ class m_editor extends Component {
};
};
return (
<React.Fragment>
<div>
<div className="">
<Editor
height="400px"
// height={this.state.x}
language={language ? language : "plaintext"}
theme={"vs-grey"}
placeholder="请输入内容"
@ -114,6 +119,7 @@ class m_editor extends Component {
</div>
)}
</div>
</React.Fragment>
);
}
}