add latest

This commit is contained in:
2022-09-23 00:37:32 +01:00
parent 9c059b3fc3
commit 6e4e70a360
2 changed files with 15 additions and 12 deletions

View File

@@ -3,8 +3,8 @@
</template>
<script setup lang="ts">
import { ref, watchEffect } from 'vue';
import mermaid from 'mermaid';
import { onMounted, ref, watchEffect } from 'vue';
// HTML Refs
const diagram = ref<HTMLInputElement | null>(null);
@@ -15,17 +15,6 @@ const props = defineProps<{
mermaidDefinition: string;
}>();
// Mermaid
onMounted(() => {
mermaid.initialize({
startOnLoad: false,
logLevel: 'fatal',
securityLevel: 'loose',
theme: 'neutral',
flowchart: { htmlLabels: true }
});
});
watchEffect(() => {
if (diagram.value != null) {
mermaid.render(