debian-mirror-gitlab/app/assets/javascripts/notebook/cells/output/markdown.vue
2023-03-04 22:38:38 +05:30

38 lines
666 B
Vue

<script>
import Prompt from '../prompt.vue';
import Markdown from '../markdown.vue';
export default {
name: 'MarkdownOutput',
components: {
Prompt,
Markdown,
},
props: {
count: {
type: Number,
required: true,
},
rawCode: {
type: Array,
required: true,
},
index: {
type: Number,
required: true,
},
},
computed: {
markdownContent() {
return { source: this.rawCode };
},
},
};
</script>
<template>
<div class="output">
<prompt type="Out" :count="count" :show-output="index === 0" />
<markdown :cell="markdownContent" :hide-prompt="true" />
</div>
</template>