nidus-sync/ts/rmo/App.vue

45 lines
861 B
Vue

<template>
<div id="app">
<RouterView />
</div>
</template>
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { useHead } from "@vueuse/head";
import { router } from "@/rmo/router";
import { useDistrictStore } from "@/rmo/store/district";
import type { District } from "@/rmo/type";
const district = useDistrictStore();
const count = ref<number>(0);
const message = ref<string>("hey");
const increment = (): void => {
count.value++;
};
onMounted(() => {
district
.get()
.then((districts: District[]) => {
console.log("got districts");
})
.catch((e) => {
console.error("Failed to get districts", e);
});
});
// Reactive head management
/*
useHead({
title: computed(() => `Count: ${count.value} - My Vue App`),
link: [
{
rel: "icon",
type: "image/x-icon",
href: "/favicon.ico",
},
],
});
*/
</script>