Merge branch 'main' into feature/doctemplate
This commit is contained in:
@@ -3,3 +3,5 @@
|
||||
|
||||
/* 半透明黄色 */
|
||||
.monaco-editor .yellow-decoration {background-color: rgba(255, 255, 0, 0.2);}
|
||||
|
||||
.monaco-editor .margin .line-numbers {padding-left: 16px;}
|
||||
|
||||
@@ -37,6 +37,7 @@ function createMonaco(id, action, options, diffContent, onMouseDown, onMouseMove
|
||||
fontSize: 14,
|
||||
lineHeight: 24,
|
||||
lineNumbersMinChars: 2,
|
||||
glyphMargin: true, // 启用装饰器边距
|
||||
|
||||
// 内边距设置
|
||||
padding: {top: 8, bottom: 8}
|
||||
@@ -122,26 +123,16 @@ function createMonaco(id, action, options, diffContent, onMouseDown, onMouseMove
|
||||
decorations = editor.deltaDecorations([], decorations);
|
||||
}
|
||||
|
||||
editor.onDidChangeCursorSelection(function()
|
||||
editor.onDidChangeCursorSelection(function(e)
|
||||
{
|
||||
// 只有当没有程序化选择时才更新装饰器
|
||||
if(!programmaticSelectionRange) return;
|
||||
if(!programmaticSelectionRange) return; // 只有当没有程序化选择时才更新装饰器
|
||||
|
||||
// 如果用户手动改变了选择,清除程序化选择的样式
|
||||
if(e.selections.some(sel => !rangesEqual(sel, programmaticSelectionRange)))
|
||||
if(e.selection.startLineNumber == programmaticSelectionRange.startLineNumber || e.selection.endLineNumber == programmaticSelectionRange.endLineNumber)
|
||||
{
|
||||
programmaticSelectionRange = null;
|
||||
updateDecorations();
|
||||
}
|
||||
});
|
||||
|
||||
function rangesEqual(r1, r2)
|
||||
{
|
||||
return r1.startLineNumber === r2.startLineNumber &&
|
||||
r1.startColumn === r2.startColumn &&
|
||||
r1.endLineNumber === r2.endLineNumber &&
|
||||
r1.endColumn === r2.endColumn;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@ window.handleRenderRow = function($row, index, data)
|
||||
}
|
||||
|
||||
if($row.find('input[data-name="milestone"]:checked').length == 0) $row.find('input[data-name="milestone"]').eq(1).prop('checked', true); //里程碑默认选择“否”。
|
||||
if($prevLevelRow.length && $prevLevelRow.find('input[data-name="syncData"]').val() == '1') $row.find('input[data-name="syncData"]').val(1);
|
||||
|
||||
/* 处理已有数据字段状态。隐藏的删除按钮,禁用管理方法字段。 */
|
||||
if(typeof data != 'undefined' && typeof data.id != 'undefined')
|
||||
|
||||
Reference in New Issue
Block a user