From b8a99e75cf354c385791965ba52fef829e61406d Mon Sep 17 00:00:00 2001 From: JimQing Date: Sat, 11 Jul 2020 20:00:47 +0800 Subject: [PATCH] fix: code prettify --- public/index.html | 2 ++ src/view/CodemirrorEditor.vue | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/public/index.html b/public/index.html index 77f243b..4e1cfd4 100644 --- a/public/index.html +++ b/public/index.html @@ -12,6 +12,8 @@ + + diff --git a/src/view/CodemirrorEditor.vue b/src/view/CodemirrorEditor.vue index 3a195fb..7b5c9d5 100644 --- a/src/view/CodemirrorEditor.vue +++ b/src/view/CodemirrorEditor.vue @@ -216,6 +216,7 @@ export default { }, onEditorRefresh() { this.editorRefresh(); + setTimeout(()=> PR.prettyPrint(), 0); }, endCopy() { this.backLight = false; @@ -232,6 +233,9 @@ export default { }, mounted() { this.leftAndRightScroll(); + setTimeout(() => { + PR.prettyPrint() + }, 300); } }