move docs to own folder

This commit is contained in:
Philipp Kühn
2020-04-17 12:51:49 +02:00
parent 4574b74864
commit 3c0727fd59
32 changed files with 360 additions and 1148 deletions

View File

@@ -0,0 +1,33 @@
<template>
<pre v-if="formattedCode"><code>{{ formattedCode }}</code></pre>
</template>
<script>
import { outdent } from '@mvasilkov/outdent'
export default {
data() {
return {
formattedCode: null
}
},
methods: {
updateCode() {
const text = this.$slots.default[0].text
if (text) {
this.formattedCode = outdent(text)
}
}
},
beforeUpdate() {
this.updateCode()
},
mounted() {
this.updateCode()
},
}
</script>