nidus-sync/ts/rmo/App.vue

46 lines
877 B
Vue
Raw Normal View History

2026-04-03 15:24:19 +00:00
<template>
<div id="app">
2026-04-03 15:43:44 +00:00
<RouterView />
2026-04-03 15:24:19 +00:00
</div>
</template>
<script setup lang="ts">
2026-04-03 18:28:41 +00:00
import { onMounted, ref } from "vue";
2026-04-07 16:05:04 +00:00
//import { useHead } from "@vueuse/head";
import { router } from "@/rmo/route/config";
import { useStoreDistrict } from "@/rmo/store/district";
2026-04-06 22:38:17 +00:00
import type { District } from "@/type/api";
const district = useStoreDistrict();
const count = ref<number>(0);
const message = ref<string>("hey");
const increment = (): void => {
count.value++;
};
2026-04-03 18:28:41 +00:00
onMounted(() => {
district
.list()
2026-04-03 18:28:41 +00:00
.then((districts: District[]) => {
console.log("got districts");
})
.catch((e: Error) => {
2026-04-03 18:28:41 +00:00
console.error("Failed to get districts", e);
});
});
// Reactive head management
2026-04-03 15:24:19 +00:00
/*
useHead({
title: computed(() => `Count: ${count.value} - My Vue App`),
link: [
{
rel: "icon",
type: "image/x-icon",
href: "/favicon.ico",
},
],
});
2026-04-03 15:24:19 +00:00
*/
</script>