Composables
useCraft
Learn how to use the useCraft composable.
This composable returns the instanve of the plugin. This is useful if you need sites or the base cp url.
<script setup lang="ts">
import { useCraft } from '@vue-craftcms';
const { baseUrl, siteMap } = useCraft();
</script>