You've already forked obsidian-visualiser
Fix content read pages and proses getting content. Start working on CanvasEditor.
This commit is contained in:
@@ -7,16 +7,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Content } from '~/shared/content.util';
|
||||
import { Content } from '#shared/content.util';
|
||||
import { unifySlug } from '#shared/general.util';
|
||||
|
||||
const element = useTemplateRef('element'), overview = ref();
|
||||
const route = useRouter().currentRoute;
|
||||
const path = computed(() => Array.isArray(route.value.params.path) ? route.value.params.path[0] : route.value.params.path);
|
||||
const path = computed(() => unifySlug(route.value.params.path));
|
||||
|
||||
onMounted(async () => {
|
||||
if(element.value && path.value)
|
||||
if(element.value && path.value && await Content.ready)
|
||||
{
|
||||
await Content.init()
|
||||
overview.value = Content.render(element.value, path.value);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user