diff options
Diffstat (limited to '')
| -rwxr-xr-x | doc/docs/.vuepress/components/YueCompiler.vue | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/docs/.vuepress/components/YueCompiler.vue b/doc/docs/.vuepress/components/YueCompiler.vue index ea8ea11..86d7566 100755 --- a/doc/docs/.vuepress/components/YueCompiler.vue +++ b/doc/docs/.vuepress/components/YueCompiler.vue | |||
| @@ -9,12 +9,12 @@ | |||
| 9 | </div> | 9 | </div> |
| 10 | <div class="childL" ref='yueEditor' style="height: 30em;"> | 10 | <div class="childL" ref='yueEditor' style="height: 30em;"> |
| 11 | <ClientOnly> | 11 | <ClientOnly> |
| 12 | <prism-editor class="my-editor" v-model="code" :highlight="highlighter" @input="codeChanged($event)" line-numbers :readonly="readonly"></prism-editor> | 12 | <prism-editor class="my-editor" v-model="code" :highlight="highlighterYue" @input="codeChanged($event)" line-numbers :readonly="readonly"></prism-editor> |
| 13 | </ClientOnly> | 13 | </ClientOnly> |
| 14 | </div> | 14 | </div> |
| 15 | <div class="childR" style="height: 30em;"> | 15 | <div class="childR" style="height: 30em;"> |
| 16 | <ClientOnly> | 16 | <ClientOnly> |
| 17 | <prism-editor class="my-editor" v-model="compiled" :highlight="highlighter" @input="codeChanged($event)" readonly></prism-editor> | 17 | <prism-editor class="my-editor" v-model="compiled" :highlight="highlighterLua" @input="codeChanged($event)" readonly></prism-editor> |
| 18 | </ClientOnly> | 18 | </ClientOnly> |
| 19 | </div> | 19 | </div> |
| 20 | </div> | 20 | </div> |
| @@ -98,9 +98,12 @@ | |||
| 98 | this.$data.result = res; | 98 | this.$data.result = res; |
| 99 | } | 99 | } |
| 100 | }, | 100 | }, |
| 101 | highlighter(code) { | 101 | highlighterYue(code) { |
| 102 | return highlight(code, languages.moon); | 102 | return highlight(code, languages.moon); |
| 103 | }, | 103 | }, |
| 104 | highlighterLua(code) { | ||
| 105 | return highlight(code, languages.lua); | ||
| 106 | }, | ||
| 104 | codeChanged(text) { | 107 | codeChanged(text) { |
| 105 | if (window.yue) { | 108 | if (window.yue) { |
| 106 | let res = ['','compiler error, and please help opening an issue for this. Thanks a lot!']; | 109 | let res = ['','compiler error, and please help opening an issue for this. Thanks a lot!']; |
