Jelajahi Sumber

增加代码折叠功能

mxd 4 tahun lalu
induk
melakukan
577532e6af

+ 3 - 0
src/main/resources/magicapi-support/css/index.css

@@ -54,6 +54,9 @@ ul li {
 ::-webkit-scrollbar-corner {
     background: rgba(221, 221, 221, .3);
 }
+.monaco-editor .margin-view-overlays .codicon-chevron-down, .monaco-editor .margin-view-overlays .codicon-chevron-right{
+    margin-left: 12px !important;
+}
 
 .top-toolbar-container,
 .footer-container {

+ 4 - 4
src/main/resources/magicapi-support/js/index.js

@@ -1349,7 +1349,7 @@ var MagicEditor = {
                 enabled : false
             },
             language: 'magicscript',
-            folding : false,
+            folding : true,
             lineDecorationsWidth : 35,
             theme : theme,
         })
@@ -1359,7 +1359,7 @@ var MagicEditor = {
                 enabled : false
             },
             language: 'json',
-            folding : false,
+            folding : true,
             fixedOverflowWidgets :true,
             theme : theme
         })
@@ -1369,7 +1369,7 @@ var MagicEditor = {
                 enabled : false
             },
             language: 'json',
-            folding : false,
+            folding : true,
             fixedOverflowWidgets :true,
             theme : theme
         })
@@ -1379,7 +1379,7 @@ var MagicEditor = {
                 enabled : false
             },
             language: 'json',
-            folding : false,
+            folding : true,
             readOnly : true,
             fixedOverflowWidgets : true,
             theme : theme