LingxinMeng 1 éve
szülő
commit
b8608f2928
1 módosított fájl, 6 hozzáadás és 5 törlés
  1. 6 5
      src/views/sceneLibrary/components/editor.vue

+ 6 - 5
src/views/sceneLibrary/components/editor.vue

@@ -54,16 +54,17 @@ export default {
     },
     watch: {
         content(newVal, oldVal) {
-            if (newVal && newVal != oldVal) {
+            if (newVal && newVal !== oldVal) {
                 this.html = `<pre><code>${newVal}</code></pre>`;
 
                 this.$nextTick(() => {
                     SlateTransforms.setNodes(
                         this.editor,
-                        { language: "python" },
-                        {
-                            type: "code",
-                        }
+                        // todo python渲染太慢了
+                        // { language: "python" },
+                        // {
+                        //     type: "code",
+                        // }
                     );
                 });
             }