mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-05 22:25:49 +08:00
feat: Modify the configuration file to support tabs
This commit is contained in:
parent
0dc312db64
commit
f01245d027
1 changed files with 3 additions and 0 deletions
|
@ -17,6 +17,8 @@ import { dockerFile } from '@codemirror/legacy-modes/mode/dockerfile';
|
|||
import { javascript } from '@codemirror/legacy-modes/mode/javascript';
|
||||
import { placeholder } from '@codemirror/view';
|
||||
import { json } from '@codemirror/lang-json';
|
||||
import { keymap } from '@codemirror/view';
|
||||
import { defaultKeymap, indentWithTab } from '@codemirror/commands';
|
||||
|
||||
defineOptions({ name: 'CodemirrorPro' });
|
||||
|
||||
|
@ -78,6 +80,7 @@ const initCodeMirror = () => {
|
|||
defaultTheme,
|
||||
oneDark,
|
||||
basicSetup,
|
||||
keymap.of([...defaultKeymap, indentWithTab]),
|
||||
EditorView.updateListener.of((v: any) => {
|
||||
if (v.docChanged) {
|
||||
emit('update:modelValue', v.state.doc.toString());
|
||||
|
|
Loading…
Add table
Reference in a new issue