diff options
Diffstat (limited to '')
| -rwxr-xr-x | doc/docs/.vuepress/components/CompilerModal.vue | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/docs/.vuepress/components/CompilerModal.vue b/doc/docs/.vuepress/components/CompilerModal.vue new file mode 100755 index 0000000..65ae9b0 --- /dev/null +++ b/doc/docs/.vuepress/components/CompilerModal.vue | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | <template> | ||
| 2 | <modal name="compiler" @before-open="prepare()" height="auto" width="80%" scrollable> | ||
| 3 | <yue-compiler :text="content" compileronly displayonly/> | ||
| 4 | </modal> | ||
| 5 | </template> | ||
| 6 | |||
| 7 | <script> | ||
| 8 | import Vue from 'vue'; | ||
| 9 | import VModal from 'vue-js-modal/dist/ssr.nocss'; | ||
| 10 | import 'vue-js-modal/dist/styles.css'; | ||
| 11 | Vue.use(VModal); | ||
| 12 | import YueCompiler from './YueCompiler.vue'; | ||
| 13 | |||
| 14 | export default { | ||
| 15 | components: { | ||
| 16 | YueCompiler, | ||
| 17 | }, | ||
| 18 | mounted () { | ||
| 19 | }, | ||
| 20 | data() { | ||
| 21 | return { | ||
| 22 | content: "", | ||
| 23 | }; | ||
| 24 | }, | ||
| 25 | methods: { | ||
| 26 | prepare() { | ||
| 27 | this.$data.content = window.yueCodes; | ||
| 28 | }, | ||
| 29 | }, | ||
| 30 | } | ||
| 31 | </script> | ||
| 32 | |||
