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>
|
|
|
|
|
|
2026-04-03 15:02:37 +00:00
|
|
|
<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";
|
2026-04-22 14:31:05 +00:00
|
|
|
import { router } from "@/rmo/route/config";
|
2026-04-08 17:49:32 +00:00
|
|
|
import { useStoreDistrict } from "@/rmo/store/district";
|
2026-04-06 22:38:17 +00:00
|
|
|
import type { District } from "@/type/api";
|
2026-04-03 15:02:37 +00:00
|
|
|
|
2026-04-08 17:49:32 +00:00
|
|
|
const district = useStoreDistrict();
|
2026-04-03 15:02:37 +00:00
|
|
|
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
|
2026-04-08 17:49:32 +00:00
|
|
|
.list()
|
2026-04-03 18:28:41 +00:00
|
|
|
.then((districts: District[]) => {
|
|
|
|
|
console.log("got districts");
|
|
|
|
|
})
|
2026-04-08 17:49:32 +00:00
|
|
|
.catch((e: Error) => {
|
2026-04-03 18:28:41 +00:00
|
|
|
console.error("Failed to get districts", e);
|
|
|
|
|
});
|
|
|
|
|
});
|
2026-04-03 15:02:37 +00:00
|
|
|
// Reactive head management
|
2026-04-03 15:24:19 +00:00
|
|
|
/*
|
2026-04-03 15:02:37 +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
|
|
|
*/
|
2026-04-03 15:02:37 +00:00
|
|
|
</script>
|