From 5d3b07801456d16dcc2c75dcccd48d508a6b60cc Mon Sep 17 00:00:00 2001
From: Li Jin <dragon-fly@qq.com>
Date: Mon, 19 Apr 2021 23:41:33 +0800
Subject: first commit for Yuescript document site.

---
 doc/docs/.vuepress/components/CompilerModal.vue | 32 +++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100755 doc/docs/.vuepress/components/CompilerModal.vue

(limited to 'doc/docs/.vuepress/components/CompilerModal.vue')

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 @@
+<template>
+	<modal name="compiler" @before-open="prepare()" height="auto" width="80%" scrollable>
+		<yue-compiler :text="content" compileronly displayonly/>
+	</modal>
+</template>
+
+<script>
+	import Vue from 'vue';
+	import VModal from 'vue-js-modal/dist/ssr.nocss';
+	import 'vue-js-modal/dist/styles.css';
+	Vue.use(VModal);
+	import YueCompiler from './YueCompiler.vue';
+
+	export default {
+		components: {
+			YueCompiler,
+		},
+		mounted () {
+		},
+		data() {
+			return {
+				content: "",
+			};
+		},
+		methods: {
+			prepare() {
+				this.$data.content = window.yueCodes;
+			},
+		},
+	}
+</script>
+
-- 
cgit v1.2.3-55-g6feb

