init pinia

This commit is contained in:
Antony Budianto
2025-01-03 17:37:54 +07:00
parent b0221e1d21
commit de425bd9e5
15 changed files with 241 additions and 34 deletions
+8 -4
View File
@@ -4,7 +4,7 @@
<div class="grid grid-cols-1 gap-4">
<Suspense>
<template #default>
<RemoteContactRouter />
<RemoteContactRouter label="propsFromHost" @increment="handleLog" />
</template>
<template #fallback>
<div>Loading remote component...</div>
@@ -14,11 +14,15 @@
</div>
</template>
<script setup>
<script setup lang="ts">
import { defineAsyncComponent } from "vue"
const RemoteContactRouter = defineAsyncComponent(() =>
import("remote/RemoteContactRouter")
const handleLog = (value: number) => {
console.log("HOST: log increment", value)
}
const RemoteContactRouter = defineAsyncComponent(
// @ts-expect-error mfe
() => import("remote/RemoteContactRouter")
)
</script>
+11 -1
View File
@@ -1,3 +1,13 @@
<template>
<div>Index page</div>
<div>
Index page:
<p>Count: {{ counter.$state.count }}</p>
<button type="button" @click="() => counter.increment()">
increment+ pinia
</button>
</div>
</template>
<script setup lang="ts">
import { useCounter } from "@/stores/counter"
const counter = useCounter()
</script>