Try to add store

This commit is contained in:
2022-01-19 20:53:19 +00:00
parent e0f822dbcc
commit 6899e4c88e
2 changed files with 26 additions and 6 deletions

View File

@ -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>