mirror of
https://gitee.com/ssssssss-team/magic-api.git
synced 2026-06-02 03:51:35 +08:00
fix
This commit is contained in:
@@ -114,7 +114,6 @@ export default {
|
||||
theme: store.get('skin') || 'default',
|
||||
fontFamily: contants.EDITOR_FONT_FAMILY,
|
||||
fontSize: contants.EDITOR_FONT_SIZE,
|
||||
scrollBeyondLastLine: false,
|
||||
fontLigatures: true,
|
||||
// 自动调整大小
|
||||
automaticLayout: true
|
||||
@@ -127,6 +126,9 @@ export default {
|
||||
this.editor.trigger(null, 'editor.action.triggerSuggest', {})
|
||||
}
|
||||
})
|
||||
CommandsRegistry.registerCommand('editor.action.scrollUp1Line', () => {
|
||||
this.editor.setScrollTop(this.editor.getScrollTop() - 22)
|
||||
})
|
||||
this.editor.addCommand(
|
||||
monaco.KeyMod.Alt | monaco.KeyCode.US_SLASH,
|
||||
() => {
|
||||
|
||||
@@ -148,7 +148,11 @@ const completionFunction = async (suggestions, input, env, best) => {
|
||||
kind: monaco.languages.CompletionItemKind.Class,
|
||||
filterText: className,
|
||||
detail: clazz,
|
||||
insertTextRules: monaco.languages.CompletionItemInsertTextRule.KeepWhitespace,
|
||||
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
|
||||
command: {
|
||||
id: 'editor.action.scrollUp1Line'
|
||||
},
|
||||
insertText: className,
|
||||
additionalTextEdits: [{
|
||||
forceMoveMarkers: true,
|
||||
text: `import ${clazz}\r\n`,
|
||||
|
||||
Reference in New Issue
Block a user