Try to add store
This commit is contained in:
@ -1,9 +1,8 @@
|
||||
<script setup>
|
||||
let dashboard;
|
||||
fetch("/dashboard")
|
||||
.then(x => x.json())
|
||||
.then(x => console.log(x))
|
||||
.then(x => dashboard = x);
|
||||
import { computed, onMounted } from 'vue';
|
||||
|
||||
onMounted(function () { console.log(this.$store)});
|
||||
//const dashboard = computed(() => this.$store.state);
|
||||
</script>
|
||||
|
||||
<!--
|
||||
@ -22,6 +21,7 @@ fetch("/dashboard")
|
||||
{{template "base" .}}
|
||||
-->
|
||||
|
||||
|
||||
<template>
|
||||
<div v-if="dashboard != nil" v-for="budget in dashboard.Budgets" class="budget-item">
|
||||
<a href="budget/{{budget.ID}}">{{budget.Name}}</a>
|
||||
|
Reference in New Issue
Block a user