* [misc] adjust monaco editor style.
This commit is contained in:
@@ -27,6 +27,24 @@ function createMonaco(id, action, options, diffContent, onMouseDown, onMouseMove
|
||||
if(!lineMap && action == 'diff' && diffContent && diffContent.line) lineMap = diffContent.line.new;
|
||||
if(lineMap) options.lineNumbers = (line) => {return lineMap[line - 1];};
|
||||
|
||||
$.extend(options, {
|
||||
// 关键配置项
|
||||
automaticLayout: true, // 自动调整布局
|
||||
scrollBeyondLastLine: false, // 禁用底部滚动区域
|
||||
minimap: { enabled: false }, // 可选:禁用缩略图以节省空间
|
||||
|
||||
// 编辑器尺寸配置
|
||||
fontSize: 14,
|
||||
lineHeight: 24,
|
||||
lineNumbersMinChars: 2,
|
||||
|
||||
// 内边距设置
|
||||
padding: {
|
||||
top: 8,
|
||||
bottom: 8
|
||||
}
|
||||
});
|
||||
|
||||
if(action == 'diff')
|
||||
{
|
||||
options.renderSideBySide = $.cookie.get('renderSideBySide') == 'true';
|
||||
|
||||
Reference in New Issue
Block a user