代码库二级issue滚动条
This commit is contained in:
parent
6d1b410ba1
commit
7a06e21933
|
@ -68,6 +68,7 @@ class m_editor extends Component {
|
||||||
const lineHeight = editor.getOption(
|
const lineHeight = editor.getOption(
|
||||||
monaco.editor.EditorOption.lineHeight
|
monaco.editor.EditorOption.lineHeight
|
||||||
);
|
);
|
||||||
|
|
||||||
const lineCount = editor.getModel().getLineCount() || 1;
|
const lineCount = editor.getModel().getLineCount() || 1;
|
||||||
const height =
|
const height =
|
||||||
editor.getTopForLineNumber(lineCount + 1) +
|
editor.getTopForLineNumber(lineCount + 1) +
|
||||||
|
@ -85,11 +86,15 @@ class m_editor extends Component {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
|
|
||||||
|
<React.Fragment>
|
||||||
<div>
|
<div>
|
||||||
<div className="">
|
<div className="">
|
||||||
<Editor
|
<Editor
|
||||||
height="400px"
|
// height={this.state.x}
|
||||||
language={language ? language : "plaintext"}
|
language={language ? language : "plaintext"}
|
||||||
theme={"vs-grey"}
|
theme={"vs-grey"}
|
||||||
placeholder="请输入内容"
|
placeholder="请输入内容"
|
||||||
|
@ -114,6 +119,7 @@ class m_editor extends Component {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue