blob: c70197c6715cc5fe7a1687cfc2c8f5be27a16fbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<script>
import { renderGFM } from '~/behaviors/markdown/render_gfm';
export default {
props: {
isLoading: {
type: Boolean,
required: false,
default: false,
},
},
watch: {
isLoading() {
this.handleGFM();
},
},
mounted() {
this.handleGFM();
},
methods: {
handleGFM() {
if (this.isLoading) return;
renderGFM(this.$el);
},
},
};
</script>
<template>
<div><slot></slot></div>
</template>
|