|
@@ -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",
|
|
|
+ // }
|
|
|
);
|
|
|
});
|
|
|
}
|