Use props for budgetid
This commit is contained in:
parent
626e0ada40
commit
a2cc19d310
@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
props: ['budgetid'],
|
||||||
mounted () {
|
mounted () {
|
||||||
const budgetid = this.$route.params.budgetid;
|
this.$store.dispatch("setCurrentBudget", this.budgetid)
|
||||||
this.$store.dispatch("setCurrentBudget", budgetid)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ const routes = [
|
|||||||
{ path: '/dashboard', name: 'Dashboard', component: Dashboard },
|
{ path: '/dashboard', name: 'Dashboard', component: Dashboard },
|
||||||
{ path: '/login', name: 'Login', component: Login },
|
{ path: '/login', name: 'Login', component: Login },
|
||||||
{ path: '/register', name: 'Register', component: Register },
|
{ path: '/register', name: 'Register', component: Register },
|
||||||
{ path: '/budget/:budgetid', name: 'Budget', components: {default: Dashboard, sidebar: BudgetSidebar } },
|
{ path: '/budget/:budgetid', name: 'Budget', components: {default: Dashboard, sidebar: BudgetSidebar}, props: true },
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user