Procházet zdrojové kódy

feat(command): cat command format

Lind před 4 roky
rodič
revize
21bb0bb7af
1 změnil soubory, kde provedl 5 přidání a 7 odebrání
  1. 5 7
      src/pages/device/Command/cat/index.tsx

+ 5 - 7
src/pages/device/Command/cat/index.tsx

@@ -17,13 +17,11 @@ const Cat = (props: Props) => {
         height={300}
         language={'json'}
         editorDidMount={(editor) => {
-          editor.onDidScrollChange?.(() => {
-            editor
-              .getAction('editor.action.formatDocument')
-              .run()
-              .finally(() => {
-                editor.updateOptions({ readOnly: true });
-              });
+          editor.onDidContentSizeChange?.(() => {
+            editor.getAction('editor.action.formatDocument').run();
+            // .finally(() => {
+            //   editor.updateOptions({ readOnly: true });
+            // });
           });
         }}
         value={JSON.stringify(data?.downstream)}